Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
939:00c57f1925c3 | 940:4f4f8385da8d |
---|---|
1171 for(;;) | 1171 for(;;) |
1172 { | 1172 { |
1173 if (menu && menu_context->next_rom) { | 1173 if (menu && menu_context->next_rom) { |
1174 if (game_context) { | 1174 if (game_context) { |
1175 if (game_context->save_type != SAVE_NONE) { | 1175 if (game_context->save_type != SAVE_NONE) { |
1176 genesis = game_context; | |
1176 persist_save(); | 1177 persist_save(); |
1178 genesis = menu_context; | |
1177 } | 1179 } |
1178 free(game_context->cart); | 1180 free(game_context->cart); |
1179 free(save_filename); | 1181 free(save_filename); |
1180 base_map[0].buffer = ram = game_context->work_ram; | 1182 base_map[0].buffer = ram = game_context->work_ram; |
1181 } else { | 1183 } else { |