AM2R-Community-Developers / AM2R-Community-Updates

Source code for AM2R 1.5.2+, free of copyrighted assets and trademarks.
https://www.reddit.com/r/AM2R/
Other
139 stars 27 forks source link

When suspending on Linux, pause the game until user has unlocked the device #117

Open thejacer87 opened 2 years ago

thejacer87 commented 2 years ago

Is your feature request related to a problem? Please describe. When I sleep the steam deck, all is well. But when it wakes from suspend, the game continues to play in the background until I have finished unlocking the device.

Describe the solution you'd like When the deck is put to sleep. Either pause the game so when I re-open, the game has been paused; or pause the game loop in GM, then somehow listen for when the system is unlocked, resume the process.

Describe alternatives you've considered Pause the game myself before entering sleep.

Additional context Steamdeck support would be great, maybe think about releasing the AM2R launcher on flathub so we can install from there instead of building it manually

Miepee commented 2 years ago

hey @thejacer87 do you have any examples / documentation for OS.suspend()?

thejacer87 commented 2 years ago

hey @thejacer87 do you have any examples / documentation for OS.suspend()?

nah man, sorry. i just assumed there is some sort of suspend command it can listen for