From fa03a634d0e59cbf1f8c1bfde398046e24884788 Mon Sep 17 00:00:00 2001 From: Alfrix Date: Tue, 9 Oct 2018 19:52:04 -0300 Subject: [PATCH] New Netplay icons --- intl/msg_hash_us.h | 2 +- menu/cbs/menu_cbs_ok.c | 7 +++++-- menu/drivers/xmb.c | 43 ++++++++++++++---------------------------- menu/menu_driver.h | 4 +--- 4 files changed, 21 insertions(+), 35 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ae8017977e..a3a118a1d1 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -5319,7 +5319,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT, - "Enables netplay in client mode." + "Enter netplay server address and connect in client mode." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index e98fcf249c..d6fe477c11 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3929,6 +3929,7 @@ void netplay_refresh_rooms_menu(file_list_t *list) { char s[8300]; int i = 0; + int room_type = 0; s[0] = '\0'; @@ -4008,14 +4009,16 @@ void netplay_refresh_rooms_menu(file_list_t *list) snprintf(s, sizeof(s), "%s: %s%s", netplay_room_list[i].lan ? "Local" : (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? - "Internet (relay)" : "Internet (direct)"), + "Internet (Relay)" : "Internet"), netplay_room_list[i].nickname, country); + room_type = netplay_room_list[i].lan ? MENU_ROOM_LAN : (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? MENU_ROOM_RELAY : MENU_ROOM); + menu_entries_append_enum(list, s, msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, - MENU_SETTINGS_NETPLAY_ROOMS_START + i, 0, 0); + room_type, 0, 0); } netplay_rooms_free(); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 7b273e72d0..080d3761a7 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -105,13 +105,8 @@ enum #ifdef HAVE_NETWORKING XMB_TEXTURE_NETPLAY, XMB_TEXTURE_ROOM, - XMB_TEXTURE_IROOM, - XMB_TEXTURE_LANROOM, -#if 0 - /* stub these out until we have the icons */ XMB_TEXTURE_ROOM_LAN, - XMB_TEXTURE_ROOM_MITM, -#endif + XMB_TEXTURE_ROOM_RELAY, #endif #ifdef HAVE_IMAGEVIEWER XMB_TEXTURE_IMAGES, @@ -2426,9 +2421,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT: return xmb->textures.list[XMB_TEXTURE_ROOM]; case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS: - return xmb->textures.list[XMB_TEXTURE_IROOM]; - case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_LANROOM]; + return xmb->textures.list[XMB_TEXTURE_RELOAD]; #endif default: break; @@ -2519,10 +2512,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, return xmb->textures.list[XMB_TEXTURE_RESUME]; case MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS: return xmb->textures.list[XMB_TEXTURE_RUN]; - case MENU_SETTING_ACTION: - if (xmb->depth == 3) - return xmb->textures.list[XMB_TEXTURE_SUBSETTING]; - return xmb->textures.list[XMB_TEXTURE_SETTING]; + case MENU_SETTING_GROUP: #ifdef HAVE_LAKKA_SWITCH case MENU_SET_SWITCH_BRIGHTNESS: @@ -2535,14 +2525,16 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, #ifdef HAVE_NETWORKING case MENU_ROOM: return xmb->textures.list[XMB_TEXTURE_ROOM]; -#if 0 - /* stub these out until we have the icons */ case MENU_ROOM_LAN: return xmb->textures.list[XMB_TEXTURE_ROOM_LAN]; - case MENU_ROOM_MITM: - return xmb->textures.list[XMB_TEXTURE_ROOM_MITM]; -#endif + case MENU_ROOM_RELAY: + return xmb->textures.list[XMB_TEXTURE_ROOM_RELAY]; #endif + case MENU_SETTING_ACTION: + if (xmb->depth <= 3) + return xmb->textures.list[XMB_TEXTURE_SETTING]; + default: + return xmb->textures.list[XMB_TEXTURE_SUBSETTING]; } #ifdef HAVE_CHEEVOS @@ -4547,18 +4539,11 @@ static const char *xmb_texture_path(unsigned id) case XMB_TEXTURE_NETPLAY: return "netplay.png"; case XMB_TEXTURE_ROOM: - return "room.png"; - case XMB_TEXTURE_LANROOM: - return "netplay - LAN Room.png"; - case XMB_TEXTURE_IROOM: - return "netplay - iRoom.png"; -#if 0 - /* stub these out until we have the icons */ + return "menu_room.png"; case XMB_TEXTURE_ROOM_LAN: - return "room_lan.png"; - case XMB_TEXTURE_ROOM_MITM: - return "room_mitm.png"; -#endif + return "menu_room_lan.png"; + case XMB_TEXTURE_ROOM_RELAY: + return "menu_room_relay.png"; #endif case XMB_TEXTURE_KEY: return "key.png"; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 7546482f5b..dee87c546a 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -171,10 +171,8 @@ enum menu_settings_type MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS, MENU_WIFI, MENU_ROOM, -/* MENU_ROOM_LAN, - MENU_ROOM_MITM, -*/ + MENU_ROOM_RELAY, MENU_NETPLAY_LAN_SCAN, MENU_INFO_MESSAGE, MENU_SETTINGS_SHADER_PARAMETER_0,