mirror of
https://github.com/libretro/RetroArch
synced 2025-02-24 00:39:54 +00:00
(Menu) Remove duplicates
This commit is contained in:
parent
4e34611d1d
commit
1165f8dfe9
@ -7116,99 +7116,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
unsigned retro_id;
|
||||
unsigned device = settings->uints.input_libretro_device[p];
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
if (device == RETRO_DEVICE_JOYPAD || device == RETRO_DEVICE_ANALOG)
|
||||
{
|
||||
for (retro_id = 0; retro_id < RARCH_ANALOG_BIND_LIST_END; retro_id++)
|
||||
{
|
||||
char desc_label[400];
|
||||
char descriptor[300];
|
||||
const struct retro_keybind *keybind =
|
||||
&input_config_binds[p][retro_id];
|
||||
const struct retro_keybind *auto_bind =
|
||||
(const struct retro_keybind*)
|
||||
input_config_get_bind_auto(p, retro_id);
|
||||
|
||||
input_config_get_bind_string(descriptor,
|
||||
keybind, auto_bind, sizeof(descriptor));
|
||||
|
||||
if (!strstr(descriptor, "Auto"))
|
||||
{
|
||||
const struct retro_keybind *keyptr =
|
||||
&input_config_binds[p][retro_id];
|
||||
|
||||
snprintf(desc_label, sizeof(desc_label),
|
||||
"%s %s", msg_hash_to_str(keyptr->enum_idx), descriptor);
|
||||
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||
}
|
||||
|
||||
/* Add user index when display driver == rgui and sublabels
|
||||
* are disabled, but only if there is more than one user */
|
||||
if ( (is_rgui)
|
||||
&& (max_users > 1)
|
||||
&& !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
snprintf(desc_label, sizeof(desc_label),
|
||||
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), p + 1);
|
||||
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||
}
|
||||
|
||||
if (menu_entries_append_enum(list, descriptor, "",
|
||||
MSG_UNKNOWN,
|
||||
MENU_SETTINGS_INPUT_DESC_BEGIN +
|
||||
(p * (RARCH_FIRST_CUSTOM_BIND + 8)) + retro_id, 0, 0))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else if (device == RETRO_DEVICE_KEYBOARD)
|
||||
{
|
||||
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
|
||||
{
|
||||
char desc_label[400];
|
||||
char descriptor[300];
|
||||
const struct retro_keybind *keybind =
|
||||
&input_config_binds[p][retro_id];
|
||||
const struct retro_keybind *auto_bind =
|
||||
(const struct retro_keybind*)
|
||||
input_config_get_bind_auto(p, retro_id);
|
||||
|
||||
input_config_get_bind_string(descriptor,
|
||||
keybind, auto_bind, sizeof(descriptor));
|
||||
|
||||
if (!strstr(descriptor, "Auto"))
|
||||
{
|
||||
const struct retro_keybind *keyptr =
|
||||
&input_config_binds[p][retro_id];
|
||||
|
||||
strlcpy(descriptor,
|
||||
msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||
}
|
||||
|
||||
/* Add user index when display driver == rgui and sublabels
|
||||
* are disabled, but only if there is more than one user */
|
||||
if ( (is_rgui)
|
||||
&& (max_users > 1)
|
||||
&& !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
snprintf(desc_label, sizeof(desc_label),
|
||||
"%s [%s %u]", descriptor,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), p + 1);
|
||||
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||
}
|
||||
|
||||
if (menu_entries_append_enum(list, descriptor, "",
|
||||
MSG_UNKNOWN,
|
||||
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN +
|
||||
(p * RARCH_FIRST_CUSTOM_BIND) + retro_id, 0, 0))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
info->need_clear = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user