Permalink
Browse files

retroarch - rework our hotkey hack for latest upstream retroarch code…

… - fixes #1832
  • Loading branch information...
1 parent 4aedb85 commit 45de0a51d9e71abb094f447548c31e959e469d0a @joolswills joolswills committed Jan 10, 2017
Showing with 20 additions and 21 deletions.
  1. +1 −1 scriptmodules/emulators/retroarch.sh
  2. +19 −20 scriptmodules/emulators/retroarch/01_hotkey_hack.diff
@@ -30,7 +30,7 @@ function sources_retroarch() {
if isPlatform "mali"; then
sed -i 's|struct mali_native_window native_window|fbdev_window native_window|' gfx/drivers_context/mali_fbdev_ctx.c
fi
- #applyPatch "$md_data/01_hotkey_hack.diff"
+ applyPatch "$md_data/01_hotkey_hack.diff"
applyPatch "$md_data/02_disable_search.diff"
}
@@ -1,8 +1,8 @@
diff --git a/input/input_driver.c b/input/input_driver.c
-index 8d26bcd..30a0832 100644
+index 43b0d37..570a4f5 100644
--- a/input/input_driver.c
+++ b/input/input_driver.c
-@@ -120,6 +120,10 @@ static bool input_driver_nonblock_state = false;
+@@ -119,6 +119,10 @@ static bool input_driver_nonblock_state = false;
static bool input_driver_flushing_input = false;
static bool input_driver_data_own = false;
@@ -13,23 +13,22 @@ index 8d26bcd..30a0832 100644
/**
* input_driver_find_handle:
* @idx : index of driver to get handle to.
-@@ -807,9 +811,17 @@ uint64_t input_keys_pressed(
- {
- if (current_input->input_state(current_input_data, &binds, 0,
- RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY))
-- input_driver_block_libretro_input = true;
-- else
-+ {
-+ if (hotkey_counter < HOTKEY_DELAY)
-+ hotkey_counter++;
-+
-+ if (hotkey_counter == HOTKEY_DELAY)
-+ input_driver_block_libretro_input = true;
-+ }
-+ else {
-+ hotkey_counter = 0;
- input_driver_block_hotkey = true;
-+ }
+@@ -611,9 +615,16 @@ static INLINE bool input_menu_keys_pressed_internal(
+ joypad_info.joy_idx = 0; \
+ joypad_info.auto_binds = settings->input.autoconf_binds[0]; \
+ if (enable_hotkey_valid && current_input->input_state(current_input_data, joypad_info, binds, 0, RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY)) \
++ { \
++ if (hotkey_counter < HOTKEY_DELAY) \
++ hotkey_counter++; \
++ if (hotkey_counter == HOTKEY_DELAY) \
+ input_driver_block_libretro_input = true; \
+- else \
+- input_driver_block_hotkey = true; \
++ } \
++ else { \
++ hotkey_counter = 0; \
++ input_driver_block_hotkey = true; \
++ } \
}
- /* Allows rarch_focus_toggle hotkey to still work even tough every hotkey is blocked */
+ #define input_keys_pressed_end() \

0 comments on commit 45de0a5

Please sign in to comment.