mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
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:
parent
2a881d64be
commit
5d87c697bb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user