summaryrefslogtreecommitdiff
path: root/bindings.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2018-11-09 20:16:09 -0800
committerMichael Pavone <pavone@retrodev.com>2018-11-09 20:16:09 -0800
commitc33b9bc0bbf7498b4f43d235efafcbe22e1d9824 (patch)
treeafd5535abad547849171271f43908666833a09e2 /bindings.c
parent9b4c5db24f424bb708c92801141694c9fc8f8db1 (diff)
Added VRAM debug window
Diffstat (limited to 'bindings.c')
-rw-r--r--bindings.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/bindings.c b/bindings.c
index 8ab1b61..00019d2 100644
--- a/bindings.c
+++ b/bindings.c
@@ -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;
}