Get rid of useless wrapper function around button presses

This commit is contained in:
twinaphex 2015-02-15 00:42:40 +01:00
parent 6575c9a344
commit 31a54223e5
2 changed files with 2 additions and 23 deletions

View File

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

View File

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