Open flibitijibibo opened 3 years ago
AFAIK, you don't need to do anything specific, it just works in Fez on both the beta and release game. It does not pause however.
There is also AppResumingFromSuspend_t
in ISteamUtils
if you wanted to do anything specific.
I'd be interested in knowing how this is implemented. Having an OS feature in Steamworks (much like Steam Input) is not helpful for the PC, and like the SDL idea it doesn't help with the existing catalog.
I got an interesting question this week about how sleep/resume events work on the Deck: What do we do on the application side when the system is put to sleep?
For "other mobile targets" there is an event to note that the whole system is being suspended, but that's very specialized - in SDL it's exposed as an
APP
event which you would only know about if you targeted a specific device ahead of time. We could implement it in SDL_dbus if we really wanted to expose this directly, but for the PC catalog it'd probably be no good for both native and Proton.A broader fix, and the reason I post this here, would be to treat sleep/resume as focus loss/gain, which most apps treat as a cue to pause, but I assume that means doing sketchy things with the window manager. But it does seem like the best way to avoid gameplay continuing the moment the device is resumed.
The FEZ public beta and VVVVVV are good tests, both games have an option to pause/mute on focus loss so both cases can be tested with one program.