mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Move input_key_pressed to input_common.h
This commit is contained in:
parent
29d533773c
commit
191f0b6383
20
driver.h
20
driver.h
@ -667,26 +667,6 @@ extern menu_ctx_driver_t menu_ctx_lakka;
|
||||
extern menu_ctx_driver_backend_t menu_ctx_backend_common;
|
||||
extern menu_ctx_driver_backend_t menu_ctx_backend_lakka;
|
||||
|
||||
static inline bool input_key_pressed_func(int key)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!driver.block_hotkey)
|
||||
ret = driver.input->key_pressed(driver.input_data, key);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
ret = ret || (driver.overlay_state.buttons & (1ULL << key));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
if (driver.command)
|
||||
ret = ret || rarch_cmd_get(driver.command, key);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -194,6 +194,25 @@ void input_push_analog_dpad(struct retro_keybind *binds, unsigned mode);
|
||||
|
||||
void input_pop_analog_dpad(struct retro_keybind *binds);
|
||||
|
||||
static inline bool input_key_pressed_func(int key)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!driver.block_hotkey)
|
||||
ret = driver.input->key_pressed(driver.input_data, key);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
ret = ret || (driver.overlay_state.buttons & (1ULL << key));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
if (driver.command)
|
||||
ret = ret || rarch_cmd_get(driver.command, key);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user