I've been looking into implementing a different way of backing up saves. My idea is, when creating a save:
- check if romname.sav exists. If it doesn't, create romname.sav
- if it does, check for romname2.sav, romname3.sav, romname4.sav
- if all 3 exist, delete romname4.sav
- rename romname3.sav to romname4.sav etc.
- create a new romname.sav
Problem is, I don't know how to rename a file in the SD card yet. I don't know if the "normal" C function
rename() would work here. But I'll give it a shot.
Also, I added a new configuration in
Alt64.ini called
save_backup. It enables backing up saves when set to 1, and disables it when set to 0.
I haven't committed any changes to my fork yet, by the way.