Mercurial > repos > blastem
diff 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 |
line wrap: on
line diff
--- a/blastem.c Sat Mar 19 17:40:17 2016 -0700 +++ b/blastem.c Sat Mar 19 17:53:50 2016 -0700 @@ -1170,6 +1170,9 @@ start_genesis(genesis, menu ? NULL : statefile, menu == debug_target ? debuggerfun : NULL); for(;;) { + if (genesis->should_exit) { + break; + } if (menu && menu_context->next_rom) { if (game_context) { if (game_context->save_type != SAVE_NONE) { @@ -1222,8 +1225,7 @@ genesis->m68k->options->address_log = address_log; map_all_bindings(genesis->ports); start_genesis(genesis, statefile, menu == debug_target ? debuggerfun : NULL); - } - else if (menu && game_context) { + } else if (menu && game_context) { genesis->arena = set_current_arena(game_context->arena); genesis = game_context; cart = genesis->cart;