From ea9b0bff08dab1df92c9aca2da3e748942d85955 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Tue, 24 May 2022 14:43:46 -0700 Subject: [PATCH] NetPlay: Delete NetPlayClient::GetPlayerList It's been unused since DolphinWX was removed in 44b22c90df9c05d18a34667dc41e8d05af24683f. Prior to that, it was used in Source/Core/DolphinWX/NetPlay/NetWindow.cpp. But the new equivalent in Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp uses NetPlayClient::GetPlayers instead. Stringifying (or creating a table, as is done now) should be done by the UI in any case. --- Source/Core/Core/NetPlayClient.cpp | 43 ------------------------------ Source/Core/Core/NetPlayClient.h | 1 - 2 files changed, 44 deletions(-) diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 75f02fa7f8..20c05ce4cc 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -1587,49 +1587,6 @@ void NetPlayClient::ThreadFunc() return; } -// called from ---GUI--- thread -void NetPlayClient::GetPlayerList(std::string& list, std::vector& pid_list) -{ - std::lock_guard lkp(m_crit.players); - - std::ostringstream ss; - - for (const auto& entry : m_players) - { - const Player& player = entry.second; - ss << player.name << "[" << static_cast(player.pid) << "] : " << player.revision << " | " - << GetPlayerMappingString(player.pid, m_pad_map, m_gba_config, m_wiimote_map) << " |\n"; - - ss << "Ping: " << player.ping << "ms\n"; - ss << "Status: "; - - switch (player.game_status) - { - case SyncIdentifierComparison::SameGame: - ss << "ready"; - break; - - case SyncIdentifierComparison::DifferentVersion: - ss << "wrong game version"; - break; - - case SyncIdentifierComparison::DifferentGame: - ss << "game missing"; - break; - - default: - ss << "unknown"; - break; - } - - ss << "\n\n"; - - pid_list.push_back(player.pid); - } - - list = ss.str(); -} - // called from ---GUI--- thread std::vector NetPlayClient::GetPlayers() { diff --git a/Source/Core/Core/NetPlayClient.h b/Source/Core/Core/NetPlayClient.h index 684d1a2616..dc96ac388b 100644 --- a/Source/Core/Core/NetPlayClient.h +++ b/Source/Core/Core/NetPlayClient.h @@ -111,7 +111,6 @@ public: const std::string& name, const NetTraversalConfig& traversal_config); ~NetPlayClient(); - void GetPlayerList(std::string& list, std::vector& pid_list); std::vector GetPlayers(); const NetSettings& GetNetSettings() const;