diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index 78dee21805..f640b84d65 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -419,8 +419,8 @@ static void udev_input_poll(void *data) if (events[i].events & EPOLLIN) { int j, len; - struct input_device *device = (struct input_device*)events[i].data.ptr; struct input_event input_events[32]; + struct input_device *device = (struct input_device*)events[i].data.ptr; while ((len = read(device->fd, input_events, sizeof(input_events))) > 0) { diff --git a/input/input_joypad.c b/input/input_joypad.c index 5c0b78db2e..148798433b 100644 --- a/input/input_joypad.c +++ b/input/input_joypad.c @@ -79,7 +79,7 @@ bool input_joypad_set_rumble(const rarch_joypad_driver_t *drv, * Returns: true (1) if key was pressed, otherwise * false (0). **/ -static bool input_joypad_is_pressed( +bool input_joypad_pressed( const rarch_joypad_driver_t *drv, unsigned port, const struct retro_keybind *binds, @@ -116,27 +116,6 @@ static bool input_joypad_is_pressed( return scaled_axis > g_settings.input.axis_threshold; } -/** - * input_joypad_pressed: - * @drv : Joypad driver handle. - * @port : User number. - * @binds : Binds of user. - * @key : Identifier of key. - * - * Checks if key (@key) was being pressed by user - * with number @port with provided keybinds (@binds). - * - * Returns: true (1) if key was pressed, otherwise - * false (0). - **/ -bool input_joypad_pressed(const rarch_joypad_driver_t *drv, - unsigned port, const struct retro_keybind *binds, unsigned key) -{ - if (!input_joypad_is_pressed(drv, port, binds, key)) - return false; - return true; -} - /** * input_joypad_analog: * @drv : Joypad driver handle.