mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Network information cleanup (#14987)
This commit is contained in:
parent
b04a926170
commit
d7f2bd6ce7
@ -7417,8 +7417,15 @@ unsigned menu_displaylist_build_list(
|
|||||||
for (i = 0; i < interfaces.size; i++)
|
for (i = 0; i < interfaces.size; i++)
|
||||||
{
|
{
|
||||||
struct net_ifinfo_entry *entry = &interfaces.entries[i];
|
struct net_ifinfo_entry *entry = &interfaces.entries[i];
|
||||||
snprintf(buf + _len, sizeof(buf) - _len, " (%s) : %s\n",
|
char host_trimmed[64];
|
||||||
entry->name, entry->host);
|
|
||||||
|
/* Trim "%"-suffix from host */
|
||||||
|
strlcpy(host_trimmed, entry->host, sizeof(host_trimmed));
|
||||||
|
host_trimmed[string_index_last_occurance(host_trimmed, '%')] = '\0';
|
||||||
|
|
||||||
|
snprintf(buf + _len, sizeof(buf) - _len, " (%s): %s\n",
|
||||||
|
entry->name, host_trimmed);
|
||||||
|
|
||||||
if (menu_entries_append(list, buf, entry->name,
|
if (menu_entries_append(list, buf, entry->name,
|
||||||
MENU_ENUM_LABEL_NETWORK_INFO_ENTRY,
|
MENU_ENUM_LABEL_NETWORK_INFO_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user