mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Only show " (#x)" after a device name if it's part of a set (x of y similarly named devices)
This commit is contained in:
parent
609bcb4dc2
commit
8907a1251e
@ -1512,16 +1512,32 @@ static void get_string_representation_bind_device(void * data, char *s,
|
||||
const char *device_name = input_config_get_device_name(map);
|
||||
|
||||
if (!string_is_empty(device_name))
|
||||
snprintf(s, len,
|
||||
"%s (#%u)",
|
||||
device_name,
|
||||
input_autoconfigure_get_device_name_index(map));
|
||||
{
|
||||
unsigned idx = input_autoconfigure_get_device_name_index(map);
|
||||
|
||||
/*if idx is non-zero, it's part of a set*/
|
||||
if ( idx > 0 )
|
||||
{
|
||||
snprintf(s, len,
|
||||
"%s (#%u)",
|
||||
device_name,
|
||||
idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, len,
|
||||
"%s",
|
||||
device_name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, len,
|
||||
"%s (%s #%u)",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT),
|
||||
map);
|
||||
}
|
||||
}
|
||||
else
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISABLED), len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user