From f4767bb05392fa4a04d72969fa35aa91b688c8cb Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 25 Nov 2017 20:43:20 -0800 Subject: 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 --- io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'io.c') 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 -- cgit v1.2.3