summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Feng Chen2021-09-30 15:47:28 +0800
committerGravatar Feng Chen2021-10-11 13:12:51 +0800
commit0ee2185c59aefdba4fc8c9393fbb3b0d168eb004 (patch)
treebd41554d93e160eac5546fe546d657ebf3b49e90 /src
parentMerge pull request #7043 from astrelsky/cmake (diff)
downloadyuzu-0ee2185c59aefdba4fc8c9393fbb3b0d168eb004.tar.gz
yuzu-0ee2185c59aefdba4fc8c9393fbb3b0d168eb004.tar.xz
yuzu-0ee2185c59aefdba4fc8c9393fbb3b0d168eb004.zip
applets/web: Fallback to loader to get the manual romfs if none is found
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/applets/applet_web_browser.cpp10
1 files changed, 10 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 35f194961..927eeefff 100644
--- a/src/core/hle/service/am/applets/applet_web_browser.cpp
+++ b/src/core/hle/service/am/applets/applet_web_browser.cpp
@@ -24,6 +24,7 @@
24#include "core/hle/service/am/applets/applet_web_browser.h" 24#include "core/hle/service/am/applets/applet_web_browser.h"
25#include "core/hle/service/filesystem/filesystem.h" 25#include "core/hle/service/filesystem/filesystem.h"
26#include "core/hle/service/ns/pl_u.h" 26#include "core/hle/service/ns/pl_u.h"
27#include "core/loader/loader.h"
27 28
28namespace Service::AM::Applets { 29namespace Service::AM::Applets {
29 30
@@ -122,6 +123,15 @@ FileSys::VirtualFile GetOfflineRomFS(Core::System& system, u64 title_id,
122 const auto nca = system.GetContentProvider().GetEntry(title_id, nca_type); 123 const auto nca = system.GetContentProvider().GetEntry(title_id, nca_type);
123 124
124 if (nca == nullptr) { 125 if (nca == nullptr) {
126 if (nca_type == FileSys::ContentRecordType::HtmlDocument) {
127 LOG_WARNING(Service_AM, "Falling back to AppLoader to get the RomFS.");
128 FileSys::VirtualFile romfs;
129 system.GetAppLoader().ReadManualRomFS(romfs);
130 if (romfs != nullptr) {
131 return romfs;
132 }
133 }
134
125 LOG_ERROR(Service_AM, 135 LOG_ERROR(Service_AM,
126 "NCA of type={} with title_id={:016X} is not found in the ContentProvider!", 136 "NCA of type={} with title_id={:016X} is not found in the ContentProvider!",
127 nca_type, title_id); 137 nca_type, title_id);