Update input indices to 8.

This commit is contained in:
Themaister 2012-06-10 12:00:25 +02:00
parent 43be487a39
commit e4556ab73c
2 changed files with 3 additions and 4 deletions

View File

@ -204,7 +204,7 @@ typedef struct rarch_input_driver
// The range of this is [0, 1],
// where 0 means any displacement will register,
// and 1 means the axis has to be pressed all the way to register.
void *(*init)(const int joypad_index[5], float axis_threshold);
void *(*init)(const int joypad_index[8], float axis_threshold);
// Polls input. Called once every frame.
void (*poll)(void *data);

View File

@ -183,9 +183,8 @@ static bool video_ext_frame(void *data, const void *frame, unsigned width, unsig
static void *setup_input(ext_t *ext, const rarch_input_driver_t *driver)
{
// TODO: Change external API to allow more players. To be done in next major ABI break.
int joypad_index[5];
for (unsigned i = 0; i < 5; i++)
int joypad_index[8];
for (unsigned i = 0; i < 8; i++)
joypad_index[i] = g_settings.input.joypad_map[i] < 0 ? -1 : g_settings.input.joypad_map[i];
void *handle = driver->init(joypad_index, g_settings.input.axis_threshold);