mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +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)
|
||||
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);
|
||||
|
||||
bool input_driver_key_pressed(int key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -848,8 +848,7 @@ static INLINE retro_input_t input_keys_pressed(void)
|
||||
global->turbo_count++;
|
||||
|
||||
driver->block_libretro_input = check_block_hotkey(
|
||||
driver->input->key_pressed(driver->input_data,
|
||||
RARCH_ENABLE_HOTKEY));
|
||||
input_driver_key_pressed(RARCH_ENABLE_HOTKEY));
|
||||
|
||||
for (i = 0; i < settings->input.max_users; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user