From 977418c65bdaa3f1157eafff0a4608e483b0bacb Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sun, 1 Mar 2020 22:25:36 +0100 Subject: core/web_browser: Allow WebApplet to exit gracefully when an error occurs Currently, yuzu just freezes when an error occurs while Initializing the WebApplet. From a user perspective, this obviously isn't great as the game just softlocks. With this change, yuzu will call the Finalize method, so to the game it seems like as the user just exited the WebApplet normally. This works around https://github.com/yuzu-emu/yuzu/issues/2852. --- src/core/hle/service/am/applets/web_browser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core') diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp index 12443c910..9f30e167d 100644 --- a/src/core/hle/service/am/applets/web_browser.cpp +++ b/src/core/hle/service/am/applets/web_browser.cpp @@ -254,6 +254,12 @@ void WebBrowser::Execute() { if (status != RESULT_SUCCESS) { complete = true; + + // This is a workaround in order not to softlock yuzu when an error happens during the + // webapplet init. In order to avoid an svcBreak, the status is set to RESULT_SUCCESS + Finalize(); + status = RESULT_SUCCESS; + return; } -- cgit v1.2.3