From fc5d240297b5028f8d44eb57fb92a1dca4733668 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 25 Apr 2017 23:30:50 +0200 Subject: [PATCH] Get rid of some now-unused functions --- gfx/drivers_tracker/video_state_python.c | 16 ++++++++-------- input/drivers/android_input.c | 6 +++--- input/drivers/rwebinput_input.c | 2 +- input/input_config.c | 14 ++------------ input/input_config.h | 4 ---- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/gfx/drivers_tracker/video_state_python.c b/gfx/drivers_tracker/video_state_python.c index faa7058d6f..c1175ba73a 100644 --- a/gfx/drivers_tracker/video_state_python.c +++ b/gfx/drivers_tracker/video_state_python.c @@ -114,7 +114,7 @@ static PyObject *py_read_input(PyObject *self, PyObject *args) settings_t *settings = config_get_ptr(); for (i = 0; i < MAX_USERS; i++) - py_binds[i] = input_config_get_binds(i); + py_binds[i] = input_config_binds[i]; (void)self; @@ -125,7 +125,7 @@ static PyObject *py_read_input(PyObject *self, PyObject *args) return NULL; joypad_info.joy_idx = settings->input.joypad_map[user - 1]; - joypad_info.auto_binds = input_autoconfigure_get_binds(joypad_info.joy_idx); + joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx]; if (!input_driver_is_libretro_input_blocked()) res = current_input->input_state(current_input_data, joypad_info, @@ -143,7 +143,7 @@ static PyObject *py_read_analog(PyObject *self, PyObject *args) settings_t *settings = config_get_ptr(); for (i = 0; i < MAX_USERS; i++) - py_binds[i] = input_config_get_binds(i); + py_binds[i] = input_config_binds[i]; (void)self; @@ -154,7 +154,7 @@ static PyObject *py_read_analog(PyObject *self, PyObject *args) return NULL; joypad_info.joy_idx = settings->input.joypad_map[user - 1]; - joypad_info.auto_binds = input_autoconfigure_get_binds(joypad_info.joy_idx); + joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx]; res = current_input->input_state(current_input_data, joypad_info, py_binds, @@ -399,8 +399,8 @@ float py_state_get(py_state_t *handle, const char *id, for (i = 0; i < MAX_USERS; i++) { - struct retro_keybind *general_binds = input_config_get_binds(i); - struct retro_keybind *auto_binds = input_autoconfigure_get_binds(i); + struct retro_keybind *general_binds = input_config_binds[i]; + struct retro_keybind *auto_binds = input_autoconf_binds[i]; enum analog_dpad_mode dpad_mode = settings->input.analog_dpad_mode[i]; if (dpad_mode == ANALOG_DPAD_NONE) @@ -414,8 +414,8 @@ float py_state_get(py_state_t *handle, const char *id, for (i = 0; i < MAX_USERS; i++) { - struct retro_keybind *general_binds = input_config_get_binds(i); - struct retro_keybind *auto_binds = input_autoconfigure_get_binds(i); + struct retro_keybind *general_binds = input_config_binds[i]; + struct retro_keybind *auto_binds = input_autoconf_binds[i]; input_pop_analog_dpad(general_binds); input_pop_analog_dpad(auto_binds); } diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index ccdaa830e3..5526003170 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1247,17 +1247,17 @@ static bool android_input_key_pressed(void *data, int key) const struct retro_keybind *keyptr = input_config_get_specific_bind(0, key); if( keyptr->valid - && android_keyboard_port_input_pressed(input_config_get_binds(0), + && android_keyboard_port_input_pressed(input_config_binds[0], key)) return true; joypad_info.joy_idx = 0; - joypad_info.auto_binds = input_autoconfigure_get_binds(0); + joypad_info.auto_binds = input_autoconf_binds[0]; joypad_info.axis_threshold = settings->input.axis_threshold; if (keyptr->valid && input_joypad_pressed(android->joypad, joypad_info, - 0, input_config_get_binds(0), key)) + 0, input_config_binds[0], key)) return true; return false; diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c index 3b912689fa..450dbc700d 100644 --- a/input/drivers/rwebinput_input.c +++ b/input/drivers/rwebinput_input.c @@ -106,7 +106,7 @@ static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput, static bool rwebinput_key_pressed(void *data, int key) { rwebinput_input_t *rwebinput = (rwebinput_input_t*)data; - return rwebinput_is_pressed(rwebinput, input_config_get_binds(0), key); + return rwebinput_is_pressed(rwebinput, input_config_binds[0], key); } static int16_t rwebinput_mouse_state(rwebinput_input_t *rwebinput, unsigned id) diff --git a/input/input_config.c b/input/input_config.c index 9ce8d63fb2..05ee452435 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -163,11 +163,6 @@ const struct retro_keybind *input_config_get_specific_bind(unsigned i, unsigned return &input_config_binds[i][j]; } -struct retro_keybind *input_config_get_binds(unsigned i) -{ - return input_config_binds[i]; -} - static const void *input_config_bind_map_get(unsigned i) { return (const struct input_bind_map*)&input_config_bind_map[i]; @@ -596,10 +591,10 @@ void input_config_reset(void) retro_assert(sizeof(input_config_binds[0]) >= sizeof(retro_keybinds_1)); retro_assert(sizeof(input_config_binds[1]) >= sizeof(retro_keybinds_rest)); - memcpy(input_config_get_binds(0), retro_keybinds_1, sizeof(retro_keybinds_1)); + memcpy(input_config_binds[0], retro_keybinds_1, sizeof(retro_keybinds_1)); for (i = 1; i < MAX_USERS; i++) - memcpy(input_config_get_binds(i), retro_keybinds_rest, + memcpy(input_config_binds[i], retro_keybinds_rest, sizeof(retro_keybinds_rest)); for (i = 0; i < MAX_USERS; i++) @@ -613,8 +608,3 @@ const struct retro_keybind *input_autoconfigure_get_specific_bind(unsigned i, un { return &input_autoconf_binds[i][j]; } - -struct retro_keybind *input_autoconfigure_get_binds(unsigned i) -{ - return input_autoconf_binds[i]; -} diff --git a/input/input_config.h b/input/input_config.h index 73b8438c90..695a66fab2 100644 --- a/input/input_config.h +++ b/input/input_config.h @@ -96,13 +96,9 @@ struct retro_keybind *input_config_get_specific_bind_ptr(unsigned i, unsigned j) const struct retro_keybind *input_config_get_specific_bind(unsigned i, unsigned j); -struct retro_keybind *input_config_get_binds(unsigned i); - const struct retro_keybind * input_autoconfigure_get_specific_bind(unsigned i, unsigned j); -struct retro_keybind *input_autoconfigure_get_binds(unsigned i); - void input_config_reset(void); #endif