mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-09 19:02:37 +00:00
Get rid of now unused input_driver_key_pressed
This commit is contained in:
parent
0d5d3b27be
commit
ce98a4dd19
@ -1166,22 +1166,6 @@ static int16_t android_input_state(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool android_input_key_pressed(void *data, int key)
|
||||
{
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if(settings->input.binds[0][key].valid && android_keyboard_port_input_pressed(settings->input.binds[0],key))
|
||||
return true;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(android->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool android_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -1339,7 +1323,6 @@ input_driver_t input_android = {
|
||||
android_input_init,
|
||||
android_input_poll,
|
||||
android_input_state,
|
||||
android_input_key_pressed,
|
||||
android_input_meta_key_pressed,
|
||||
android_input_free_input,
|
||||
android_input_set_sensor_state,
|
||||
|
@ -311,29 +311,6 @@ static int16_t cocoa_input_state(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool cocoa_input_key_pressed(void *data, int key)
|
||||
{
|
||||
cocoa_input_data_t *apple = (cocoa_input_data_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->input.binds[0][key].valid && apple_input_is_pressed(0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
if (settings->input.binds[0][key].valid)
|
||||
{
|
||||
if (input_joypad_pressed(apple->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
#ifdef HAVE_MFI
|
||||
if (input_joypad_pressed(apple->sec_joypad, 0, settings->input.binds[0], key))
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool cocoa_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -429,7 +406,6 @@ input_driver_t input_cocoa = {
|
||||
cocoa_input_init,
|
||||
cocoa_input_poll,
|
||||
cocoa_input_state,
|
||||
cocoa_input_key_pressed,
|
||||
cocoa_input_meta_key_pressed,
|
||||
cocoa_input_free,
|
||||
NULL,
|
||||
|
@ -91,19 +91,6 @@ static void* ctr_input_initialize(void)
|
||||
return ctr;
|
||||
}
|
||||
|
||||
static bool ctr_input_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
ctr_input_t *ctr = (ctr_input_t*)data;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(ctr->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool ctr_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
if (BIT64_GET(lifecycle_state, key))
|
||||
@ -164,7 +151,6 @@ input_driver_t input_ctr = {
|
||||
ctr_input_initialize,
|
||||
ctr_input_poll,
|
||||
ctr_input_state,
|
||||
ctr_input_key_pressed,
|
||||
ctr_input_meta_key_pressed,
|
||||
ctr_input_free_input,
|
||||
NULL,
|
||||
|
@ -311,17 +311,6 @@ static int16_t dinput_pressed_analog(struct dinput_input *di,
|
||||
return pressed_plus + pressed_minus;
|
||||
}
|
||||
|
||||
static bool dinput_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (dinput_is_pressed((struct dinput_input*)data,
|
||||
settings->input.binds[0], 0, key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool dinput_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -765,7 +754,6 @@ input_driver_t input_dinput = {
|
||||
dinput_init,
|
||||
dinput_poll,
|
||||
dinput_input_state,
|
||||
dinput_key_pressed,
|
||||
dinput_meta_key_pressed,
|
||||
dinput_free,
|
||||
NULL,
|
||||
|
@ -96,19 +96,6 @@ static void gx_input_poll(void *data)
|
||||
gx->joypad->poll();
|
||||
}
|
||||
|
||||
static bool gx_input_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
gx_input_t *gx = (gx_input_t*)data;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(gx->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool gx_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
if (BIT64_GET(lifecycle_state, key))
|
||||
@ -169,7 +156,6 @@ input_driver_t input_gx = {
|
||||
gx_input_init,
|
||||
gx_input_poll,
|
||||
gx_input_state,
|
||||
gx_input_key_pressed,
|
||||
gx_input_meta_key_pressed,
|
||||
gx_input_free_input,
|
||||
NULL,
|
||||
|
@ -107,22 +107,6 @@ static int16_t linuxraw_analog_pressed(linuxraw_input_t *linuxraw,
|
||||
return pressed_plus + pressed_minus;
|
||||
}
|
||||
|
||||
static bool linuxraw_input_key_pressed(void *data, int key)
|
||||
{
|
||||
linuxraw_input_t *linuxraw = (linuxraw_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (linuxraw_is_pressed(linuxraw, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(linuxraw->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool linuxraw_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -249,7 +233,6 @@ input_driver_t input_linuxraw = {
|
||||
linuxraw_input_init,
|
||||
linuxraw_input_poll,
|
||||
linuxraw_input_state,
|
||||
linuxraw_input_key_pressed,
|
||||
linuxraw_input_meta_key_pressed,
|
||||
linuxraw_input_free,
|
||||
NULL,
|
||||
|
@ -42,14 +42,6 @@ static int16_t nullinput_input_state(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool nullinput_input_key_pressed(void *data, int key)
|
||||
{
|
||||
(void)data;
|
||||
(void)key;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool nullinput_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
(void)data;
|
||||
@ -107,7 +99,6 @@ input_driver_t input_null = {
|
||||
nullinput_input_init,
|
||||
nullinput_input_poll,
|
||||
nullinput_input_state,
|
||||
nullinput_input_key_pressed,
|
||||
nullinput_input_meta_key_pressed,
|
||||
nullinput_input_free_input,
|
||||
nullinput_set_sensor_state,
|
||||
|
@ -182,18 +182,6 @@ static void* ps3_input_init(void)
|
||||
return ps3;
|
||||
}
|
||||
|
||||
static bool ps3_input_key_pressed(void *data, int key)
|
||||
{
|
||||
ps3_input_t *ps3 = (ps3_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (input_joypad_pressed(ps3->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool ps3_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -281,7 +269,6 @@ input_driver_t input_ps3 = {
|
||||
ps3_input_init,
|
||||
ps3_input_poll,
|
||||
ps3_input_state,
|
||||
ps3_input_key_pressed,
|
||||
ps3_input_meta_key_pressed,
|
||||
ps3_input_free_input,
|
||||
ps3_input_set_sensor_state,
|
||||
|
@ -109,18 +109,6 @@ static void* psp_input_initialize(void)
|
||||
return psp;
|
||||
}
|
||||
|
||||
static bool psp_input_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
psp_input_t *psp = (psp_input_t*)data;
|
||||
|
||||
if (input_joypad_pressed(psp->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool psp_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return (BIT64_GET(lifecycle_state, key));
|
||||
@ -178,7 +166,6 @@ input_driver_t input_psp = {
|
||||
psp_input_initialize,
|
||||
psp_input_poll,
|
||||
psp_input_state,
|
||||
psp_input_key_pressed,
|
||||
psp_input_meta_key_pressed,
|
||||
psp_input_free_input,
|
||||
NULL,
|
||||
|
@ -794,18 +794,6 @@ static int16_t qnx_input_state(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool qnx_input_key_pressed(void *data, int key)
|
||||
{
|
||||
qnx_input_t *qnx = (qnx_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (input_joypad_pressed(qnx->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool qnx_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -875,7 +863,6 @@ input_driver_t input_qnx = {
|
||||
qnx_input_init,
|
||||
qnx_input_poll,
|
||||
qnx_input_state,
|
||||
qnx_input_key_pressed,
|
||||
qnx_input_meta_key_pressed,
|
||||
qnx_input_free_input,
|
||||
NULL,
|
||||
|
@ -107,6 +107,7 @@ static bool rwebinput_key_pressed(void *data, int key)
|
||||
settings_t *settings = config_get_ptr();
|
||||
return rwebinput_is_pressed(rwebinput, settings->input.binds[0], key);
|
||||
}
|
||||
|
||||
static int16_t rwebinput_mouse_state(rwebinput_input_t *rwebinput, unsigned id)
|
||||
{
|
||||
switch (id)
|
||||
@ -255,7 +256,6 @@ input_driver_t input_rwebinput = {
|
||||
rwebinput_input_init,
|
||||
rwebinput_input_poll,
|
||||
rwebinput_input_state,
|
||||
rwebinput_key_pressed,
|
||||
rwebinput_meta_key_pressed,
|
||||
rwebinput_input_free,
|
||||
NULL,
|
||||
|
@ -106,26 +106,6 @@ static int16_t sdl_analog_pressed(sdl_input_t *sdl, const struct retro_keybind *
|
||||
return pressed_plus + pressed_minus;
|
||||
}
|
||||
|
||||
static bool sdl_input_key_pressed(void *data, int key)
|
||||
{
|
||||
if (key >= 0 && key < RARCH_BIND_LIST_END)
|
||||
{
|
||||
sdl_input_t *sdl = (sdl_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const struct retro_keybind *binds = settings->input.binds[0];
|
||||
|
||||
if (sdl_is_pressed(sdl, 0, binds, key))
|
||||
return true;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(sdl->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool sdl_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -262,9 +242,7 @@ static int16_t sdl_input_state(void *data_, const struct retro_keybind **binds,
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
return sdl_joypad_device_state(data, binds, port, id, &type);
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
{
|
||||
return sdl_analog_device_state(data, binds, port, idx, id);
|
||||
}
|
||||
return sdl_analog_device_state(data, binds, port, idx, id);
|
||||
case RETRO_DEVICE_MOUSE:
|
||||
return sdl_mouse_device_state(data, id);
|
||||
case RETRO_DEVICE_POINTER:
|
||||
@ -437,7 +415,6 @@ input_driver_t input_sdl = {
|
||||
sdl_input_init,
|
||||
sdl_input_poll,
|
||||
sdl_input_state,
|
||||
sdl_input_key_pressed,
|
||||
sdl_input_meta_key_pressed,
|
||||
sdl_input_free,
|
||||
NULL,
|
||||
|
@ -548,23 +548,6 @@ static int16_t udev_input_state(void *data, const struct retro_keybind **binds,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool udev_input_key_pressed(void *data, int key)
|
||||
{
|
||||
udev_input_t *udev = (udev_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->input.binds[0][key].valid
|
||||
&& udev_input_is_pressed(settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(udev->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool udev_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -764,7 +747,6 @@ input_driver_t input_udev = {
|
||||
udev_input_init,
|
||||
udev_input_poll,
|
||||
udev_input_state,
|
||||
udev_input_key_pressed,
|
||||
udev_input_meta_key_pressed,
|
||||
udev_input_free,
|
||||
NULL,
|
||||
|
@ -94,19 +94,6 @@ static void* wiiu_input_initialize(void)
|
||||
return wiiu;
|
||||
}
|
||||
|
||||
static bool wiiu_input_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
wiiu_input_t *wiiu = (wiiu_input_t*)data;
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(wiiu->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool wiiu_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
if (BIT64_GET(lifecycle_state, key))
|
||||
@ -167,7 +154,6 @@ input_driver_t input_wiiu = {
|
||||
wiiu_input_initialize,
|
||||
wiiu_input_poll,
|
||||
wiiu_input_state,
|
||||
wiiu_input_key_pressed,
|
||||
wiiu_input_meta_key_pressed,
|
||||
wiiu_input_free_input,
|
||||
NULL,
|
||||
|
@ -119,21 +119,6 @@ static int16_t x_pressed_analog(x11_input_t *x11,
|
||||
return pressed_plus + pressed_minus;
|
||||
}
|
||||
|
||||
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 (settings->input.binds[0][key].valid && x_is_pressed(x11, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
if (input_joypad_pressed(x11->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool x_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -416,7 +401,6 @@ input_driver_t input_x = {
|
||||
x_input_init,
|
||||
x_input_poll,
|
||||
x_input_state,
|
||||
x_input_key_pressed,
|
||||
x_input_meta_key_pressed,
|
||||
x_input_free,
|
||||
NULL,
|
||||
|
@ -96,19 +96,6 @@ static void *xdk_input_init(void)
|
||||
return xdk;
|
||||
}
|
||||
|
||||
static bool xdk_input_key_pressed(void *data, int key)
|
||||
{
|
||||
xdk_input_t *xdk = (xdk_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->input.binds[0][key].valid &&
|
||||
input_joypad_pressed(xdk->joypad,
|
||||
0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool xdk_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return false;
|
||||
@ -190,7 +177,6 @@ input_driver_t input_xinput = {
|
||||
xdk_input_init,
|
||||
xdk_input_poll,
|
||||
xdk_input_state,
|
||||
xdk_input_key_pressed,
|
||||
xdk_input_meta_key_pressed,
|
||||
xdk_input_free_input,
|
||||
NULL,
|
||||
|
@ -88,14 +88,6 @@ static void* xenon360_input_init(void)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static bool xenon360_input_key_pressed(void *data, int key)
|
||||
{
|
||||
if (state & (UINT64_C(1) << key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool xenon360_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return (state & (UINT64_C(1) << key));
|
||||
@ -131,7 +123,6 @@ input_driver_t input_xenon360 = {
|
||||
xenon360_input_init,
|
||||
xenon360_input_poll,
|
||||
xenon360_input_state,
|
||||
xenon360_input_key_pressed,
|
||||
xenon360_input_meta_key_pressed,
|
||||
xenon360_input_free_input,
|
||||
NULL,
|
||||
|
@ -817,13 +817,6 @@ void **input_driver_get_data_ptr(void)
|
||||
return (void**)¤t_input_data;
|
||||
}
|
||||
|
||||
bool input_driver_key_pressed(unsigned *key)
|
||||
{
|
||||
if (key && current_input->key_pressed)
|
||||
return current_input->key_pressed(current_input_data, *key);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool input_driver_has_capabilities(void)
|
||||
{
|
||||
if (!current_input->get_capabilities || !current_input_data)
|
||||
|
@ -76,7 +76,6 @@ typedef struct input_driver
|
||||
int16_t (*input_state)(void *data,
|
||||
const struct retro_keybind **retro_keybinds,
|
||||
unsigned port, unsigned device, unsigned index, unsigned id);
|
||||
bool (*key_pressed)(void *data, int key);
|
||||
bool (*meta_key_pressed)(void *data, int key);
|
||||
void (*free)(void *data);
|
||||
bool (*set_sensor_state)(void *data, unsigned port,
|
||||
@ -234,8 +233,6 @@ const input_driver_t **input_get_double_ptr(void);
|
||||
|
||||
void **input_driver_get_data_ptr(void);
|
||||
|
||||
bool input_driver_key_pressed(unsigned *key);
|
||||
|
||||
bool input_driver_has_capabilities(void);
|
||||
|
||||
void input_driver_poll(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user