Skip to content

Commit

Permalink
Merge pull request libretro#1311 from gizmo98/patch-3
Browse files Browse the repository at this point in the history
check_block_hotkey(): Add RARCH_ENABLE_HOTKEY check of first autoconf_bi...
  • Loading branch information
inactive123 committed Jan 3, 2015
2 parents 24ebb87 + 5fdb900 commit 9622457
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runloop.c
Expand Up @@ -536,6 +536,8 @@ static void check_block_hotkey(bool enable_hotkey)
bool use_hotkey_enable;
static const struct retro_keybind *bind =
&g_settings.input.binds[0][RARCH_ENABLE_HOTKEY];
static const struct retro_keybind *autoconf_bind =
&g_settings.input.autoconf_binds[0][RARCH_ENABLE_HOTKEY];

/* Don't block the check to RARCH_ENABLE_HOTKEY
* unless we're really supposed to. */
Expand All @@ -544,7 +546,10 @@ static void check_block_hotkey(bool enable_hotkey)
// If we haven't bound anything to this, always allow hotkeys.
use_hotkey_enable = bind->key != RETROK_UNKNOWN ||
bind->joykey != NO_BTN ||
bind->joyaxis != AXIS_NONE;
bind->joyaxis != AXIS_NONE ||
autoconf_bind->key != RETROK_UNKNOWN ||
autoconf_bind->joykey != NO_BTN ||
autoconf_bind->joyaxis != AXIS_NONE;;

driver.block_hotkey = driver.block_input ||
(use_hotkey_enable && !enable_hotkey);
Expand Down

0 comments on commit 9622457

Please sign in to comment.