mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Get rid of useless wrapper function around button presses
This commit is contained in:
parent
6575c9a344
commit
31a54223e5
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user