From e6eeb8e5599cdd0ac3a24d80b61a667c7bd79c12 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 1 Dec 2016 02:23:10 +0100 Subject: [PATCH] Simplify check_input_driver_block_hotkey --- input/input_driver.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 17db604604..f23ba4f42a 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -539,12 +539,12 @@ static bool check_input_driver_block_hotkey(bool enable_hotkey) bool kb_mapping_is_blocked = current_input->keyboard_mapping_is_blocked && current_input->keyboard_mapping_is_blocked(current_input_data); + input_driver_block_hotkey = false; + /* Don't block the check to RARCH_ENABLE_HOTKEY * unless we're really supposed to. */ if (kb_mapping_is_blocked) input_driver_block_hotkey = true; - else - input_driver_block_hotkey = false; /* If we haven't bound anything to this, * always allow hotkeys. */ @@ -556,10 +556,8 @@ static bool check_input_driver_block_hotkey(bool enable_hotkey) || (autoconf_bind->joykey != NO_BTN) || (autoconf_bind->joyaxis != AXIS_NONE); - if (kb_mapping_is_blocked || (use_hotkey_enable && !enable_hotkey)) + if (use_hotkey_enable && !enable_hotkey) input_driver_block_hotkey = true; - else - input_driver_block_hotkey = false; /* If we hold ENABLE_HOTKEY button, block all libretro input to allow * hotkeys to be bound to same keys as RetroPad. */