diff --git a/gx/gx_input.c b/gx/gx_input.c index 008d8bf434..5ddcff10fe 100644 --- a/gx/gx_input.c +++ b/gx/gx_input.c @@ -419,7 +419,7 @@ static void gx_input_set_keybinds(void *data, unsigned device, unsigned port, { for (size_t i = 0; i < arr_size; i++) { - if (platform_keys[i].joykey == joykey) + if (platform_keys[i].joykey == ret->joykey) { strlcpy(ret->desc, platform_keys[i].desc, sizeof(ret->desc)); return; diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index e411b03c40..eebed5ea83 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -497,7 +497,7 @@ static void ps3_input_set_keybinds(void *data, unsigned device, { for (size_t i = 0; i < arr_size; i++) { - if (platform_keys[i].joykey == joykey) + if (platform_keys[i].joykey == ret->joykey) { strlcpy(ret->desc, platform_keys[i].desc, sizeof(ret->desc)); return; diff --git a/xdk/xdk_xinput_input.c b/xdk/xdk_xinput_input.c index 780c7ce585..595c52e80a 100644 --- a/xdk/xdk_xinput_input.c +++ b/xdk/xdk_xinput_input.c @@ -370,7 +370,7 @@ static void xdk_input_set_keybinds(void *data, unsigned device, { for (size_t i = 0; i < arr_size; i++) { - if (platform_keys[i].joykey == joykey) + if (platform_keys[i].joykey == ret->joykey) { strlcpy(ret->desc, platform_keys[i].desc, sizeof(ret->desc)); return;