Optimize input_driver_keys_pressed and make it possible to

pass more 'keys' to the input key pressed callback than just
the standard buttons
This commit is contained in:
twinaphex 2015-07-12 09:08:27 +02:00
parent 2a881d64be
commit 5d87c697bb

View File

@ -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