summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJoshua Vandaƫle <joshua@vandaele.software>2026-09-15 09:12:05 +0200
committerJoshua Vandaƫle <joshua@vandaele.software>2026-09-15 09:44:41 +0200
commit9386b577b39c4e53bffe3a31aa267f6b75f5b641 (patch)
tree705ca589c40055a17bda899dbd358aa8f48b09c1 /Source/Core
parent9611279be550ee262f30b7b0d11f92a0d5fc08f5 (diff)
NetPlayIndex: Fix regression introduced in 14738
For some reason, #14738 removed the headers and allowed return codes which broke using the Netplay index for users. Also, bools converted to a string using std::to_string would become 0/1, while fmt::format by default turns them into false/true, which also broke the index.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/UICommon/NetPlayIndex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/UICommon/NetPlayIndex.cpp b/Source/Core/UICommon/NetPlayIndex.cpp
index b6b228b702..a1b0edf976 100644
--- a/Source/Core/UICommon/NetPlayIndex.cpp
+++ b/Source/Core/UICommon/NetPlayIndex.cpp
@@ -131,7 +131,7 @@ void NetPlayIndex::NotificationLoop()
auto response = request.Get(
fmt::format(
"{base}/v0/session/active?secret={secret}&player_count={player_count}&game={game}"
- "&in_game={in_game}",
+ "&in_game={in_game:d}",
fmt::arg("base", Config::Get(Config::NETPLAY_INDEX_URL)), fmt::arg("secret", m_secret),
fmt::arg("player_count", m_player_count),
fmt::arg("game", request.EscapeComponent(m_game)), fmt::arg("in_game", m_in_game)),
@@ -167,7 +167,7 @@ bool NetPlayIndex::Add(const NetPlaySession& session)
Common::HttpRequest request;
auto response = request.Get(
fmt::format("{base}/v0/session/add?name={name}&region={region}&game={game}"
- "&password={password}&method={method}&server_id={server_id}&in_game={in_game}"
+ "&password={password:d}&method={method}&server_id={server_id}&in_game={in_game:d}"
"&port={port}&player_count={player_count}&version={version}",
fmt::arg("base", Config::Get(Config::NETPLAY_INDEX_URL)),
fmt::arg("name", request.EscapeComponent(session.name)),
@@ -176,7 +176,8 @@ bool NetPlayIndex::Add(const NetPlaySession& session)
fmt::arg("password", session.has_password), fmt::arg("method", session.method),
fmt::arg("server_id", session.server_id), fmt::arg("in_game", session.in_game),
fmt::arg("port", session.port), fmt::arg("player_count", session.player_count),
- fmt::arg("version", Common::GetScmDescStr())));
+ fmt::arg("version", Common::GetScmDescStr())),
+ {{"X-Is-Dolphin", "1"}}, Common::HttpRequest::AllowedReturnCodes::All);
if (!response.has_value())
{
m_last_error = "NO_RESPONSE";