Mercurial > repos > blastem
comparison blastem.c @ 949:5e4fb650de58
Make Exit option in menu work
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 19 Mar 2016 17:53:50 -0700 |
parents | 4f4f8385da8d |
children | fec4a59ae5d7 |
comparison
equal
deleted
inserted
replaced
946:6b90ec50daf3 | 949:5e4fb650de58 |
---|---|
1168 | 1168 |
1169 set_keybindings(genesis->ports); | 1169 set_keybindings(genesis->ports); |
1170 start_genesis(genesis, menu ? NULL : statefile, menu == debug_target ? debuggerfun : NULL); | 1170 start_genesis(genesis, menu ? NULL : statefile, menu == debug_target ? debuggerfun : NULL); |
1171 for(;;) | 1171 for(;;) |
1172 { | 1172 { |
1173 if (genesis->should_exit) { | |
1174 break; | |
1175 } | |
1173 if (menu && menu_context->next_rom) { | 1176 if (menu && menu_context->next_rom) { |
1174 if (game_context) { | 1177 if (game_context) { |
1175 if (game_context->save_type != SAVE_NONE) { | 1178 if (game_context->save_type != SAVE_NONE) { |
1176 genesis = game_context; | 1179 genesis = game_context; |
1177 persist_save(); | 1180 persist_save(); |
1220 menu = 0; | 1223 menu = 0; |
1221 genesis = game_context; | 1224 genesis = game_context; |
1222 genesis->m68k->options->address_log = address_log; | 1225 genesis->m68k->options->address_log = address_log; |
1223 map_all_bindings(genesis->ports); | 1226 map_all_bindings(genesis->ports); |
1224 start_genesis(genesis, statefile, menu == debug_target ? debuggerfun : NULL); | 1227 start_genesis(genesis, statefile, menu == debug_target ? debuggerfun : NULL); |
1225 } | 1228 } else if (menu && game_context) { |
1226 else if (menu && game_context) { | |
1227 genesis->arena = set_current_arena(game_context->arena); | 1229 genesis->arena = set_current_arena(game_context->arena); |
1228 genesis = game_context; | 1230 genesis = game_context; |
1229 cart = genesis->cart; | 1231 cart = genesis->cart; |
1230 ram = genesis->work_ram; | 1232 ram = genesis->work_ram; |
1231 menu = 0; | 1233 menu = 0; |