mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Simplify libretro_input_binds
This commit is contained in:
parent
58fcf421b5
commit
3dc26db377
@ -83,6 +83,7 @@ static int input_config_pid[MAX_USERS];
|
||||
|
||||
struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind input_autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
const struct retro_keybind *libretro_input_binds[MAX_USERS];
|
||||
|
||||
#define DECLARE_BIND(x, bind, desc) { true, 0, #x, desc, bind }
|
||||
#define DECLARE_META_BIND(level, x, bind, desc) { true, level, #x, desc, bind }
|
||||
@ -589,7 +590,8 @@ void input_config_reset(void)
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
input_config_vid[i] = 0;
|
||||
input_config_pid[i] = 0;
|
||||
input_config_vid[i] = 0;
|
||||
input_config_pid[i] = 0;
|
||||
libretro_input_binds[i] = input_config_binds[i];
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
extern struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
extern struct retro_keybind input_autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
extern const struct retro_keybind *libretro_input_binds[MAX_USERS];
|
||||
|
||||
const char *input_config_bind_map_get_base(unsigned i);
|
||||
|
||||
|
@ -260,7 +260,6 @@ float input_sensor_get_input(unsigned port, unsigned id)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static const struct retro_keybind *libretro_input_binds[MAX_USERS];
|
||||
|
||||
/**
|
||||
* input_poll:
|
||||
@ -279,7 +278,6 @@ void input_poll(void)
|
||||
|
||||
for (i = 0; i < max_users; i++)
|
||||
{
|
||||
libretro_input_binds[i] = input_config_binds[i];
|
||||
input_driver_turbo_btns.frame_enable[i] = 0;
|
||||
|
||||
if (!input_driver_block_libretro_input &&
|
||||
@ -1019,8 +1017,6 @@ bool input_driver_init(void)
|
||||
unsigned i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
libretro_input_binds[i] = input_config_binds[i];
|
||||
if (current_input)
|
||||
current_input_data = current_input->init(settings->input.joypad_driver);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user