Mercurial > repos > blastem
comparison bindings.c @ 1631:c4ba3177b72d
WIP new VDP plane debug view and support for detached VDP debug views generally
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 04 Nov 2018 22:51:50 -0800 |
parents | 18a946ec74c8 |
children | e397766c3028 |
comparison
equal
deleted
inserted
replaced
1630:5aa0c3c43b97 | 1631:c4ba3177b72d |
---|---|
4 #include "io.h" | 4 #include "io.h" |
5 #include "blastem.h" | 5 #include "blastem.h" |
6 #include "saves.h" | 6 #include "saves.h" |
7 #include "util.h" | 7 #include "util.h" |
8 #include "genesis.h" | 8 #include "genesis.h" |
9 #include "sms.h" | |
9 #include "menu.h" | 10 #include "menu.h" |
10 #include "bindings.h" | 11 #include "bindings.h" |
11 #include "controller_info.h" | 12 #include "controller_info.h" |
12 #ifndef DISABLE_NUKLEAR | 13 #ifndef DISABLE_NUKLEAR |
13 #include "nuklear_ui/blastem_nuklear.h" | 14 #include "nuklear_ui/blastem_nuklear.h" |
33 UI_TOGGLE_FULLSCREEN, | 34 UI_TOGGLE_FULLSCREEN, |
34 UI_SOFT_RESET, | 35 UI_SOFT_RESET, |
35 UI_RELOAD, | 36 UI_RELOAD, |
36 UI_SMS_PAUSE, | 37 UI_SMS_PAUSE, |
37 UI_SCREENSHOT, | 38 UI_SCREENSHOT, |
38 UI_EXIT | 39 UI_EXIT, |
40 UI_PLANE_DEBUG | |
39 } ui_action; | 41 } ui_action; |
40 | 42 |
41 typedef struct { | 43 typedef struct { |
42 uint8_t bind_type; | 44 uint8_t bind_type; |
43 uint8_t subtype_a; | 45 uint8_t subtype_a; |
370 } | 372 } |
371 #ifndef DISABLE_NUKLEAR | 373 #ifndef DISABLE_NUKLEAR |
372 } | 374 } |
373 #endif | 375 #endif |
374 break; | 376 break; |
377 case UI_PLANE_DEBUG: { | |
378 vdp_context *vdp = NULL; | |
379 if (current_system->type == SYSTEM_GENESIS) { | |
380 genesis_context *gen = (genesis_context *)current_system; | |
381 vdp = gen->vdp; | |
382 } else if (current_system->type == SYSTEM_SMS) { | |
383 sms_context *sms = (sms_context *)current_system; | |
384 vdp = sms->vdp; | |
385 } | |
386 if (vdp) { | |
387 vdp_toggle_debug_view(vdp, VDP_DEBUG_PLANE); | |
388 } | |
389 break; | |
390 } | |
375 } | 391 } |
376 break; | 392 break; |
377 } | 393 } |
378 } | 394 } |
379 | 395 |
573 *subtype_a = UI_SMS_PAUSE; | 589 *subtype_a = UI_SMS_PAUSE; |
574 } else if (!strcmp(target + 3, "screenshot")) { | 590 } else if (!strcmp(target + 3, "screenshot")) { |
575 *subtype_a = UI_SCREENSHOT; | 591 *subtype_a = UI_SCREENSHOT; |
576 } else if(!strcmp(target + 3, "exit")) { | 592 } else if(!strcmp(target + 3, "exit")) { |
577 *subtype_a = UI_EXIT; | 593 *subtype_a = UI_EXIT; |
594 } else if (!strcmp(target + 3, "plane_debug")) { | |
595 *subtype_a = UI_PLANE_DEBUG; | |
578 } else { | 596 } else { |
579 warning("Unreconized UI binding type %s\n", target); | 597 warning("Unreconized UI binding type %s\n", target); |
580 return 0; | 598 return 0; |
581 } | 599 } |
582 return BIND_UI; | 600 return BIND_UI; |