summaryrefslogtreecommitdiff
path: root/nuklear_ui/blastem_nuklear.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-11-26 19:22:09 -0800
committerMichael Pavone <pavone@retrodev.com>2017-11-26 19:22:09 -0800
commit3b2e343a1088abc7fe1cf1dffcf6a20aa97b0918 (patch)
treebb20356ceec8dc748277ff7a6f8c285f2324db93 /nuklear_ui/blastem_nuklear.c
parentc9b253c58788376865cc8768ba342a67b4758bcf (diff)
Pause game execution when in the new UI pause menu
--HG-- branch : nuklear_ui
Diffstat (limited to 'nuklear_ui/blastem_nuklear.c')
-rw-r--r--nuklear_ui/blastem_nuklear.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuklear_ui/blastem_nuklear.c b/nuklear_ui/blastem_nuklear.c
index 850f70e..8ff1821 100644
--- a/nuklear_ui/blastem_nuklear.c
+++ b/nuklear_ui/blastem_nuklear.c
@@ -226,7 +226,7 @@ void blastem_nuklear_render(void)
nk_input_begin(context);
}
-void idle_loop(void)
+void ui_idle_loop(void)
{
const uint32_t MIN_UI_DELAY = 15;
static uint32_t last;
@@ -268,6 +268,7 @@ void show_pause_menu(void)
context->style.window.background = nk_rgba(0, 0, 0, 128);
context->style.window.fixed_background = nk_style_item_color(nk_rgba(0, 0, 0, 128));
current_view = view_pause;
+ current_system->request_exit(current_system);
}
static uint8_t active;
@@ -307,5 +308,5 @@ void blastem_nuklear_init(uint8_t file_loaded)
render_set_event_handler(handle_event);
render_set_gl_context_handlers(context_destroyed, context_created);
active = 1;
- idle_loop();
+ ui_idle_loop();
}