mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-07 10:57:44 +00:00
Create input_driver_key_pressed
This commit is contained in:
parent
71e927020c
commit
c274ab94a0
@ -231,3 +231,12 @@ void input_driver_poll(void)
|
|||||||
if (driver->input && driver->input_data && driver->input->poll)
|
if (driver->input && driver->input_data && driver->input->poll)
|
||||||
driver->input->poll(driver->input_data);
|
driver->input->poll(driver->input_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool input_driver_key_pressed(int key)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
|
||||||
|
if (driver && driver->input && driver->input->key_pressed)
|
||||||
|
return driver->input->key_pressed(driver->input_data, key);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -142,6 +142,8 @@ int16_t input_driver_state(const struct retro_keybind **retro_keybinds,
|
|||||||
|
|
||||||
void input_driver_poll(void);
|
void input_driver_poll(void);
|
||||||
|
|
||||||
|
bool input_driver_key_pressed(int key);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -848,8 +848,7 @@ static INLINE retro_input_t input_keys_pressed(void)
|
|||||||
global->turbo_count++;
|
global->turbo_count++;
|
||||||
|
|
||||||
driver->block_libretro_input = check_block_hotkey(
|
driver->block_libretro_input = check_block_hotkey(
|
||||||
driver->input->key_pressed(driver->input_data,
|
input_driver_key_pressed(RARCH_ENABLE_HOTKEY));
|
||||||
RARCH_ENABLE_HOTKEY));
|
|
||||||
|
|
||||||
for (i = 0; i < settings->input.max_users; i++)
|
for (i = 0; i < settings->input.max_users; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user