SDL2: Write battery file information before issueing RESET_COMMAND
Before performing the GB reset, we should perform a GB_save_battery. Otherwise, resetting the emulation will kill ("kill" as in simply don't write them into the .sav) all changes made to the battery save since sameboy was started.
This commit is contained in:
parent
be9df4d658
commit
2407304177
@ -302,6 +302,7 @@ static bool handle_pending_command(void)
|
||||
}
|
||||
|
||||
case GB_SDL_RESET_COMMAND:
|
||||
GB_save_battery(&gb, battery_save_path_ptr);
|
||||
return true;
|
||||
|
||||
case GB_SDL_NO_COMMAND:
|
||||
|
Loading…
Reference in New Issue
Block a user