diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 2eb4884bce..b4858bb9c5 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1429,11 +1429,6 @@ static int16_t android_input_state(void *data, return 0; } -static bool android_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static void android_input_free_input(void *data) { android_input_t *android = (android_input_t*)data; @@ -1587,7 +1582,7 @@ input_driver_t input_android = { android_input_init, android_input_poll, android_input_state, - android_input_meta_key_pressed, + NULL, /* meta_key_pressed */ android_input_free_input, android_input_set_sensor_state, android_input_get_sensor_input, diff --git a/input/drivers/cocoa_input.c b/input/drivers/cocoa_input.c index f14932ab23..19928e924e 100644 --- a/input/drivers/cocoa_input.c +++ b/input/drivers/cocoa_input.c @@ -328,11 +328,6 @@ static int16_t cocoa_input_state(void *data, return 0; } -static bool cocoa_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static void cocoa_input_free(void *data) { unsigned i; @@ -426,7 +421,7 @@ input_driver_t input_cocoa = { cocoa_input_init, cocoa_input_poll, cocoa_input_state, - cocoa_input_meta_key_pressed, + NULL, /* meta_key_pressed */ cocoa_input_free, NULL, NULL, diff --git a/input/drivers/dinput.c b/input/drivers/dinput.c index 6550bec50e..e4c73fb486 100644 --- a/input/drivers/dinput.c +++ b/input/drivers/dinput.c @@ -364,11 +364,6 @@ static int16_t dinput_pressed_analog(struct dinput_input *di, return pressed_plus + pressed_minus; } -static bool dinput_meta_key_pressed(void *data, int key) -{ - return false; -} - static int16_t dinput_lightgun_aiming_state( struct dinput_input *di, unsigned idx, unsigned id ) { const int edge_detect = 32700; @@ -925,7 +920,7 @@ input_driver_t input_dinput = { dinput_init, dinput_poll, dinput_input_state, - dinput_meta_key_pressed, + NULL, /* meta_key_pressed */ dinput_free, NULL, NULL, diff --git a/input/drivers/dos_input.c b/input/drivers/dos_input.c index e985d5f5b5..527e074f09 100644 --- a/input/drivers/dos_input.c +++ b/input/drivers/dos_input.c @@ -86,11 +86,6 @@ static void* dos_input_init(const char *joypad_driver) return dos; } -static bool dos_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static uint64_t dos_input_get_capabilities(void *data) { uint64_t caps = 0; @@ -129,7 +124,7 @@ input_driver_t input_dos = { dos_input_init, dos_input_poll, dos_input_state, - dos_input_meta_key_pressed, + NULL, /* meta_key_pressed */ dos_input_free_input, NULL, NULL, diff --git a/input/drivers/linuxraw_input.c b/input/drivers/linuxraw_input.c index 5c2b780e9a..6bd9b9ab0c 100644 --- a/input/drivers/linuxraw_input.c +++ b/input/drivers/linuxraw_input.c @@ -93,11 +93,6 @@ static int16_t linuxraw_analog_pressed(linuxraw_input_t *linuxraw, return pressed_plus + pressed_minus; } -static bool linuxraw_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static int16_t linuxraw_input_state(void *data, rarch_joypad_info_t joypad_info, const struct retro_keybind **binds, unsigned port, @@ -223,7 +218,7 @@ input_driver_t input_linuxraw = { linuxraw_input_init, linuxraw_input_poll, linuxraw_input_state, - linuxraw_input_meta_key_pressed, + NULL, /* meta_key_pressed */ linuxraw_input_free, NULL, NULL, diff --git a/input/drivers/ps3_input.c b/input/drivers/ps3_input.c index 8edc841960..e3b1a46b8e 100644 --- a/input/drivers/ps3_input.c +++ b/input/drivers/ps3_input.c @@ -179,11 +179,6 @@ static void* ps3_input_init(const char *joypad_driver) return ps3; } -static bool ps3_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static uint64_t ps3_input_get_capabilities(void *data) { (void)data; @@ -266,7 +261,7 @@ input_driver_t input_ps3 = { ps3_input_init, ps3_input_poll, ps3_input_state, - ps3_input_meta_key_pressed, + NULL, /* meta_key_pressed */ ps3_input_free_input, ps3_input_set_sensor_state, NULL, diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index 5ae1e2740d..6c28d99b3f 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -803,11 +803,6 @@ static int16_t qnx_input_state(void *data, return 0; } -static bool qnx_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static void qnx_input_free_input(void *data) { if (data) @@ -853,7 +848,7 @@ input_driver_t input_qnx = { qnx_input_init, qnx_input_poll, qnx_input_state, - qnx_input_meta_key_pressed, + NULL, /* meta_key_pressed */ qnx_input_free_input, NULL, NULL, diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c index 3506b7e029..1f74eebc2b 100644 --- a/input/drivers/rwebinput_input.c +++ b/input/drivers/rwebinput_input.c @@ -81,13 +81,6 @@ static bool rwebinput_key_pressed_internal(void *data, int key) return ret; } -static bool rwebinput_meta_key_pressed(void *data, int key) -{ - (void)data; - (void)key; - return false; -} - static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput, const struct retro_keybind *binds, unsigned id) { @@ -254,7 +247,7 @@ input_driver_t input_rwebinput = { rwebinput_input_init, rwebinput_input_poll, rwebinput_input_state, - rwebinput_meta_key_pressed, + NULL, /* meta_key_pressed */ rwebinput_input_free, NULL, NULL, diff --git a/input/drivers/sdl_input.c b/input/drivers/sdl_input.c index 5376f2b9ce..856a75acc1 100644 --- a/input/drivers/sdl_input.c +++ b/input/drivers/sdl_input.c @@ -89,11 +89,6 @@ static int16_t sdl_analog_pressed(sdl_input_t *sdl, const struct retro_keybind * return pressed_plus + pressed_minus; } -static bool sdl_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static int16_t sdl_joypad_device_state(sdl_input_t *sdl, rarch_joypad_info_t joypad_info, const struct retro_keybind *binds, @@ -409,7 +404,7 @@ input_driver_t input_sdl = { sdl_input_init, sdl_input_poll, sdl_input_state, - sdl_input_meta_key_pressed, + NULL, /* meta_key_pressed */ sdl_input_free, NULL, NULL, diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index a22ba8636d..24a90331b4 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -907,11 +907,6 @@ static int16_t udev_input_state(void *data, return 0; } -static bool udev_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static void udev_input_free(void *data) { unsigned i; @@ -1160,7 +1155,7 @@ input_driver_t input_udev = { udev_input_init, udev_input_poll, udev_input_state, - udev_input_meta_key_pressed, + NULL, /* meta_key_pressed */ udev_input_free, NULL, NULL, diff --git a/input/drivers/wayland_input.c b/input/drivers/wayland_input.c index 6fab41d99f..0ba63f421b 100644 --- a/input/drivers/wayland_input.c +++ b/input/drivers/wayland_input.c @@ -320,19 +320,11 @@ static void input_wl_keyboard_mapping_set_block(void *data, bool value) wl->blocked = value; } -static bool input_wl_meta_key_pressed(void *data, int key) -{ - (void)data; - (void)key; - /* FIXME: What is this supposed to do? */ - return false; -} - input_driver_t input_wayland = { NULL, input_wl_poll, input_wl_state, - input_wl_meta_key_pressed, + NULL, /* meta_key_pressed */ input_wl_free, NULL, NULL, diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index 7bf5a752e0..be50f7c6c8 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -202,10 +202,7 @@ static void* wiiu_input_init(const char *joypad_driver) static bool wiiu_input_meta_key_pressed(void *data, int key) { - if (BIT64_GET(lifecycle_state, key)) - return true; - - return false; + return BIT64_GET(lifecycle_state, key); } static uint64_t wiiu_input_get_capabilities(void *data) diff --git a/input/drivers/winraw_input.c b/input/drivers/winraw_input.c index 2b15c53c1b..e6c7e0f066 100644 --- a/input/drivers/winraw_input.c +++ b/input/drivers/winraw_input.c @@ -762,11 +762,6 @@ static int16_t winraw_input_state(void *d, return 0; } -static bool winraw_meta_key_pressed(void *u1, int u2) -{ - return false; -} - static void winraw_free(void *d) { winraw_input_t *wr = (winraw_input_t*)d; @@ -841,7 +836,7 @@ input_driver_t input_winraw = { winraw_init, winraw_poll, winraw_input_state, - winraw_meta_key_pressed, + NULL, /* meta_key_pressed */ winraw_free, NULL, NULL, diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index 9e357870bf..dc75ebbcc6 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -179,11 +179,6 @@ static int16_t x_pressed_analog(x11_input_t *x11, return pressed_plus + pressed_minus; } -static bool x_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static int16_t x_lightgun_aiming_state( x11_input_t *x11, unsigned idx, unsigned id ) { const int edge_detect = 32700; @@ -531,7 +526,7 @@ input_driver_t input_x = { x_input_init, x_input_poll, x_input_state, - x_input_meta_key_pressed, + NULL, /* meta_key_pressed */ x_input_free, NULL, NULL, diff --git a/input/drivers/xdk_xinput_input.c b/input/drivers/xdk_xinput_input.c index a603d0ae62..8db6b6a447 100644 --- a/input/drivers/xdk_xinput_input.c +++ b/input/drivers/xdk_xinput_input.c @@ -94,11 +94,6 @@ static void *xdk_input_init(const char *joypad_driver) return xdk; } -static bool xdk_input_meta_key_pressed(void *data, int key) -{ - return false; -} - static uint64_t xdk_input_get_capabilities(void *data) { (void)data; @@ -178,7 +173,7 @@ input_driver_t input_xinput = { xdk_input_init, xdk_input_poll, xdk_input_state, - xdk_input_meta_key_pressed, + NULL, /* meta_key_pressed */ xdk_input_free_input, NULL, NULL, diff --git a/input/input_driver.c b/input/input_driver.c index 5d7cc0b430..ff42b7dca6 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -787,10 +787,13 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) static INLINE bool input_keys_pressed_iterate(unsigned i, retro_bits_t* p_new_state) { - if ((i >= RARCH_FIRST_META_KEY) && - current_input->meta_key_pressed(current_input_data, i) - ) - return true; + if (current_input->meta_key_pressed) + { + if ((i >= RARCH_FIRST_META_KEY) && + current_input->meta_key_pressed(current_input_data, i) + ) + return true; + } #ifdef HAVE_OVERLAY if (overlay_ptr &&