summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-08-16 21:04:28 -0700
committerMichael Pavone <pavone@retrodev.com>2017-08-16 21:04:28 -0700
commit7bfeb5a00e8c6f081e0bd2e1acbe8fd3ffc35f47 (patch)
tree76dbc07121ffb471db5d139a9e64a0e7dd8901da
parent17ce89242c2efb3a525fca11b469eb0d32c97162 (diff)
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
-rw-r--r--io.c9
1 files changed, 9 insertions, 0 deletions
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;