diff io.c @ 1438:e2bd03ed3190

Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu
author Michael Pavone <pavone@retrodev.com>
date Wed, 23 Aug 2017 21:18:17 -0700
parents 178de1432291
children cd6e566eb6b9
line wrap: on
line diff
--- a/io.c	Mon Aug 21 23:49:56 2017 -0700
+++ b/io.c	Wed Aug 23 21:18:17 2017 -0700
@@ -77,6 +77,7 @@
 	UI_TOGGLE_KEYBOARD_CAPTURE,
 	UI_TOGGLE_FULLSCREEN,
 	UI_SOFT_RESET,
+	UI_RELOAD,
 	UI_SMS_PAUSE,
 	UI_SCREENSHOT,
 	UI_EXIT
@@ -498,6 +499,9 @@
 		case UI_SOFT_RESET:
 			current_system->soft_reset(current_system);
 			break;
+		case UI_RELOAD:
+			reload_media();
+			break;
 		case UI_SMS_PAUSE:
 			if (current_system->type == SYSTEM_SMS) {
 				sms_context *sms = (sms_context *)current_system;
@@ -714,6 +718,8 @@
 			*ui_out = UI_TOGGLE_FULLSCREEN;
 		} else if (!strcmp(target + 3, "soft_reset")) {
 			*ui_out = UI_SOFT_RESET;
+		} else if (!strcmp(target + 3, "reload")) {
+			*ui_out = UI_RELOAD;
 		} else if (!strcmp(target + 3, "sms_pause")) {
 			*ui_out = UI_SMS_PAUSE;
 		} else if (!strcmp(target + 3, "screenshot")) {