mirror of
https://github.com/libretro/RetroArch
synced 2025-01-25 15:35:29 +00:00
(Console) fix binding of unbound buttons
allow unbinding buttons
This commit is contained in:
parent
e04217e373
commit
bfb5f5d0e0
@ -60,8 +60,11 @@ static uint64_t rarch_input_find_previous_platform_key(uint64_t joykey)
|
||||
{
|
||||
size_t arr_size = platform_keys_size / sizeof(platform_keys[0]);
|
||||
|
||||
if (joykey == NO_BTN)
|
||||
return platform_keys[arr_size - 1].joykey;
|
||||
|
||||
if (platform_keys[0].joykey == joykey)
|
||||
return joykey;
|
||||
return NO_BTN;
|
||||
|
||||
for (size_t i = 1; i < arr_size; i++)
|
||||
{
|
||||
@ -76,8 +79,11 @@ static uint64_t rarch_input_find_next_platform_key(uint64_t joykey)
|
||||
{
|
||||
size_t arr_size = platform_keys_size / sizeof(platform_keys[0]);
|
||||
|
||||
if (joykey == NO_BTN)
|
||||
return platform_keys[0].joykey;
|
||||
|
||||
if (platform_keys[arr_size - 1].joykey == joykey)
|
||||
return joykey;
|
||||
return NO_BTN;
|
||||
|
||||
for (size_t i = 0; i < arr_size - 1; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user