summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-11-22 11:18:36 -0800
committerMichael Pavone <pavone@retrodev.com>2017-11-22 11:18:36 -0800
commitb21ebe75d412c72441be8a63c202641cc5ff4dfa (patch)
tree8b2aeb2b5a3a9db49c93919ea9dd443e02ff7dce /io.c
parent6895070c631340809829e0c20c085b231b0fcadd (diff)
Pause menu now triggered on ui.exit event
--HG-- branch : nuklear_ui
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/io.c b/io.c
index 7b5d404..22881c1 100644
--- a/io.c
+++ b/io.c
@@ -23,6 +23,9 @@
#include "render.h"
#include "util.h"
#include "menu.h"
+#ifndef DISABLE_NUKLEAR
+#include "nuklear_ui/blastem_nuklear.h"
+#endif
#define CYCLE_NEVER 0xFFFFFFFF
#define MIN_POLL_INTERVAL 6840
@@ -532,6 +535,11 @@ void handle_binding_up(keybinding * binding)
break;
}
case UI_EXIT:
+#ifndef DISABLE_NUKLEAR
+ if (is_nuklear_active) {
+ show_pause_menu();
+ } else {
+#endif
current_system->request_exit(current_system);
if (current_system->type == SYSTEM_GENESIS) {
genesis_context *gen = (genesis_context *)current_system;
@@ -541,6 +549,9 @@ void handle_binding_up(keybinding * binding)
menu->external_game_load = 1;
}
}
+#ifndef DISABLE_NUKLEAR
+ }
+#endif
break;
}
break;