From 9af17b633e6986bb9f4b35aa11a41894c7ab88f5 Mon Sep 17 00:00:00 2001 From: Cthulhu-throwaway <96153783+Cthulhu-throwaway@users.noreply.github.com> Date: Thu, 7 Jul 2022 11:08:46 -0300 Subject: [PATCH] (Netplay) Host Ban Submenu (#14151) --- intl/msg_hash_lbl.h | 8 +++++ intl/msg_hash_us.h | 16 ++++++++++ menu/cbs/menu_cbs_deferred_push.c | 2 ++ menu/cbs/menu_cbs_ok.c | 32 ++++++++++++++++++++ menu/cbs/menu_cbs_sublabel.c | 9 +++++- menu/cbs/menu_cbs_title.c | 2 ++ menu/drivers/materialui.c | 1 + menu/drivers/ozone.c | 1 + menu/drivers/xmb.c | 1 + menu/menu_cbs.h | 1 + menu/menu_displaylist.c | 50 +++++++++++++++++++++++++++++++ menu/menu_displaylist.h | 1 + menu/menu_driver.h | 1 + msg_hash.h | 5 ++++ 14 files changed, 129 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 2a8ead97a4..63c7b02d27 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1054,6 +1054,10 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST, "deferred_netplay_kick_list" ) +MSG_HASH( + MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST, + "deferred_netplay_ban_list" + ) MSG_HASH( MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST, "deferred_netplay_lobby_filters_list" @@ -2046,6 +2050,10 @@ MSG_HASH( MENU_ENUM_LABEL_NETPLAY_KICK, "menu_netplay_kick" ) +MSG_HASH( + MENU_ENUM_LABEL_NETPLAY_BAN, + "menu_netplay_ban" + ) MSG_HASH( MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES, "netplay_allow_slaves" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 9ec9151587..7fa045d80d 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -6673,6 +6673,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_KICK, "Kick a client from your currently hosted room." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_BAN, + "Ban Client" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY_BAN, + "Ban a client from your currently hosted room." + ) /* Import Content */ @@ -11691,6 +11699,14 @@ MSG_HASH( MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S, "Failed to kick client: \"%s\"" ) +MSG_HASH( + MSG_NETPLAY_BANNED_CLIENT_S, + "Client banned: \"%s\"" + ) +MSG_HASH( + MSG_NETPLAY_FAILED_TO_BAN_CLIENT_S, + "Failed to ban client: \"%s\"" + ) MSG_HASH( MSG_NETPLAY_STATUS_PLAYING, "Playing" diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index cb0fe66cce..9a7e8a7011 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -208,6 +208,7 @@ GENERIC_DEFERRED_PUSH(deferred_push_network_settings_list, DISPLAYLIST_ GENERIC_DEFERRED_PUSH(deferred_push_subsystem_settings_list, DISPLAYLIST_SUBSYSTEM_SETTINGS_LIST) GENERIC_DEFERRED_PUSH(deferred_push_network_hosting_settings_list, DISPLAYLIST_NETWORK_HOSTING_SETTINGS_LIST) GENERIC_DEFERRED_PUSH(deferred_push_netplay_kick_list, DISPLAYLIST_NETPLAY_KICK_LIST) +GENERIC_DEFERRED_PUSH(deferred_push_netplay_ban_list, DISPLAYLIST_NETPLAY_BAN_LIST) GENERIC_DEFERRED_PUSH(deferred_push_netplay_lobby_filters_list, DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST) GENERIC_DEFERRED_PUSH(deferred_push_lakka_services_list, DISPLAYLIST_LAKKA_SERVICES_LIST) GENERIC_DEFERRED_PUSH(deferred_push_user_settings_list, DISPLAYLIST_USER_SETTINGS_LIST) @@ -743,6 +744,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DEFERRED_SUBSYSTEM_SETTINGS_LIST, deferred_push_subsystem_settings_list}, {MENU_ENUM_LABEL_DEFERRED_NETWORK_HOSTING_SETTINGS_LIST, deferred_push_network_hosting_settings_list}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST, deferred_push_netplay_kick_list}, + {MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST, deferred_push_netplay_ban_list}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST, deferred_push_netplay_lobby_filters_list}, {MENU_ENUM_LABEL_DEFERRED_BLUETOOTH_SETTINGS_LIST, deferred_push_bluetooth_settings_list}, {MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, deferred_push_wifi_settings_list}, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index c0c8179388..dbe65485ba 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -415,6 +415,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl) return MENU_ENUM_LABEL_DEFERRED_NETWORK_HOSTING_SETTINGS_LIST; case ACTION_OK_DL_NETPLAY_KICK_LIST: return MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST; + case ACTION_OK_DL_NETPLAY_BAN_LIST: + return MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST; case ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST: return MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST; case ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST: @@ -1583,6 +1585,7 @@ int generic_action_ok_displaylist_push(const char *path, case ACTION_OK_DL_NETWORK_SETTINGS_LIST: case ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST: case ACTION_OK_DL_NETPLAY_KICK_LIST: + case ACTION_OK_DL_NETPLAY_BAN_LIST: case ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST: case ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST: case ACTION_OK_DL_BLUETOOTH_SETTINGS_LIST: @@ -5785,6 +5788,7 @@ DEFAULT_ACTION_OK_FUNC(action_ok_saving_list, ACTION_OK_DL_SAVING_SETTINGS_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_network_list, ACTION_OK_DL_NETWORK_SETTINGS_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_network_hosting_list, ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_netplay_kick_list, ACTION_OK_DL_NETPLAY_KICK_LIST) +DEFAULT_ACTION_OK_FUNC(action_ok_netplay_ban_list, ACTION_OK_DL_NETPLAY_BAN_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_netplay_lobby_filters_list, ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_subsystem_list, ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_database_manager_list, ACTION_OK_DL_DATABASE_MANAGER_LIST) @@ -6173,6 +6177,28 @@ static int action_ok_push_netplay_kick(const char *path, const char *label, return action_cancel_pop_default(NULL, NULL, 0, 0); } + +static int action_ok_push_netplay_ban(const char *path, const char *label, + unsigned type, size_t idx, size_t entry_idx) +{ + char msg[256]; + netplay_client_info_t client; + + client.id = (int)strtol(label, NULL, 10); + strlcpy(client.name, path, sizeof(client.name)); + + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_BAN_CLIENT, &client)) + snprintf(msg, sizeof(msg), + msg_hash_to_str(MSG_NETPLAY_BANNED_CLIENT_S), client.name); + else + snprintf(msg, sizeof(msg), + msg_hash_to_str(MSG_NETPLAY_FAILED_TO_BAN_CLIENT_S), client.name); + + runloop_msg_queue_push(msg, 1, 180, true, NULL, + MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + + return action_cancel_pop_default(NULL, NULL, 0, 0); +} #endif DEFAULT_ACTION_OK_DL_PUSH(action_ok_content_collection_list, FILEBROWSER_SELECT_COLLECTION, ACTION_OK_DL_CONTENT_COLLECTION_LIST, NULL) @@ -8341,6 +8367,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, #endif {MENU_ENUM_LABEL_NETWORK_HOSTING_SETTINGS, action_ok_network_hosting_list}, {MENU_ENUM_LABEL_NETPLAY_KICK, action_ok_netplay_kick_list}, + {MENU_ENUM_LABEL_NETPLAY_BAN, action_ok_netplay_ban_list}, {MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS, action_ok_netplay_lobby_filters_list}, {MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS, action_ok_subsystem_list}, {MENU_ENUM_LABEL_NETWORK_SETTINGS, action_ok_network_list}, @@ -8840,6 +8867,11 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs, case MENU_NETPLAY_KICK: #ifdef HAVE_NETWORKING BIND_ACTION_OK(cbs, action_ok_push_netplay_kick); +#endif + break; + case MENU_NETPLAY_BAN: +#ifdef HAVE_NETWORKING + BIND_ACTION_OK(cbs, action_ok_push_netplay_ban); #endif break; case FILE_TYPE_CURSOR: diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 72b3421db4..d9228ab4fd 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -789,6 +789,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_netplay_enable_host, DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_netplay_enable_client, MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_netplay_disconnect, MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_netplay_kick, MENU_ENUM_SUBLABEL_NETPLAY_KICK) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_netplay_ban, MENU_ENUM_SUBLABEL_NETPLAY_BAN) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_scan_file, MENU_ENUM_SUBLABEL_SCAN_FILE) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_scan_directory, MENU_ENUM_SUBLABEL_SCAN_DIRECTORY) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_swap_interval, MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL) @@ -1636,7 +1637,7 @@ static int action_bind_sublabel_netplay_kick_client(file_list_t *list, if (client->ping >= 0) { - snprintf(buf, sizeof(buf), "\nPing: %u", (unsigned)client->ping); + snprintf(buf, sizeof(buf), "\nPing: %u ms", (unsigned)client->ping); strlcat(s, buf, len); } @@ -3168,6 +3169,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_NETPLAY_KICK: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick); break; + case MENU_ENUM_LABEL_NETPLAY_BAN: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_ban); + break; case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_disconnect); break; @@ -4063,6 +4067,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_NETPLAY_KICK_CLIENT: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick_client); break; + case MENU_ENUM_LABEL_NETPLAY_BAN_CLIENT: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick_client); + break; #endif #ifdef HAVE_CHEEVOS case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 9830e7bac0..c7773e468b 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -651,6 +651,7 @@ DEFAULT_TITLE_MACRO(action_get_wifi_networks_list, MENU_ENUM_LABEL_ DEFAULT_TITLE_MACRO(action_get_wifi_settings_list, MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS) DEFAULT_TITLE_MACRO(action_get_network_hosting_settings_list, MENU_ENUM_LABEL_VALUE_NETWORK_HOSTING_SETTINGS) DEFAULT_TITLE_MACRO(action_get_netplay_kick_list, MENU_ENUM_LABEL_VALUE_NETPLAY_KICK) +DEFAULT_TITLE_MACRO(action_get_netplay_ban_list, MENU_ENUM_LABEL_VALUE_NETPLAY_BAN) DEFAULT_TITLE_MACRO(action_get_netplay_lobby_filters_list, MENU_ENUM_LABEL_VALUE_NETPLAY_LOBBY_FILTERS) DEFAULT_TITLE_MACRO(action_get_subsystem_settings_list, MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS) DEFAULT_TITLE_MACRO(action_get_network_settings_list, MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS) @@ -1000,6 +1001,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, {MENU_ENUM_LABEL_DEFERRED_UPDATER_SETTINGS_LIST, action_get_updater_settings_list}, {MENU_ENUM_LABEL_DEFERRED_NETWORK_HOSTING_SETTINGS_LIST, action_get_network_hosting_settings_list}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST, action_get_netplay_kick_list}, + {MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST, action_get_netplay_ban_list}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST, action_get_netplay_lobby_filters_list}, {MENU_ENUM_LABEL_DEFERRED_SUBSYSTEM_SETTINGS_LIST, action_get_subsystem_settings_list}, {MENU_ENUM_LABEL_DEFERRED_NETWORK_SETTINGS_LIST, action_get_network_settings_list}, diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 2820da6702..5b8efc6a5b 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -10643,6 +10643,7 @@ static void materialui_list_insert( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_KICK)) || + string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_BAN)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_LOAD)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR)) || diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 981b8704a4..2c1c57c2de 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -1881,6 +1881,7 @@ static uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_NETWORK_HOSTING_SETTINGS: case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS: case MENU_ENUM_LABEL_NETPLAY_KICK: + case MENU_ENUM_LABEL_NETPLAY_BAN: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_NETWORK]; case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_BLUETOOTH]; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index b390ab0d98..1a738e80fd 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2869,6 +2869,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case MENU_ENUM_LABEL_NETWORK_HOSTING_SETTINGS: case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS: case MENU_ENUM_LABEL_NETPLAY_KICK: + case MENU_ENUM_LABEL_NETPLAY_BAN: return xmb->textures.list[XMB_TEXTURE_NETWORK]; #endif case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS: diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 1c7bdeaaf4..4c31308115 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -203,6 +203,7 @@ enum ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST, ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST, ACTION_OK_DL_NETPLAY_KICK_LIST, + ACTION_OK_DL_NETPLAY_BAN_LIST, ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST, ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST, ACTION_OK_DL_LAKKA_SERVICES_LIST, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 5bc7d48bec..c43c838684 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -10700,6 +10700,41 @@ static unsigned menu_displaylist_netplay_kick(file_list_t *list) return count; } + +static unsigned menu_displaylist_netplay_ban(file_list_t *list) +{ + unsigned count = 0; + + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_REFRESH_CLIENT_INFO, NULL)) + { + size_t i; + char client_id[4]; + netplay_client_info_t *client; + net_driver_state_t *net_st = networking_state_get_ptr(); + + for (i = 0; i < net_st->client_info_count; i++) + { + client = &net_st->client_info[i]; + + snprintf(client_id, sizeof(client_id), "%d", client->id); + if (menu_entries_append_enum(list, client->name, client_id, + MENU_ENUM_LABEL_NETPLAY_BAN_CLIENT, + MENU_NETPLAY_BAN, + 0, i)) + count++; + } + } + + if (count == 0) + if (menu_entries_append_enum(list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_NETPLAY_CLIENTS_FOUND), + msg_hash_to_str(MENU_ENUM_LABEL_NO_NETPLAY_CLIENTS_FOUND), + MENU_ENUM_LABEL_NO_NETPLAY_CLIENTS_FOUND, + 0, 0, 0)) + count++; + + return count; +} #endif bool menu_displaylist_has_subsystems(void) @@ -10771,11 +10806,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, MENU_ENUM_LABEL_NETPLAY_DISCONNECT, MENU_SETTING_ACTION, 0, 0); if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) + { menu_entries_append_enum(list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_KICK), msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_KICK), MENU_ENUM_LABEL_NETPLAY_KICK, MENU_SETTING_ACTION, 0, 0); + menu_entries_append_enum(list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_BAN), + msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_BAN), + MENU_ENUM_LABEL_NETPLAY_BAN, + MENU_SETTING_ACTION, 0, 0); + } } } else @@ -10823,6 +10865,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, #ifdef HAVE_NETWORKING menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); count = menu_displaylist_netplay_kick(info->list); +#endif + info->need_push = true; + info->need_refresh = true; + break; + case DISPLAYLIST_NETPLAY_BAN_LIST: +#ifdef HAVE_NETWORKING + menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); + count = menu_displaylist_netplay_ban(info->list); #endif info->need_push = true; info->need_refresh = true; diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 6a954d1e90..a075d1b777 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -219,6 +219,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_NETWORK_SETTINGS_LIST, DISPLAYLIST_NETWORK_HOSTING_SETTINGS_LIST, DISPLAYLIST_NETPLAY_KICK_LIST, + DISPLAYLIST_NETPLAY_BAN_LIST, DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST, DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST, DISPLAYLIST_LAKKA_SERVICES_LIST, diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 23ccb70126..c1a26a2022 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -170,6 +170,7 @@ enum menu_settings_type MENU_ROOM_RELAY, MENU_NETPLAY_LAN_SCAN, MENU_NETPLAY_KICK, + MENU_NETPLAY_BAN, MENU_INFO_MESSAGE, MENU_SETTINGS_SHADER_PARAMETER_0, MENU_SETTINGS_SHADER_PARAMETER_LAST = MENU_SETTINGS_SHADER_PARAMETER_0 + (GFX_MAX_PARAMETERS - 1), diff --git a/msg_hash.h b/msg_hash.h index e585cdefd8..1ab1625753 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -219,6 +219,8 @@ enum msg_hash_enums MSG_NETPLAY_CHANGED_NICK, MSG_NETPLAY_KICKED_CLIENT_S, MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S, + MSG_NETPLAY_BANNED_CLIENT_S, + MSG_NETPLAY_FAILED_TO_BAN_CLIENT_S, MSG_NETPLAY_STATUS_PLAYING, MSG_NETPLAY_STATUS_SPECTATING, MSG_NETPLAY_CLIENT_DEVICES, @@ -1781,6 +1783,9 @@ enum msg_hash_enums MENU_LABEL(NETPLAY_KICK), MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST, MENU_ENUM_LABEL_NETPLAY_KICK_CLIENT, + MENU_LABEL(NETPLAY_BAN), + MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST, + MENU_ENUM_LABEL_NETPLAY_BAN_CLIENT, MENU_LABEL(NO_NETPLAY_HOSTS_FOUND), MENU_LABEL(NO_NETPLAY_CLIENTS_FOUND),