diff options
author | Mai M <mathew1800@gmail.com> | 2021-07-15 09:26:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 09:26:36 +0200 |
commit | 8012c83a87a42dc98b59ed0d2a67b739dac8dcdb (patch) | |
tree | e9ef5810f79cda37bea3ae6b6772595b1413702a | |
parent | Merge pull request #6639 from Morph1984/optimize-linker (diff) | |
parent | applets/web: Resolve Nintendo CDN URLs (diff) | |
download | yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar.gz yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar.bz2 yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar.lz yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar.xz yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.tar.zst yuzu-8012c83a87a42dc98b59ed0d2a67b739dac8dcdb.zip |
-rw-r--r-- | src/core/hle/service/am/applets/applet_web_browser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp index f96f0fee3..35f194961 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/applets/applet_web_browser.cpp @@ -58,6 +58,16 @@ std::string GetMainURL(const std::string& url) { return url.substr(0, index); } +std::string ResolveURL(const std::string& url) { + const auto index = url.find_first_of('%'); + + if (index == std::string::npos) { + return url; + } + + return url.substr(0, index) + "lp1" + url.substr(index + 1); +} + WebArgInputTLVMap ReadWebArgs(const std::vector<u8>& web_arg, WebArgHeader& web_arg_header) { std::memcpy(&web_arg_header, web_arg.data(), sizeof(WebArgHeader)); @@ -407,6 +417,9 @@ void WebBrowser::InitializeShare() {} void WebBrowser::InitializeWeb() { external_url = ParseStringValue(GetInputTLVData(WebArgInputTLVType::InitialURL).value()); + + // Resolve Nintendo CDN URLs. + external_url = ResolveURL(external_url); } void WebBrowser::InitializeWifi() {} |