Name some functions the same across drivers

This commit is contained in:
twinaphex 2015-07-12 08:51:13 +02:00
parent fbc504acfe
commit 2a881d64be
5 changed files with 12 additions and 13 deletions

View File

@ -173,7 +173,7 @@ static int16_t linuxraw_analog_pressed(linuxraw_input_t *linuxraw,
return pressed_plus + pressed_minus;
}
static bool linuxraw_bind_button_pressed(void *data, int key)
static bool linuxraw_input_key_pressed(void *data, int key)
{
linuxraw_input_t *linuxraw = (linuxraw_input_t*)data;
settings_t *settings = config_get_ptr();
@ -301,7 +301,7 @@ input_driver_t input_linuxraw = {
linuxraw_input_init,
linuxraw_input_poll,
linuxraw_input_state,
linuxraw_bind_button_pressed,
linuxraw_input_key_pressed,
linuxraw_input_free,
NULL,
NULL,

View File

@ -82,7 +82,8 @@ static bool rwebinput_key_pressed(rwebinput_input_t *rwebinput, int key)
return ret;
}
static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput, const struct retro_keybind *binds, unsigned id)
static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput,
const struct retro_keybind *binds, unsigned id)
{
if (id < RARCH_BIND_LIST_END)
{
@ -93,7 +94,7 @@ static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput, const struct retr
return false;
}
static bool rwebinput_bind_button_pressed(void *data, int key)
static bool rwebinput_key_pressed(void *data, int key)
{
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
settings_t *settings = config_get_ptr();
@ -248,7 +249,7 @@ input_driver_t input_rwebinput = {
rwebinput_input_init,
rwebinput_input_poll,
rwebinput_input_state,
rwebinput_bind_button_pressed,
rwebinput_key_pressed,
rwebinput_input_free,
NULL,
NULL,

View File

@ -282,7 +282,7 @@ static int16_t sdl_analog_pressed(sdl_input_t *sdl, const struct retro_keybind *
return pressed_plus + pressed_minus;
}
static bool sdl_bind_button_pressed(void *data, int key)
static bool sdl_input_key_pressed(void *data, int key)
{
settings_t *settings = config_get_ptr();
const struct retro_keybind *binds = settings->input.binds[0];
@ -582,7 +582,7 @@ input_driver_t input_sdl = {
sdl_input_init,
sdl_input_poll,
sdl_input_state,
sdl_bind_button_pressed,
sdl_input_key_pressed,
sdl_input_free,
NULL,
NULL,

View File

@ -552,7 +552,7 @@ static int16_t udev_input_state(void *data, const struct retro_keybind **binds,
return 0;
}
static bool udev_input_bind_button_pressed(void *data, int key)
static bool udev_input_key_pressed(void *data, int key)
{
udev_input_t *udev = (udev_input_t*)data;
settings_t *settings = config_get_ptr();
@ -880,7 +880,7 @@ input_driver_t input_udev = {
udev_input_init,
udev_input_poll,
udev_input_state,
udev_input_bind_button_pressed,
udev_input_key_pressed,
udev_input_free,
NULL,
NULL,

View File

@ -257,12 +257,10 @@ static int16_t x_pressed_analog(x11_input_t *x11,
return pressed_plus + pressed_minus;
}
static bool x_bind_button_pressed(void *data, int key)
static bool x_input_key_pressed(void *data, int key)
{
x11_input_t *x11 = (x11_input_t*)data;
settings_t *settings = config_get_ptr();
if (!x11)
return false;
return x_is_pressed(x11, settings->input.binds[0], key) ||
input_joypad_pressed(x11->joypad, 0, settings->input.binds[0], key);
}
@ -547,7 +545,7 @@ input_driver_t input_x = {
x_input_init,
x_input_poll,
x_input_state,
x_bind_button_pressed,
x_input_key_pressed,
x_input_free,
NULL,
NULL,