summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-08-23 21:18:17 -0700
committerMichael Pavone <pavone@retrodev.com>2017-08-23 21:18:17 -0700
commitfacf0dd0e1606223da276bbf3984c55ca84e83d9 (patch)
tree1034b38f7f86d1f9a6de1ae7ae1d8cbef01d2930 /io.c
parentf46eaaf8651d2c763de76ce82999d9d7e1230719 (diff)
Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index 75d2a98..45a8218 100644
--- a/io.c
+++ b/io.c
@@ -77,6 +77,7 @@ typedef enum {
UI_TOGGLE_KEYBOARD_CAPTURE,
UI_TOGGLE_FULLSCREEN,
UI_SOFT_RESET,
+ UI_RELOAD,
UI_SMS_PAUSE,
UI_SCREENSHOT,
UI_EXIT
@@ -498,6 +499,9 @@ void handle_binding_up(keybinding * binding)
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 @@ int parse_binding_target(char * target, tern_node * padbuttons, tern_node *mouse
*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")) {