Mercurial > repos > blastem
comparison io.c @ 1477:1cdd7f492af8 nuklear_ui
Pause menu now triggered on ui.exit event
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 22 Nov 2017 11:18:36 -0800 |
parents | cd6e566eb6b9 |
children | da1dce39e846 |
comparison
equal
deleted
inserted
replaced
1476:0646ae0987c3 | 1477:1cdd7f492af8 |
---|---|
21 #include "genesis.h" | 21 #include "genesis.h" |
22 #include "sms.h" | 22 #include "sms.h" |
23 #include "render.h" | 23 #include "render.h" |
24 #include "util.h" | 24 #include "util.h" |
25 #include "menu.h" | 25 #include "menu.h" |
26 #ifndef DISABLE_NUKLEAR | |
27 #include "nuklear_ui/blastem_nuklear.h" | |
28 #endif | |
26 | 29 |
27 #define CYCLE_NEVER 0xFFFFFFFF | 30 #define CYCLE_NEVER 0xFFFFFFFF |
28 #define MIN_POLL_INTERVAL 6840 | 31 #define MIN_POLL_INTERVAL 6840 |
29 | 32 |
30 const char * device_type_names[] = { | 33 const char * device_type_names[] = { |
530 free(screenshot_base); | 533 free(screenshot_base); |
531 render_save_screenshot(path); | 534 render_save_screenshot(path); |
532 break; | 535 break; |
533 } | 536 } |
534 case UI_EXIT: | 537 case UI_EXIT: |
538 #ifndef DISABLE_NUKLEAR | |
539 if (is_nuklear_active) { | |
540 show_pause_menu(); | |
541 } else { | |
542 #endif | |
535 current_system->request_exit(current_system); | 543 current_system->request_exit(current_system); |
536 if (current_system->type == SYSTEM_GENESIS) { | 544 if (current_system->type == SYSTEM_GENESIS) { |
537 genesis_context *gen = (genesis_context *)current_system; | 545 genesis_context *gen = (genesis_context *)current_system; |
538 if (gen->extra) { | 546 if (gen->extra) { |
539 //TODO: More robust mechanism for detecting menu | 547 //TODO: More robust mechanism for detecting menu |
540 menu_context *menu = gen->extra; | 548 menu_context *menu = gen->extra; |
541 menu->external_game_load = 1; | 549 menu->external_game_load = 1; |
542 } | 550 } |
543 } | 551 } |
552 #ifndef DISABLE_NUKLEAR | |
553 } | |
554 #endif | |
544 break; | 555 break; |
545 } | 556 } |
546 break; | 557 break; |
547 } | 558 } |
548 } | 559 } |