diff blastem.c @ 940:4f4f8385da8d

Fix saving of SRAM/EEPROM when switching games in menu
author Michael Pavone <pavone@retrodev.com>
date Thu, 25 Feb 2016 23:39:14 -0800
parents 00c57f1925c3
children f87522554d7b 5e4fb650de58
line wrap: on
line diff
--- a/blastem.c	Thu Feb 25 23:08:50 2016 -0800
+++ b/blastem.c	Thu Feb 25 23:39:14 2016 -0800
@@ -1173,7 +1173,9 @@
 		if (menu && menu_context->next_rom) {
 			if (game_context) {
 				if (game_context->save_type != SAVE_NONE) {
+					genesis = game_context;
 					persist_save();
+					genesis = menu_context;
 				}
 				free(game_context->cart);
 				free(save_filename);