mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Merge pull request #7770 from jdgleaver/rgui-user-index
(RGUI) Add user index label to control menu entries
This commit is contained in:
commit
26568a6bc2
@ -2683,7 +2683,7 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
|
|||||||
if (bind->joyaxis_label &&
|
if (bind->joyaxis_label &&
|
||||||
!string_is_empty(bind->joyaxis_label)
|
!string_is_empty(bind->joyaxis_label)
|
||||||
&& settings->bools.input_descriptor_label_show)
|
&& settings->bools.input_descriptor_label_show)
|
||||||
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
|
snprintf(buf, size, "%s%s (axis)", prefix, bind->joyaxis_label);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned axis = 0;
|
unsigned axis = 0;
|
||||||
|
@ -3394,6 +3394,15 @@ static int menu_displaylist_parse_options_remappings(
|
|||||||
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add user index when display driver == rgui,
|
||||||
|
* but only if there is more than one user */
|
||||||
|
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
|
||||||
|
{
|
||||||
|
snprintf(desc_label, sizeof(desc_label),
|
||||||
|
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
|
||||||
|
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||||
|
}
|
||||||
|
|
||||||
menu_entries_append_enum(info->list, descriptor, "",
|
menu_entries_append_enum(info->list, descriptor, "",
|
||||||
MSG_UNKNOWN,
|
MSG_UNKNOWN,
|
||||||
MENU_SETTINGS_INPUT_DESC_BEGIN +
|
MENU_SETTINGS_INPUT_DESC_BEGIN +
|
||||||
@ -3404,6 +3413,7 @@ static int menu_displaylist_parse_options_remappings(
|
|||||||
{
|
{
|
||||||
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
|
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
|
||||||
{
|
{
|
||||||
|
char desc_label[255];
|
||||||
char descriptor[255];
|
char descriptor[255];
|
||||||
const struct retro_keybind *auto_bind = NULL;
|
const struct retro_keybind *auto_bind = NULL;
|
||||||
const struct retro_keybind *keybind = NULL;
|
const struct retro_keybind *keybind = NULL;
|
||||||
@ -3423,6 +3433,15 @@ static int menu_displaylist_parse_options_remappings(
|
|||||||
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add user index when display driver == rgui,
|
||||||
|
* but only if there is more than one user */
|
||||||
|
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
|
||||||
|
{
|
||||||
|
snprintf(desc_label, sizeof(desc_label),
|
||||||
|
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
|
||||||
|
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||||
|
}
|
||||||
|
|
||||||
menu_entries_append_enum(info->list, descriptor, "",
|
menu_entries_append_enum(info->list, descriptor, "",
|
||||||
MSG_UNKNOWN,
|
MSG_UNKNOWN,
|
||||||
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN +
|
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user