Merge pull request #6597 from fr500/master

fix #6596
This commit is contained in:
Twinaphex 2018-04-19 18:06:56 +02:00 committed by GitHub
commit 037c47eaf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -221,7 +221,6 @@ bool input_remapping_save_file(const char *path)
if (settings->uints.input_keymapper_ids[i][j] != RETROK_UNKNOWN)
config_set_int(conf, key_ident[j],
settings->uints.input_keymapper_ids[i][j]);
}
else
{
@ -237,7 +236,7 @@ bool input_remapping_save_file(const char *path)
config_set_int(conf, stk_ident[k],
-1);
else
config_unset(conf,btn_ident[j]);
config_unset(conf, stk_ident[k]);
}
}
snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1);

View File

@ -403,7 +403,7 @@ static int action_left_input_desc_kbd(unsigned type, const char *label,
if (key_id > 0)
key_id--;
else
key_id = RARCH_MAX_KEYS + MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
key_id = (RARCH_MAX_KEYS - 1) + MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
settings->uints.input_keymapper_ids[offset][id] = key_descriptors[key_id].key;

View File

@ -126,9 +126,7 @@ int action_right_input_desc_kbd(unsigned type, const char *label,
break;
}
RARCH_LOG("o:%u t:%u i:%u r:%u\n", offset, type, id, remap_id);
if (key_id < RARCH_MAX_KEYS + MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
if (key_id < (RARCH_MAX_KEYS - 1) + MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
key_id++;
else
key_id = 0;