mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
(Netplay) Host Ban Submenu (#14151)
This commit is contained in:
parent
f9c6ccee75
commit
9af17b633e
@ -1054,6 +1054,10 @@ MSG_HASH(
|
|||||||
MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST,
|
MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST,
|
||||||
"deferred_netplay_kick_list"
|
"deferred_netplay_kick_list"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST,
|
||||||
|
"deferred_netplay_ban_list"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST,
|
MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST,
|
||||||
"deferred_netplay_lobby_filters_list"
|
"deferred_netplay_lobby_filters_list"
|
||||||
@ -2046,6 +2050,10 @@ MSG_HASH(
|
|||||||
MENU_ENUM_LABEL_NETPLAY_KICK,
|
MENU_ENUM_LABEL_NETPLAY_KICK,
|
||||||
"menu_netplay_kick"
|
"menu_netplay_kick"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_NETPLAY_BAN,
|
||||||
|
"menu_netplay_ban"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES,
|
MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES,
|
||||||
"netplay_allow_slaves"
|
"netplay_allow_slaves"
|
||||||
|
@ -6673,6 +6673,14 @@ MSG_HASH(
|
|||||||
MENU_ENUM_SUBLABEL_NETPLAY_KICK,
|
MENU_ENUM_SUBLABEL_NETPLAY_KICK,
|
||||||
"Kick a client from your currently hosted room."
|
"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 */
|
/* Import Content */
|
||||||
|
|
||||||
@ -11691,6 +11699,14 @@ MSG_HASH(
|
|||||||
MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S,
|
MSG_NETPLAY_FAILED_TO_KICK_CLIENT_S,
|
||||||
"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_HASH(
|
||||||
MSG_NETPLAY_STATUS_PLAYING,
|
MSG_NETPLAY_STATUS_PLAYING,
|
||||||
"Playing"
|
"Playing"
|
||||||
|
@ -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_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_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_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_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_lakka_services_list, DISPLAYLIST_LAKKA_SERVICES_LIST)
|
||||||
GENERIC_DEFERRED_PUSH(deferred_push_user_settings_list, DISPLAYLIST_USER_SETTINGS_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_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_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_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_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_BLUETOOTH_SETTINGS_LIST, deferred_push_bluetooth_settings_list},
|
||||||
{MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, deferred_push_wifi_settings_list},
|
{MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, deferred_push_wifi_settings_list},
|
||||||
|
@ -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;
|
return MENU_ENUM_LABEL_DEFERRED_NETWORK_HOSTING_SETTINGS_LIST;
|
||||||
case ACTION_OK_DL_NETPLAY_KICK_LIST:
|
case ACTION_OK_DL_NETPLAY_KICK_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_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:
|
case ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST;
|
||||||
case ACTION_OK_DL_SUBSYSTEM_SETTINGS_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_SETTINGS_LIST:
|
||||||
case ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST:
|
case ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST:
|
||||||
case ACTION_OK_DL_NETPLAY_KICK_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_NETPLAY_LOBBY_FILTERS_LIST:
|
||||||
case ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST:
|
case ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST:
|
||||||
case ACTION_OK_DL_BLUETOOTH_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_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_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_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_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_subsystem_list, ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST)
|
||||||
DEFAULT_ACTION_OK_FUNC(action_ok_database_manager_list, ACTION_OK_DL_DATABASE_MANAGER_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);
|
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
|
#endif
|
||||||
|
|
||||||
DEFAULT_ACTION_OK_DL_PUSH(action_ok_content_collection_list, FILEBROWSER_SELECT_COLLECTION, ACTION_OK_DL_CONTENT_COLLECTION_LIST, NULL)
|
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
|
#endif
|
||||||
{MENU_ENUM_LABEL_NETWORK_HOSTING_SETTINGS, action_ok_network_hosting_list},
|
{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_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_NETPLAY_LOBBY_FILTERS, action_ok_netplay_lobby_filters_list},
|
||||||
{MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS, action_ok_subsystem_list},
|
{MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS, action_ok_subsystem_list},
|
||||||
{MENU_ENUM_LABEL_NETWORK_SETTINGS, action_ok_network_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:
|
case MENU_NETPLAY_KICK:
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
BIND_ACTION_OK(cbs, action_ok_push_netplay_kick);
|
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
|
#endif
|
||||||
break;
|
break;
|
||||||
case FILE_TYPE_CURSOR:
|
case FILE_TYPE_CURSOR:
|
||||||
|
@ -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_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_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_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_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_scan_directory, MENU_ENUM_SUBLABEL_SCAN_DIRECTORY)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_swap_interval, MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL)
|
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)
|
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);
|
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:
|
case MENU_ENUM_LABEL_NETPLAY_KICK:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick);
|
||||||
break;
|
break;
|
||||||
|
case MENU_ENUM_LABEL_NETPLAY_BAN:
|
||||||
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_ban);
|
||||||
|
break;
|
||||||
case MENU_ENUM_LABEL_NETPLAY_DISCONNECT:
|
case MENU_ENUM_LABEL_NETPLAY_DISCONNECT:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_disconnect);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_disconnect);
|
||||||
break;
|
break;
|
||||||
@ -4063,6 +4067,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||||||
case MENU_ENUM_LABEL_NETPLAY_KICK_CLIENT:
|
case MENU_ENUM_LABEL_NETPLAY_KICK_CLIENT:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick_client);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick_client);
|
||||||
break;
|
break;
|
||||||
|
case MENU_ENUM_LABEL_NETPLAY_BAN_CLIENT:
|
||||||
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_kick_client);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
case MENU_ENUM_LABEL_ACHIEVEMENT_LIST:
|
case MENU_ENUM_LABEL_ACHIEVEMENT_LIST:
|
||||||
|
@ -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_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_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_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_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_subsystem_settings_list, MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS)
|
||||||
DEFAULT_TITLE_MACRO(action_get_network_settings_list, MENU_ENUM_LABEL_VALUE_NETWORK_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_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_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_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_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_SUBSYSTEM_SETTINGS_LIST, action_get_subsystem_settings_list},
|
||||||
{MENU_ENUM_LABEL_DEFERRED_NETWORK_SETTINGS_LIST, action_get_network_settings_list},
|
{MENU_ENUM_LABEL_DEFERRED_NETWORK_SETTINGS_LIST, action_get_network_settings_list},
|
||||||
|
@ -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_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_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_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_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_CORE)) ||
|
||||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR)) ||
|
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR)) ||
|
||||||
|
@ -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_NETWORK_HOSTING_SETTINGS:
|
||||||
case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS:
|
case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS:
|
||||||
case MENU_ENUM_LABEL_NETPLAY_KICK:
|
case MENU_ENUM_LABEL_NETPLAY_KICK:
|
||||||
|
case MENU_ENUM_LABEL_NETPLAY_BAN:
|
||||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_NETWORK];
|
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_NETWORK];
|
||||||
case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS:
|
case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS:
|
||||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_BLUETOOTH];
|
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_BLUETOOTH];
|
||||||
|
@ -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_NETWORK_HOSTING_SETTINGS:
|
||||||
case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS:
|
case MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS:
|
||||||
case MENU_ENUM_LABEL_NETPLAY_KICK:
|
case MENU_ENUM_LABEL_NETPLAY_KICK:
|
||||||
|
case MENU_ENUM_LABEL_NETPLAY_BAN:
|
||||||
return xmb->textures.list[XMB_TEXTURE_NETWORK];
|
return xmb->textures.list[XMB_TEXTURE_NETWORK];
|
||||||
#endif
|
#endif
|
||||||
case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS:
|
case MENU_ENUM_LABEL_BLUETOOTH_SETTINGS:
|
||||||
|
@ -203,6 +203,7 @@ enum
|
|||||||
ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST,
|
ACTION_OK_DL_SUBSYSTEM_SETTINGS_LIST,
|
||||||
ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST,
|
ACTION_OK_DL_NETWORK_HOSTING_SETTINGS_LIST,
|
||||||
ACTION_OK_DL_NETPLAY_KICK_LIST,
|
ACTION_OK_DL_NETPLAY_KICK_LIST,
|
||||||
|
ACTION_OK_DL_NETPLAY_BAN_LIST,
|
||||||
ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST,
|
ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST,
|
||||||
ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST,
|
ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST,
|
||||||
ACTION_OK_DL_LAKKA_SERVICES_LIST,
|
ACTION_OK_DL_LAKKA_SERVICES_LIST,
|
||||||
|
@ -10700,6 +10700,41 @@ static unsigned menu_displaylist_netplay_kick(file_list_t *list)
|
|||||||
|
|
||||||
return count;
|
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
|
#endif
|
||||||
|
|
||||||
bool menu_displaylist_has_subsystems(void)
|
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_ENUM_LABEL_NETPLAY_DISCONNECT,
|
||||||
MENU_SETTING_ACTION, 0, 0);
|
MENU_SETTING_ACTION, 0, 0);
|
||||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
|
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
|
||||||
|
{
|
||||||
menu_entries_append_enum(list,
|
menu_entries_append_enum(list,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_KICK),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_KICK),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_KICK),
|
msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_KICK),
|
||||||
MENU_ENUM_LABEL_NETPLAY_KICK,
|
MENU_ENUM_LABEL_NETPLAY_KICK,
|
||||||
MENU_SETTING_ACTION, 0, 0);
|
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
|
else
|
||||||
@ -10823,6 +10865,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
count = menu_displaylist_netplay_kick(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
|
#endif
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
info->need_refresh = true;
|
info->need_refresh = true;
|
||||||
|
@ -219,6 +219,7 @@ enum menu_displaylist_ctl_state
|
|||||||
DISPLAYLIST_NETWORK_SETTINGS_LIST,
|
DISPLAYLIST_NETWORK_SETTINGS_LIST,
|
||||||
DISPLAYLIST_NETWORK_HOSTING_SETTINGS_LIST,
|
DISPLAYLIST_NETWORK_HOSTING_SETTINGS_LIST,
|
||||||
DISPLAYLIST_NETPLAY_KICK_LIST,
|
DISPLAYLIST_NETPLAY_KICK_LIST,
|
||||||
|
DISPLAYLIST_NETPLAY_BAN_LIST,
|
||||||
DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST,
|
DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST,
|
||||||
DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST,
|
DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST,
|
||||||
DISPLAYLIST_LAKKA_SERVICES_LIST,
|
DISPLAYLIST_LAKKA_SERVICES_LIST,
|
||||||
|
@ -170,6 +170,7 @@ enum menu_settings_type
|
|||||||
MENU_ROOM_RELAY,
|
MENU_ROOM_RELAY,
|
||||||
MENU_NETPLAY_LAN_SCAN,
|
MENU_NETPLAY_LAN_SCAN,
|
||||||
MENU_NETPLAY_KICK,
|
MENU_NETPLAY_KICK,
|
||||||
|
MENU_NETPLAY_BAN,
|
||||||
MENU_INFO_MESSAGE,
|
MENU_INFO_MESSAGE,
|
||||||
MENU_SETTINGS_SHADER_PARAMETER_0,
|
MENU_SETTINGS_SHADER_PARAMETER_0,
|
||||||
MENU_SETTINGS_SHADER_PARAMETER_LAST = MENU_SETTINGS_SHADER_PARAMETER_0 + (GFX_MAX_PARAMETERS - 1),
|
MENU_SETTINGS_SHADER_PARAMETER_LAST = MENU_SETTINGS_SHADER_PARAMETER_0 + (GFX_MAX_PARAMETERS - 1),
|
||||||
|
@ -219,6 +219,8 @@ enum msg_hash_enums
|
|||||||
MSG_NETPLAY_CHANGED_NICK,
|
MSG_NETPLAY_CHANGED_NICK,
|
||||||
MSG_NETPLAY_KICKED_CLIENT_S,
|
MSG_NETPLAY_KICKED_CLIENT_S,
|
||||||
MSG_NETPLAY_FAILED_TO_KICK_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_PLAYING,
|
||||||
MSG_NETPLAY_STATUS_SPECTATING,
|
MSG_NETPLAY_STATUS_SPECTATING,
|
||||||
MSG_NETPLAY_CLIENT_DEVICES,
|
MSG_NETPLAY_CLIENT_DEVICES,
|
||||||
@ -1781,6 +1783,9 @@ enum msg_hash_enums
|
|||||||
MENU_LABEL(NETPLAY_KICK),
|
MENU_LABEL(NETPLAY_KICK),
|
||||||
MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST,
|
MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST,
|
||||||
MENU_ENUM_LABEL_NETPLAY_KICK_CLIENT,
|
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_HOSTS_FOUND),
|
||||||
MENU_LABEL(NO_NETPLAY_CLIENTS_FOUND),
|
MENU_LABEL(NO_NETPLAY_CLIENTS_FOUND),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user