From dbddd5fa8cec6bbf1bc68943b66cd17217ec1a08 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Sun, 22 Dec 2024 19:38:19 -0500 Subject: [PATCH] GeckoCodeConfig: Remove HTTPS workaround for Android --- Source/Android/jni/Cheats/GeckoCheat.cpp | 2 +- Source/Core/Core/GeckoCodeConfig.cpp | 7 ++----- Source/Core/Core/GeckoCodeConfig.h | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/Android/jni/Cheats/GeckoCheat.cpp b/Source/Android/jni/Cheats/GeckoCheat.cpp index c585acf9ea..276914b27b 100644 --- a/Source/Android/jni/Cheats/GeckoCheat.cpp +++ b/Source/Android/jni/Cheats/GeckoCheat.cpp @@ -191,7 +191,7 @@ Java_org_dolphinemu_dolphinemu_features_cheats_model_GeckoCheat_downloadCodes(JN const std::string gametdb_id = GetJString(env, jGameTdbId); bool success = true; - const std::vector codes = Gecko::DownloadCodes(gametdb_id, &success, false); + const std::vector codes = Gecko::DownloadCodes(gametdb_id, &success); if (!success) return nullptr; diff --git a/Source/Core/Core/GeckoCodeConfig.cpp b/Source/Core/Core/GeckoCodeConfig.cpp index ec16d96e06..58e15775f7 100644 --- a/Source/Core/Core/GeckoCodeConfig.cpp +++ b/Source/Core/Core/GeckoCodeConfig.cpp @@ -17,13 +17,10 @@ namespace Gecko { -std::vector DownloadCodes(std::string gametdb_id, bool* succeeded, bool use_https) +std::vector DownloadCodes(std::string gametdb_id, bool* succeeded) { - // TODO: Fix https://bugs.dolphin-emu.org/issues/11772 so we don't need this workaround - const std::string protocol = use_https ? "https://" : "http://"; - // codes.rc24.xyz is a mirror of the now defunct geckocodes.org. - std::string endpoint{protocol + "codes.rc24.xyz/txt.php?txt=" + gametdb_id}; + std::string endpoint{"https://codes.rc24.xyz/txt.php?txt=" + gametdb_id}; Common::HttpRequest http; // The server always redirects once to the same location. diff --git a/Source/Core/Core/GeckoCodeConfig.h b/Source/Core/Core/GeckoCodeConfig.h index 941e6246f5..26126d49e7 100644 --- a/Source/Core/Core/GeckoCodeConfig.h +++ b/Source/Core/Core/GeckoCodeConfig.h @@ -17,8 +17,7 @@ class IniFile; namespace Gecko { std::vector LoadCodes(const Common::IniFile& globalIni, const Common::IniFile& localIni); -std::vector DownloadCodes(std::string gametdb_id, bool* succeeded, - bool use_https = true); +std::vector DownloadCodes(std::string gametdb_id, bool* succeeded); void SaveCodes(Common::IniFile& inifile, const std::vector& gcodes); std::optional DeserializeLine(const std::string& line);