christianhaitian / arkos

Another rockchip Operating System
MIT License
1.37k stars 81 forks source link

Reset with low battery while in game corrupts save file #1066

Closed FurtadoPires closed 1 month ago

FurtadoPires commented 1 month ago

I was playing with about 20% battery when accidentally hit the reset button and the device rebooted with the white lines on the screen, so I charged the battery but once I started to play again all the saves (made by the rom, not save states) from the game were gone (despite the file still existing in the folder).

Maybe ArkOS could have a fail safe to prevent this from happening, like creating copies from the savefile in case the battery starts to run low, and delete automatically in case of a clean exit, or something similar that could prevent this problem from happening.

To reproduce: -Play a game using only saves from the rom (in my case was a snes game) -Let the battery go then hit the reset button (until you get the low battery screen then turn off) -Charge the device and check if the saves are ok

christianhaitian commented 1 month ago

First Off, you hit the reset button on any OS on a computing device while you're in the process of actively using it, you're more than likely to lose something. Accident or not, it just happens. That's why I use a mix of savestates and in game saves when I can.

Second, it's never a good idea to play with the battery that low. The unit could suddenly shut off without warning due to insufficient voltage. You should always look to charge your device once you get around 30 percent or lower.

Third, you can set retroarch to automatically save your in game saves to your sd card on a particular interval instead of waiting until you exit the emulator. Just check the retroarch menu settings>saving>SaveRAM Autosave Interval option and set that to whatever you want.

Good luck and take care.