Mercurial > repos > blastem
comparison nuklear_ui/blastem_nuklear.c @ 2604:c768bbd912f1
Give sega 8-bit consoles separate system_type enum values and allow selecting them from the command line
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 13 Feb 2025 23:07:31 -0800 |
parents | 251cc75574af |
children | cbf5a01e429e |
comparison
equal
deleted
inserted
replaced
2603:acb8f0f70a68 | 2604:c768bbd912f1 |
---|---|
20 #include "../io.h" | 20 #include "../io.h" |
21 #include "../png.h" | 21 #include "../png.h" |
22 #include "../controller_info.h" | 22 #include "../controller_info.h" |
23 #include "../bindings.h" | 23 #include "../bindings.h" |
24 #include "../mediaplayer.h" | 24 #include "../mediaplayer.h" |
25 #include "../sms.h" | |
26 | 25 |
27 static struct nk_context *context; | 26 static struct nk_context *context; |
28 static struct rawfb_context *fb_context; | 27 static struct rawfb_context *fb_context; |
29 | 28 |
30 typedef struct | 29 typedef struct |
2468 {"Exit", NULL} | 2467 {"Exit", NULL} |
2469 #endif | 2468 #endif |
2470 }; | 2469 }; |
2471 | 2470 |
2472 if (nk_begin(context, "Main Menu", nk_rect(0, 0, render_width(), render_height()), 0)) { | 2471 if (nk_begin(context, "Main Menu", nk_rect(0, 0, render_width(), render_height()), 0)) { |
2473 if (current_system->type == SYSTEM_SMS && ((sms_context *)current_system)->i8255) { | 2472 if (current_system->type == SYSTEM_SC3000) { |
2474 menu(context, sizeof(sc3k_items)/sizeof(*sc3k_items), sc3k_items, exit_handler); | 2473 menu(context, sizeof(sc3k_items)/sizeof(*sc3k_items), sc3k_items, exit_handler); |
2475 } else { | 2474 } else { |
2476 menu(context, sizeof(items)/sizeof(*items), items, exit_handler); | 2475 menu(context, sizeof(items)/sizeof(*items), items, exit_handler); |
2477 } | 2476 } |
2478 nk_end(context); | 2477 nk_end(context); |
2483 { | 2482 { |
2484 static menu_item items[] = { | 2483 static menu_item items[] = { |
2485 {"Load ROM", view_load}, | 2484 {"Load ROM", view_load}, |
2486 {"Settings", view_settings}, | 2485 {"Settings", view_settings}, |
2487 {"About", view_about}, | 2486 {"About", view_about}, |
2487 #ifndef __EMSCRIPTEN__ | |
2488 {"Exit", NULL} | 2488 {"Exit", NULL} |
2489 #endif | |
2489 }; | 2490 }; |
2490 | 2491 |
2491 if (nk_begin(context, "Main Menu", nk_rect(0, 0, render_width(), render_height()), 0)) { | 2492 if (nk_begin(context, "Main Menu", nk_rect(0, 0, render_width(), render_height()), 0)) { |
2492 menu(context, sizeof(items)/sizeof(*items), items, exit_handler); | 2493 menu(context, sizeof(items)/sizeof(*items), items, exit_handler); |
2493 nk_end(context); | 2494 nk_end(context); |