From 7bfeb5a00e8c6f081e0bd2e1acbe8fd3ffc35f47 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 16 Aug 2017 21:04:28 -0700 Subject: Using ui.exit to abort loading or saving a state via menu will no longer cause you to return to those sub-menus the next time the menu is loaded --- io.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index 71c04ae..75d2a98 100644 --- a/io.c +++ b/io.c @@ -22,6 +22,7 @@ #include "sms.h" #include "render.h" #include "util.h" +#include "menu.h" #define CYCLE_NEVER 0xFFFFFFFF #define MIN_POLL_INTERVAL 6840 @@ -528,6 +529,14 @@ void handle_binding_up(keybinding * binding) } case UI_EXIT: current_system->request_exit(current_system); + if (current_system->type == SYSTEM_GENESIS) { + genesis_context *gen = (genesis_context *)current_system; + if (gen->extra) { + //TODO: More robust mechanism for detecting menu + menu_context *menu = gen->extra; + menu->external_game_load = 1; + } + } break; } break; -- cgit v1.2.3