diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index 6f32fd7fb6..7e01a20ef8 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -264,7 +264,7 @@ static bool xinput_joypad_init(void *data) for (j = 0; j < MAX_USERS; j++) { - if (pad_index_to_xuser_index(ij) > -1) + if (pad_index_to_xuser_index(j) > -1) { if (!input_autoconfigure_connect( xinput_joypad_name(j),