From facf0dd0e1606223da276bbf3984c55ca84e83d9 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 23 Aug 2017 21:18:17 -0700 Subject: Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu --- io.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'io.c') 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")) { -- cgit v1.2.3