diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-11-09 20:16:09 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-11-09 20:16:09 -0800 |
commit | c33b9bc0bbf7498b4f43d235efafcbe22e1d9824 (patch) | |
tree | afd5535abad547849171271f43908666833a09e2 /bindings.c | |
parent | 9b4c5db24f424bb708c92801141694c9fc8f8db1 (diff) |
Added VRAM debug window
Diffstat (limited to 'bindings.c')
-rw-r--r-- | bindings.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -37,7 +37,8 @@ typedef enum { UI_SMS_PAUSE, UI_SCREENSHOT, UI_EXIT, - UI_PLANE_DEBUG + UI_PLANE_DEBUG, + UI_VRAM_DEBUG } ui_action; typedef struct { @@ -388,6 +389,20 @@ void handle_binding_up(keybinding * binding) } break; } + case UI_VRAM_DEBUG: { + vdp_context *vdp = NULL; + if (current_system->type == SYSTEM_GENESIS) { + genesis_context *gen = (genesis_context *)current_system; + vdp = gen->vdp; + } else if (current_system->type == SYSTEM_SMS) { + sms_context *sms = (sms_context *)current_system; + vdp = sms->vdp; + } + if (vdp) { + vdp_toggle_debug_view(vdp, VDP_DEBUG_VRAM); + } + break; + } } break; } @@ -593,7 +608,9 @@ int parse_binding_target(int device_num, char * target, tern_node * padbuttons, *subtype_a = UI_EXIT; } else if (!strcmp(target + 3, "plane_debug")) { *subtype_a = UI_PLANE_DEBUG; - } else { + } else if (!strcmp(target + 3, "vram_debug")) { + *subtype_a = UI_VRAM_DEBUG; + } else { warning("Unreconized UI binding type %s\n", target); return 0; } |