summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-11-25 20:43:20 -0800
committerMichael Pavone <pavone@retrodev.com>2017-11-25 20:43:20 -0800
commitf4767bb05392fa4a04d72969fa35aa91b688c8cb (patch)
tree431e023a080a27d2c5602238cdc032bfab974f58 /io.c
parentc6edea8bbaceda316375019344f4e7ffbf6da57e (diff)
Skip loading menu ROM if Nuklear UI is enabled. Allow disabling Nuklear UI in favor of old menu ROM both at compile time and in config. Fall back to ROM UI if GL is unavailable
--HG-- branch : nuklear_ui
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/io.c b/io.c
index 8cdb249..9207093 100644
--- a/io.c
+++ b/io.c
@@ -381,6 +381,9 @@ void handle_joydown(int joystick, int button)
void handle_mousedown(int mouse, int button)
{
+ if (!current_io) {
+ return;
+ }
if (current_io->mouse_mode == MOUSE_CAPTURE && !current_io->mouse_captured) {
current_io->mouse_captured = 1;
render_relative_mouse(1);
@@ -537,7 +540,7 @@ void handle_binding_up(keybinding * binding)
}
case UI_EXIT:
#ifndef DISABLE_NUKLEAR
- if (is_nuklear_active) {
+ if (is_nuklear_active()) {
show_pause_menu();
} else {
#endif