BizHawk
BizHawk copied to clipboard
Add auto save state on close
- Add configuration for auto-saving state on exit
- Update MainForm to auto save on close game if configured
- Fix config serialization test.
#1861
Bump?
Saw this, more or less agreed with it... and promptly lost it all in the shuffle of summer craziness with kids. I'll get back to this in the next week or two and apply the changes requested.
I'm also not sure if the autosave call belongs in CloseGame. I believe that runs every time a rom is reloaded or unloaded, including when EmuHawk is closed. Autoload only happens on startup.
My thinking is that for autosave, it should happen any time the ROM changes. I'm not sure how it worked in FCEUX, although for my use case only doing it on shutdown works. Open to whichever here, calling it on CloseGame
felt the safest (save early and often) but we could definitely make it happen on shutdown instead to reduce the number of times this happens.
I'm also not sure if the autosave call belongs in CloseGame. I believe that runs every time a rom is reloaded or unloaded, including when EmuHawk is closed. Autoload only happens on startup.
My thinking is that for autosave, it should happen any time the ROM changes. I'm not sure how it worked in FCEUX, although for my use case only doing it on shutdown works. Open to whichever here, calling it on
CloseGame
felt the safest (save early and often) but we could definitely make it happen on shutdown instead to reduce the number of times this happens.
I'm going to do it on CloseGame, it looks like the autoload code is executed during LoadRomInternal as well, so it runs any time the ROM is loaded (not just if it's passed as a command line argument). I think Autosave should have the same logic.