Move input_key_pressed to input_common.h

This commit is contained in:
twinaphex 2014-09-16 07:02:57 +02:00
parent 29d533773c
commit 191f0b6383
2 changed files with 19 additions and 20 deletions

View File

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

View File

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