diff --git a/libretro_version_1.c b/libretro_version_1.c index 5c24e47875..c5c60394d5 100644 --- a/libretro_version_1.c +++ b/libretro_version_1.c @@ -152,28 +152,15 @@ static bool input_apply_turbo(unsigned port, unsigned id, bool res) static int16_t input_state(unsigned port, unsigned device, unsigned idx, unsigned id) { + size_t i; + const struct retro_keybind *libretro_input_binds[MAX_USERS]; int16_t res = 0; settings_t *settings = config_get_ptr(); driver_t *driver = driver_get_ptr(); global_t *global = global_get_ptr(); - const struct retro_keybind *libretro_input_binds[MAX_USERS] = { - settings->input.binds[0], - settings->input.binds[1], - settings->input.binds[2], - settings->input.binds[3], - settings->input.binds[4], - settings->input.binds[5], - settings->input.binds[6], - settings->input.binds[7], - settings->input.binds[8], - settings->input.binds[9], - settings->input.binds[10], - settings->input.binds[11], - settings->input.binds[12], - settings->input.binds[13], - settings->input.binds[14], - settings->input.binds[15], - }; + + for (i = 0; i < MAX_USERS; i++) + libretro_input_binds[i] = settings->input.binds[i]; device &= RETRO_DEVICE_MASK;