mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
more shady stuff
This commit is contained in:
parent
2670ec26f6
commit
2bb83b1adb
16 changed files with 93 additions and 86 deletions
|
@ -95,12 +95,10 @@ NetPlayIndex::List(const std::map<std::string, std::string>& filters)
|
|||
const auto& player_count = entry.get("player_count");
|
||||
const auto& port = entry.get("port");
|
||||
const auto& in_game = entry.get("in_game");
|
||||
const auto& version = entry.get("version");
|
||||
|
||||
if (!name.is<std::string>() || !region.is<std::string>() || !method.is<std::string>() ||
|
||||
!server_id.is<std::string>() || !game_id.is<std::string>() || !has_password.is<bool>() ||
|
||||
!player_count.is<double>() || !port.is<double>() || !in_game.is<bool>() ||
|
||||
!version.is<std::string>())
|
||||
!player_count.is<double>() || !port.is<double>() || !in_game.is<bool>())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -111,7 +109,7 @@ NetPlayIndex::List(const std::map<std::string, std::string>& filters)
|
|||
session.game_id = game_id.to_str();
|
||||
session.server_id = server_id.to_str();
|
||||
session.method = method.to_str();
|
||||
session.version = version.to_str();
|
||||
session.version = "MPN";
|
||||
session.has_password = has_password.get<bool>();
|
||||
session.player_count = static_cast<int>(player_count.get<double>());
|
||||
session.port = static_cast<int>(port.get<double>());
|
||||
|
@ -169,8 +167,8 @@ bool NetPlayIndex::Add(const NetPlaySession& session)
|
|||
"&game=" + request.EscapeComponent(session.game_id) +
|
||||
"&password=" + std::to_string(session.has_password) + "&method=" + session.method +
|
||||
"&server_id=" + session.server_id + "&in_game=" + std::to_string(session.in_game) +
|
||||
"&port=" + std::to_string(session.port) + "&player_count=" +
|
||||
std::to_string(session.player_count) + "&version=" + Common::GetScmDescStr(),
|
||||
"&port=" + std::to_string(session.port) + "&player_count=" + std::to_string(session.player_count) +
|
||||
"&version=MPN",
|
||||
{{"X-Is-Dolphin", "1"}}, Common::HttpRequest::AllowedReturnCodes::All);
|
||||
|
||||
if (!response.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue