Mercurial > repos > blastem
diff bindings.c @ 1634:e397766c3028
Added VRAM debug window
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 09 Nov 2018 20:16:09 -0800 |
parents | c4ba3177b72d |
children | f27142c48567 |
line wrap: on
line diff
--- a/bindings.c Fri Nov 09 09:26:07 2018 -0800 +++ b/bindings.c Fri Nov 09 20:16:09 2018 -0800 @@ -37,7 +37,8 @@ UI_SMS_PAUSE, UI_SCREENSHOT, UI_EXIT, - UI_PLANE_DEBUG + UI_PLANE_DEBUG, + UI_VRAM_DEBUG } ui_action; typedef struct { @@ -388,6 +389,20 @@ } 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 @@ *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; }