Merge pull request #5433 from fr500/master

use descriptors if available
This commit is contained in:
Twinaphex 2017-09-12 07:27:42 +02:00 committed by GitHub
commit d43b18b26d

View File

@ -3516,16 +3516,20 @@ static int menu_displaylist_parse_options_remappings(
{
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
{
char desc_label[64];
unsigned user = settings->uints.keymapper_port + 1;
unsigned desc_offset = retro_id;
const char *description = NULL;
char descriptor[255];
const struct retro_keybind *auto_bind = NULL;
const struct retro_keybind *keybind = NULL;
desc_label[0] = '\0';
keybind = &input_config_binds[settings->uints.keymapper_port][retro_id];
auto_bind = (const struct retro_keybind*)
input_config_get_bind_auto(settings->uints.keymapper_port, retro_id);
input_config_get_bind_string(descriptor,
keybind, auto_bind, sizeof(descriptor));
snprintf(desc_label, sizeof(desc_label),
"%s: ", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B + retro_id));
menu_entries_append_enum(info->list, desc_label, "",
menu_entries_append_enum(info->list, descriptor, "",
MSG_UNKNOWN,
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + retro_id, 0, 0);
}