diff io.c @ 1377:e587f16e7d3d

Implemented SMS pause button
author Michael Pavone <pavone@retrodev.com>
date Sun, 28 May 2017 21:03:55 -0700
parents 040c5600e2d9
children 65f1d6558e9e
line wrap: on
line diff
--- a/io.c	Sun May 28 21:02:47 2017 -0700
+++ b/io.c	Sun May 28 21:03:55 2017 -0700
@@ -18,6 +18,7 @@
 #include "io.h"
 #include "blastem.h"
 #include "genesis.h"
+#include "sms.h"
 #include "render.h"
 #include "util.h"
 
@@ -74,6 +75,7 @@
 	UI_TOGGLE_KEYBOARD_CAPTURE,
 	UI_TOGGLE_FULLSCREEN,
 	UI_SOFT_RESET,
+	UI_SMS_PAUSE,
 	UI_SCREENSHOT,
 	UI_EXIT
 } ui_action;
@@ -493,6 +495,12 @@
 		case UI_SOFT_RESET:
 			current_system->soft_reset(current_system);
 			break;
+		case UI_SMS_PAUSE:
+			if (current_system->type == SYSTEM_SMS) {
+				sms_context *sms = (sms_context *)current_system;
+				vdp_pbc_pause(sms->vdp);
+			}
+			break;
 		case UI_SCREENSHOT: {
 			char *screenshot_base = tern_find_path(config, "ui\0screenshot_path\0", TVAL_PTR).ptrval;
 			if (!screenshot_base) {
@@ -690,6 +698,8 @@
 			*ui_out = UI_TOGGLE_FULLSCREEN;
 		} else if (!strcmp(target + 3, "soft_reset")) {
 			*ui_out = UI_SOFT_RESET;
+		} else if (!strcmp(target + 3, "sms_pause")) {
+			*ui_out = UI_SMS_PAUSE;
 		} else if (!strcmp(target + 3, "screenshot")) {
 			*ui_out = UI_SCREENSHOT;
 		} else if(!strcmp(target + 3, "exit")) {