-
Notifications
You must be signed in to change notification settings - Fork 202
Auto pause resume games
With Apollo you can configure Client Commands, which is handy to implement automatic pause and resume for almost any games/applications, providing a game console grade experience for your streams.
One method is to use Nyrna, but it's not very reliable since it only provides a toggle hotkey which can easily get desynced between connect/disconnect states.
So I crafted a new method with AutoHotKey, and it worked reliably to my experience, despite Ryujinx can crash after resume.
First, you need to download and install AutoHotKey, then you need to download the two scripts (pause.ahk and resume.ahk) from this Gist.
Then extract the scripts to whatever places you like, and configure the global Command Preparations and Resume/Pause commands in Apollo:

Make sure you have add the resume.ahk to the global undo command, or your frontmost application can get freezed upon exiting the stream. But if you forget to run resume when quitting the stream, you still can find the script's tray icon and right click, exit the script, it'll also resume the paused program automatically.
Then, voila! When you disconnect, the current running game will be automatically suspended, and it'll be automatically resumed once you connect back. It works every time and it is so satisfying that the game won't consume power when nobody is playing.
Note
The built-in Virtual Display entry does not run any scripts. It double functions as a fail safe entry if you configured any of the scripts wrong and won't start a stream, so all script executions are disabled for it. You need to use other apps.