From 5d87c697bbbb3a14be9a4aced1e40fe6b40b6208 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 12 Jul 2015 09:08:27 +0200 Subject: [PATCH] Optimize input_driver_keys_pressed and make it possible to pass more 'keys' to the input key pressed callback than just the standard buttons --- input/input_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 640f6e51b9..4d39a60bca 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -216,12 +216,12 @@ retro_input_t input_driver_keys_pressed(void) retro_input_t ret = 0; driver_t *driver = driver_get_ptr(); const input_driver_t *input = input_get_ptr(driver); + bool handle_key_pressed = !driver->block_libretro_input || !driver->block_hotkey; for (key = 0; key < RARCH_BIND_LIST_END; key++) { bool state = false; - if ((!driver->block_libretro_input && (key < RARCH_FIRST_META_KEY)) || - !driver->block_hotkey) + if (handle_key_pressed) state = input->key_pressed(driver->input_data, key); #ifdef HAVE_OVERLAY