Cleaner setup of bind-map.

This commit is contained in:
Themaister 2011-11-09 22:47:12 +01:00
parent 7815940a97
commit d1dc65f202

View File

@ -75,9 +75,13 @@ static PyObject *py_read_input(PyObject *self, PyObject *args)
if (player > MAX_PLAYERS || player < 1 || key >= SSNES_FIRST_META_KEY) if (player > MAX_PLAYERS || player < 1 || key >= SSNES_FIRST_META_KEY)
return NULL; return NULL;
const struct snes_keybind *binds[MAX_PLAYERS]; static const struct snes_keybind *binds[MAX_PLAYERS] = {
for (int i = 0; i < MAX_PLAYERS; i++) g_settings.input.binds[0],
binds[i] = g_settings.input.binds[i]; g_settings.input.binds[1],
g_settings.input.binds[2],
g_settings.input.binds[3],
g_settings.input.binds[4],
};
int16_t res = driver.input->input_state(driver.input_data, int16_t res = driver.input->input_state(driver.input_data,
binds, player > 1, binds, player > 1,