From 20cd1f5734331a91a3b6bde9f76f71e0e9d0cad2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 11 Jun 2014 08:12:17 +0200 Subject: [PATCH] (Input) Remove devices_size function callback implementation in drivers that no longer implement set_keybinds --- input/android_input.c | 7 +------ input/gx_input.c | 17 +---------------- input/null.c | 19 ++----------------- input/ps3_input.c | 13 +------------ input/psp_input.c | 14 +------------- input/xdk_xinput_input.c | 13 +------------ 6 files changed, 7 insertions(+), 76 deletions(-) diff --git a/input/android_input.c b/input/android_input.c index 863cff873b..d5e690b87d 100644 --- a/input/android_input.c +++ b/input/android_input.c @@ -902,11 +902,6 @@ static float android_input_get_sensor_input(void *data, unsigned port, unsigned return 0; } -unsigned android_input_devices_size(void *data) -{ - return DEVICE_LAST; -} - static const rarch_joypad_driver_t *android_input_get_joypad_driver(void *data) { android_input_t *android = (android_input_t*)data; @@ -923,7 +918,7 @@ const input_driver_t input_android = { android_input_set_sensor_state, android_input_get_sensor_input, android_input_get_capabilities, - android_input_devices_size, + NULL, "android_input", NULL, diff --git a/input/gx_input.c b/input/gx_input.c index d48fba9b0f..6e93110f92 100644 --- a/input/gx_input.c +++ b/input/gx_input.c @@ -110,16 +110,6 @@ enum #define MAX_PADS 4 -enum input_devices -{ - DEVICE_GAMECUBE = 0, - DEVICE_WIIMOTE, - DEVICE_NUNCHUK, - DEVICE_CLASSIC, - DEVICE_SIXAXIS, - DEVICE_LAST -}; - typedef struct gx_input { uint64_t pad_state[MAX_PADS]; @@ -598,11 +588,6 @@ static const rarch_joypad_driver_t *gx_input_get_joypad_driver(void *data) return &gx_joypad; } -static unsigned gx_input_devices_size(void *data) -{ - return DEVICE_LAST; -} - const input_driver_t input_gx = { gx_input_init, gx_input_poll, @@ -613,7 +598,7 @@ const input_driver_t input_gx = { NULL, NULL, gx_input_get_capabilities, - gx_input_devices_size, + NULL, "gx", NULL, diff --git a/input/null.c b/input/null.c index 9ef67d6f32..fb8ef2904e 100644 --- a/input/null.c +++ b/input/null.c @@ -51,16 +51,6 @@ static void nullinput_input_free_input(void *data) (void)data; } -static void nullinput_set_keybinds(void *data, unsigned device, - unsigned port, unsigned id, unsigned keybind_action) -{ - (void)data; - (void)device; - (void)port; - (void)id; - (void)keybind_action; -} - static uint64_t nullinput_get_capabilities(void *data) { uint64_t caps = 0; @@ -75,21 +65,16 @@ static bool nullinput_set_sensor_state(void *data, unsigned port, enum retro_sen return false; } -static unsigned nullinput_devices_size(void *data) -{ - return 0; -} - const input_driver_t input_null = { nullinput_input_init, nullinput_input_poll, nullinput_input_state, nullinput_input_key_pressed, nullinput_input_free_input, - nullinput_set_keybinds, + NULL, nullinput_set_sensor_state, NULL, nullinput_get_capabilities, - nullinput_devices_size, + NULL, "null", }; diff --git a/input/ps3_input.c b/input/ps3_input.c index f8aa49a0f9..1d3114c6ed 100644 --- a/input/ps3_input.c +++ b/input/ps3_input.c @@ -36,12 +36,6 @@ #define MAX_PADS 7 #endif -enum input_devices -{ - DEVICE_SIXAXIS = 0, - DEVICE_LAST -}; - typedef struct { float x; @@ -358,11 +352,6 @@ static const rarch_joypad_driver_t *ps3_input_get_joypad_driver(void *data) return ps3->joypad; } -static unsigned ps3_input_devices_size(void *data) -{ - return DEVICE_LAST; -} - const input_driver_t input_ps3 = { ps3_input_init, ps3_input_poll, @@ -373,7 +362,7 @@ const input_driver_t input_ps3 = { ps3_input_set_sensor_state, NULL, ps3_input_get_capabilities, - ps3_input_devices_size, + NULL, "ps3", NULL, diff --git a/input/psp_input.c b/input/psp_input.c index 8cdbbaa8ae..9dc8f737a3 100644 --- a/input/psp_input.c +++ b/input/psp_input.c @@ -36,13 +36,6 @@ #define MAX_PADS 1 -enum input_devices -{ - DEVICE_PSP = 0, - DEVICE_LAST -}; - - typedef struct psp_input { uint64_t pad_state; @@ -172,11 +165,6 @@ static const rarch_joypad_driver_t *psp_input_get_joypad_driver(void *data) return psp->joypad; } -static unsigned psp_input_devices_size(void *data) -{ - return DEVICE_LAST; -} - const input_driver_t input_psp = { psp_input_initialize, psp_input_poll, @@ -187,7 +175,7 @@ const input_driver_t input_psp = { NULL, NULL, psp_input_get_capabilities, - psp_input_devices_size, + NULL, "psp", NULL, diff --git a/input/xdk_xinput_input.c b/input/xdk_xinput_input.c index 8b82eee886..ee6967bdf9 100644 --- a/input/xdk_xinput_input.c +++ b/input/xdk_xinput_input.c @@ -27,12 +27,6 @@ #define MAX_PADS 4 -enum input_devices -{ - DEVICE_XBOX_PAD = 0, - DEVICE_LAST -}; - typedef struct xdk_input { uint64_t pad_state[MAX_PADS]; @@ -273,11 +267,6 @@ static const rarch_joypad_driver_t *xdk_input_get_joypad_driver(void *data) return xdk->joypad; } -static unsigned xdk_input_devices_size(void *data) -{ - return DEVICE_LAST; -} - const input_driver_t input_xinput = { xdk_input_init, @@ -289,7 +278,7 @@ const input_driver_t input_xinput = NULL, NULL, xdk_input_get_capabilities, - xdk_input_devices_size, + NULL, "xinput", NULL,