Get rid of input_driver_key_pressed

This commit is contained in:
twinaphex 2015-07-17 03:09:12 +02:00
parent f1d8f98c90
commit a2af5252c1
4 changed files with 8 additions and 15 deletions

View File

@ -781,9 +781,14 @@ static void android_input_handle_user(void *data)
static void android_input_poll(void *data)
{
int ident;
driver_t *driver = driver_get_ptr();
const input_driver_t *input = driver ? (const input_driver_t*)driver->input : NULL;
if (!input)
return;
while ((ident =
ALooper_pollAll((input_driver_key_pressed(RARCH_PAUSE_TOGGLE))
ALooper_pollAll((input->key_pressed(driver->input_data, RARCH_PAUSE_TOGGLE))
? -1 : 0,
NULL, NULL, NULL)) >= 0)
{

View File

@ -199,17 +199,6 @@ bool input_driver_set_rumble_state(unsigned port,
return false;
}
bool input_driver_key_pressed(int key)
{
driver_t *driver = driver_get_ptr();
const input_driver_t *input = input_get_ptr(driver);
if (!driver || !input)
return false;
return input->key_pressed(driver->input_data, key);
}
retro_input_t input_driver_keys_pressed(void)
{
int key;

View File

@ -144,8 +144,6 @@ retro_input_t input_driver_keys_pressed(void);
int16_t input_driver_state(const struct retro_keybind **retro_keybinds,
unsigned port, unsigned device, unsigned index, unsigned id);
bool input_driver_key_pressed(int key);
uint64_t input_driver_get_capabilities(void);
const input_device_driver_t * input_driver_get_joypad_driver(void);

View File

@ -754,7 +754,8 @@ static INLINE retro_input_t input_keys_pressed(driver_t *driver,
global->turbo_count++;
driver->block_libretro_input = check_block_hotkey(driver,
settings, input_driver_key_pressed(RARCH_ENABLE_HOTKEY));
settings, driver->input->key_pressed(
driver->input_data, RARCH_ENABLE_HOTKEY));
for (i = 0; i < settings->input.max_users; i++)
{