goweiwen / Allium

A custom launcher for the Miyoo Mini and Miyoo Mini Plus handheld devices
GNU General Public License v3.0
135 stars 14 forks source link

Auto save state not working properly when system shuts down during suspension. #74

Closed hartleyshc closed 3 months ago

hartleyshc commented 4 months ago

Initially reported this issue via Discord. In a past release you made some changes to the timeout before shutdown and it seemed to somewhat help auto saving. But not completely.

With the new feature of changing the function of the power button, I was able to do more testing.

If I am playing a game, and press the power button to suspend, it will not create an auto save state when it powers off after the default 5 mins. If I press the power button while it is set to power off, the auto save state is created correctly during power off. If I have power button set to suspend and then hold down the power button to power off, the auto save state is also created successfully.

So it seems only while the system is suspended, and it powers off, the save state is not created when the system powers off.

The new power setting does help a lot. I just have it set to Power off on press, and just wait an additional 5-10 seconds for the system to boot when I'm ready to play again. So its not a critical bug.

goweiwen commented 3 months ago

Thanks for testing this!

I'll add some logic to unpause RetroArch when powering off during a suspend and let it terminiate it gracefully so it has time to save.

goweiwen commented 3 months ago

Fixed in 67d1208