Merge pull request #216 from ZenithMDC/SDL2-hot-swap-battery-save

SDL2: Write battery to disk when ROMs are hot-swapped
This commit is contained in:
Lior Halphon 2019-11-03 21:05:49 +02:00 committed by GitHub
commit 97a2cc2566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -406,14 +406,12 @@ static bool handle_pending_command(void)
return false;
}
case GB_SDL_RESET_COMMAND:
GB_save_battery(&gb, battery_save_path_ptr);
return true;
case GB_SDL_NO_COMMAND:
return false;
case GB_SDL_RESET_COMMAND:
case GB_SDL_NEW_FILE_COMMAND:
GB_save_battery(&gb, battery_save_path_ptr);
return true;
case GB_SDL_QUIT_COMMAND: