add room type in the title

This commit is contained in:
radius 2017-07-24 20:52:27 -05:00
parent f7f613a244
commit d560660bdc
3 changed files with 15 additions and 11 deletions

View File

@ -3674,21 +3674,19 @@ void netplay_refresh_rooms_menu(file_list_t *list)
netplay_room_list[i].timestamp); netplay_room_list[i].timestamp);
#endif #endif
j+=8; j+=8;
snprintf(s, sizeof(s), snprintf(s, sizeof(s), "%s: %s",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME), netplay_room_list[i].lan ? "Local" :
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ?
"Internet (relay)" : "Internet (direct)"),
netplay_room_list[i].nickname); netplay_room_list[i].nickname);
/* /*int room_type = netplay_room_list[i].lan ? MENU_ROOM_LAN :
netplay_room_list[i - 3].lan ? "LAN game" : (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? MENU_ROOM_MITM : MENU_ROOM); */
(netplay_room_list[i - 3].host_method == NETPLAY_HOST_METHOD_MITM ?
"MITM game" : "Lobby game"), netplay_room_list[i - 3].address);*/
int room_type = netplay_room_list[i].lan ? MENU_ROOM_LAN : (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? MENU_ROOM_MITM : MENU_ROOM);
menu_entries_append_enum(list, menu_entries_append_enum(list,
s, s,
msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM),
MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM,
room_type, 0, 0); MENU_ROOM, 0, 0);
} }
netplay_rooms_free(); netplay_rooms_free();

View File

@ -97,8 +97,9 @@ enum
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING
XMB_TEXTURE_NETPLAY, XMB_TEXTURE_NETPLAY,
XMB_TEXTURE_ROOM, XMB_TEXTURE_ROOM,
/* stub these out until we have the icons
XMB_TEXTURE_ROOM_LAN, XMB_TEXTURE_ROOM_LAN,
XMB_TEXTURE_ROOM_MITM, XMB_TEXTURE_ROOM_MITM,*/
#endif #endif
#ifdef HAVE_IMAGEVIEWER #ifdef HAVE_IMAGEVIEWER
XMB_TEXTURE_IMAGES, XMB_TEXTURE_IMAGES,
@ -2150,10 +2151,11 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING
case MENU_ROOM: case MENU_ROOM:
return xmb->textures.list[XMB_TEXTURE_ROOM]; return xmb->textures.list[XMB_TEXTURE_ROOM];
/* stub these out until we have the icons
case MENU_ROOM_LAN: case MENU_ROOM_LAN:
return xmb->textures.list[XMB_TEXTURE_ROOM_LAN]; return xmb->textures.list[XMB_TEXTURE_ROOM_LAN];
case MENU_ROOM_MITM: case MENU_ROOM_MITM:
return xmb->textures.list[XMB_TEXTURE_ROOM_MITM]; return xmb->textures.list[XMB_TEXTURE_ROOM_MITM]; */
#endif #endif
} }
@ -3534,10 +3536,12 @@ static const char *xmb_texture_path(unsigned id)
return "netplay.png"; return "netplay.png";
case XMB_TEXTURE_ROOM: case XMB_TEXTURE_ROOM:
return "room.png"; return "room.png";
/* stub these out until we have the icons
case XMB_TEXTURE_ROOM_LAN: case XMB_TEXTURE_ROOM_LAN:
return "room_lan.png"; return "room_lan.png";
case XMB_TEXTURE_ROOM_MITM: case XMB_TEXTURE_ROOM_MITM:
return "room_mitm.png"; return "room_mitm.png";
*/
#endif #endif
case XMB_TEXTURE_KEY: case XMB_TEXTURE_KEY:
return "key.png"; return "key.png";

View File

@ -167,8 +167,10 @@ enum menu_settings_type
MENU_SETTING_HORIZONTAL_MENU, MENU_SETTING_HORIZONTAL_MENU,
MENU_WIFI, MENU_WIFI,
MENU_ROOM, MENU_ROOM,
/*
MENU_ROOM_LAN, MENU_ROOM_LAN,
MENU_ROOM_MITM, MENU_ROOM_MITM,
*/
MENU_NETPLAY_LAN_SCAN, MENU_NETPLAY_LAN_SCAN,
MENU_INFO_MESSAGE, MENU_INFO_MESSAGE,
MENU_SETTINGS_SHADER_PARAMETER_0, MENU_SETTINGS_SHADER_PARAMETER_0,