Get rid of some now-unused functions
This commit is contained in:
parent
f0eaef9d51
commit
fc5d240297
|
@ -114,7 +114,7 @@ static PyObject *py_read_input(PyObject *self, PyObject *args)
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
py_binds[i] = input_config_get_binds(i);
|
py_binds[i] = input_config_binds[i];
|
||||||
|
|
||||||
(void)self;
|
(void)self;
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ static PyObject *py_read_input(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
joypad_info.joy_idx = settings->input.joypad_map[user - 1];
|
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())
|
if (!input_driver_is_libretro_input_blocked())
|
||||||
res = current_input->input_state(current_input_data, joypad_info,
|
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();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
py_binds[i] = input_config_get_binds(i);
|
py_binds[i] = input_config_binds[i];
|
||||||
|
|
||||||
(void)self;
|
(void)self;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ static PyObject *py_read_analog(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
joypad_info.joy_idx = settings->input.joypad_map[user - 1];
|
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,
|
res = current_input->input_state(current_input_data,
|
||||||
joypad_info, py_binds,
|
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++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
struct retro_keybind *general_binds = input_config_get_binds(i);
|
struct retro_keybind *general_binds = input_config_binds[i];
|
||||||
struct retro_keybind *auto_binds = input_autoconfigure_get_binds(i);
|
struct retro_keybind *auto_binds = input_autoconf_binds[i];
|
||||||
enum analog_dpad_mode dpad_mode = settings->input.analog_dpad_mode[i];
|
enum analog_dpad_mode dpad_mode = settings->input.analog_dpad_mode[i];
|
||||||
|
|
||||||
if (dpad_mode == ANALOG_DPAD_NONE)
|
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++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
struct retro_keybind *general_binds = input_config_get_binds(i);
|
struct retro_keybind *general_binds = input_config_binds[i];
|
||||||
struct retro_keybind *auto_binds = input_autoconfigure_get_binds(i);
|
struct retro_keybind *auto_binds = input_autoconf_binds[i];
|
||||||
input_pop_analog_dpad(general_binds);
|
input_pop_analog_dpad(general_binds);
|
||||||
input_pop_analog_dpad(auto_binds);
|
input_pop_analog_dpad(auto_binds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
const struct retro_keybind *keyptr = input_config_get_specific_bind(0, key);
|
||||||
|
|
||||||
if( keyptr->valid
|
if( keyptr->valid
|
||||||
&& android_keyboard_port_input_pressed(input_config_get_binds(0),
|
&& android_keyboard_port_input_pressed(input_config_binds[0],
|
||||||
key))
|
key))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
joypad_info.joy_idx = 0;
|
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;
|
joypad_info.axis_threshold = settings->input.axis_threshold;
|
||||||
|
|
||||||
if (keyptr->valid &&
|
if (keyptr->valid &&
|
||||||
input_joypad_pressed(android->joypad, joypad_info,
|
input_joypad_pressed(android->joypad, joypad_info,
|
||||||
0, input_config_get_binds(0), key))
|
0, input_config_binds[0], key))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -106,7 +106,7 @@ static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput,
|
||||||
static bool rwebinput_key_pressed(void *data, int key)
|
static bool rwebinput_key_pressed(void *data, int key)
|
||||||
{
|
{
|
||||||
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
|
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)
|
static int16_t rwebinput_mouse_state(rwebinput_input_t *rwebinput, unsigned id)
|
||||||
|
|
|
@ -163,11 +163,6 @@ const struct retro_keybind *input_config_get_specific_bind(unsigned i, unsigned
|
||||||
return &input_config_binds[i][j];
|
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)
|
static const void *input_config_bind_map_get(unsigned i)
|
||||||
{
|
{
|
||||||
return (const struct input_bind_map*)&input_config_bind_map[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[0]) >= sizeof(retro_keybinds_1));
|
||||||
retro_assert(sizeof(input_config_binds[1]) >= sizeof(retro_keybinds_rest));
|
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++)
|
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));
|
sizeof(retro_keybinds_rest));
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
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];
|
return &input_autoconf_binds[i][j];
|
||||||
}
|
}
|
||||||
|
|
||||||
struct retro_keybind *input_autoconfigure_get_binds(unsigned i)
|
|
||||||
{
|
|
||||||
return input_autoconf_binds[i];
|
|
||||||
}
|
|
||||||
|
|
|
@ -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);
|
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 *
|
const struct retro_keybind *
|
||||||
input_autoconfigure_get_specific_bind(unsigned i, unsigned j);
|
input_autoconfigure_get_specific_bind(unsigned i, unsigned j);
|
||||||
|
|
||||||
struct retro_keybind *input_autoconfigure_get_binds(unsigned i);
|
|
||||||
|
|
||||||
void input_config_reset(void);
|
void input_config_reset(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue