Refactor some code in input_state

This commit is contained in:
twinaphex 2015-06-27 15:36:53 +02:00
parent e1e3836b1b
commit 55454a12aa

View File

@ -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;