summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Morph2020-12-08 06:20:45 -0500
committerGravatar Morph2020-12-18 10:33:28 -0500
commit82fa9f8d56bc285e7bb58fc81b495a55be9ea82c (patch)
tree19ca59277d5730dc76d632ab1f0a135f25f19415 /src/core/hle
parentapplets/web: Fix keyboard to emulated controller input (diff)
downloadyuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.tar.gz
yuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.tar.xz
yuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.zip
applets/web: Implement the online web browser applet
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/am/applets/web_browser.cpp12
-rw-r--r--src/core/hle/service/am/applets/web_browser.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp
index 9c8be156f..2ab420789 100644
--- a/src/core/hle/service/am/applets/web_browser.cpp
+++ b/src/core/hle/service/am/applets/web_browser.cpp
@@ -409,7 +409,9 @@ void WebBrowser::InitializeOffline() {
409 409
410void WebBrowser::InitializeShare() {} 410void WebBrowser::InitializeShare() {}
411 411
412void WebBrowser::InitializeWeb() {} 412void WebBrowser::InitializeWeb() {
413 external_url = ParseStringValue(GetInputTLVData(WebArgInputTLVType::InitialURL).value());
414}
413 415
414void WebBrowser::InitializeWifi() {} 416void WebBrowser::InitializeWifi() {}
415 417
@@ -456,8 +458,12 @@ void WebBrowser::ExecuteShare() {
456} 458}
457 459
458void WebBrowser::ExecuteWeb() { 460void WebBrowser::ExecuteWeb() {
459 LOG_WARNING(Service_AM, "(STUBBED) called, Web Applet is not implemented"); 461 LOG_INFO(Service_AM, "Opening external URL at {}", external_url);
460 WebBrowserExit(WebExitReason::EndButtonPressed); 462
463 frontend.OpenExternalWebPage(external_url,
464 [this](WebExitReason exit_reason, std::string last_url) {
465 WebBrowserExit(exit_reason, last_url);
466 });
461} 467}
462 468
463void WebBrowser::ExecuteWifi() { 469void WebBrowser::ExecuteWifi() {
diff --git a/src/core/hle/service/am/applets/web_browser.h b/src/core/hle/service/am/applets/web_browser.h
index 936a49a86..04c274754 100644
--- a/src/core/hle/service/am/applets/web_browser.h
+++ b/src/core/hle/service/am/applets/web_browser.h
@@ -79,6 +79,8 @@ private:
79 std::string offline_document; 79 std::string offline_document;
80 FileSys::VirtualFile offline_romfs; 80 FileSys::VirtualFile offline_romfs;
81 81
82 std::string external_url;
83
82 Core::System& system; 84 Core::System& system;
83}; 85};
84 86