summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Bakugo2019-07-02 00:57:23 +0100
committerGravatar Bakugo2019-07-02 00:57:23 +0100
commitb50557d1f02d2784dbda733b4cf21c769d1cae4d (patch)
tree3590623336f83ebc96878703e4e52f34a05d6a58
parentfile_sys/registered_cache: Improve missing metadata error (diff)
downloadyuzu-b50557d1f02d2784dbda733b4cf21c769d1cae4d.tar.gz
yuzu-b50557d1f02d2784dbda733b4cf21c769d1cae4d.tar.xz
yuzu-b50557d1f02d2784dbda733b4cf21c769d1cae4d.zip
file_sys: Rename other ContentRecordType members
-rw-r--r--src/core/file_sys/nca_metadata.h4
-rw-r--r--src/core/file_sys/registered_cache.cpp2
-rw-r--r--src/core/hle/service/am/applets/web_browser.cpp4
-rw-r--r--src/core/loader/nsp.cpp3
-rw-r--r--src/core/loader/xci.cpp2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/core/file_sys/nca_metadata.h b/src/core/file_sys/nca_metadata.h
index 53ea3709b..1f82fff0a 100644
--- a/src/core/file_sys/nca_metadata.h
+++ b/src/core/file_sys/nca_metadata.h
@@ -35,8 +35,8 @@ enum class ContentRecordType : u8 {
35 Program = 1, 35 Program = 1,
36 Data = 2, 36 Data = 2,
37 Control = 3, 37 Control = 3,
38 Manual = 4, 38 HtmlDocument = 4,
39 Legal = 5, 39 LegalInformation = 5,
40 DeltaFragment = 6, 40 DeltaFragment = 6,
41}; 41};
42 42
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index dfde04dd6..3725b10f7 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -99,7 +99,7 @@ ContentRecordType GetCRTypeFromNCAType(NCAContentType type) {
99 return ContentRecordType::Data; 99 return ContentRecordType::Data;
100 case NCAContentType::Manual: 100 case NCAContentType::Manual:
101 // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal. 101 // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal.
102 return ContentRecordType::Manual; 102 return ContentRecordType::HtmlDocument;
103 default: 103 default:
104 UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast<u8>(type)); 104 UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast<u8>(type));
105 } 105 }
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp
index 2762e0653..f3c9fef0e 100644
--- a/src/core/hle/service/am/applets/web_browser.cpp
+++ b/src/core/hle/service/am/applets/web_browser.cpp
@@ -459,10 +459,10 @@ void WebBrowser::InitializeOffline() {
459 case OfflineWebSource::OfflineHtmlPage: 459 case OfflineWebSource::OfflineHtmlPage:
460 // While there is an AppID TLV field, in official SW this is always ignored. 460 // While there is an AppID TLV field, in official SW this is always ignored.
461 title_id = 0; 461 title_id = 0;
462 type = FileSys::ContentRecordType::Manual; 462 type = FileSys::ContentRecordType::HtmlDocument;
463 break; 463 break;
464 case OfflineWebSource::ApplicationLegalInformation: 464 case OfflineWebSource::ApplicationLegalInformation:
465 type = FileSys::ContentRecordType::Legal; 465 type = FileSys::ContentRecordType::LegalInformation;
466 break; 466 break;
467 case OfflineWebSource::SystemDataPage: 467 case OfflineWebSource::SystemDataPage:
468 type = FileSys::ContentRecordType::Data; 468 type = FileSys::ContentRecordType::Data;
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp
index 3a22ec2c6..b1171ce65 100644
--- a/src/core/loader/nsp.cpp
+++ b/src/core/loader/nsp.cpp
@@ -168,7 +168,8 @@ ResultStatus AppLoader_NSP::ReadControlData(FileSys::NACP& nacp) {
168} 168}
169 169
170ResultStatus AppLoader_NSP::ReadManualRomFS(FileSys::VirtualFile& file) { 170ResultStatus AppLoader_NSP::ReadManualRomFS(FileSys::VirtualFile& file) {
171 const auto nca = nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::Manual); 171 const auto nca =
172 nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::HtmlDocument);
172 if (nsp->GetStatus() != ResultStatus::Success || nca == nullptr) 173 if (nsp->GetStatus() != ResultStatus::Success || nca == nullptr)
173 return ResultStatus::ErrorNoRomFS; 174 return ResultStatus::ErrorNoRomFS;
174 file = nca->GetRomFS(); 175 file = nca->GetRomFS();
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index a5c4d3688..5e8553db9 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -134,7 +134,7 @@ ResultStatus AppLoader_XCI::ReadControlData(FileSys::NACP& control) {
134 134
135ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) { 135ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) {
136 const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(), 136 const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(),
137 FileSys::ContentRecordType::Manual); 137 FileSys::ContentRecordType::HtmlDocument);
138 if (xci->GetStatus() != ResultStatus::Success || nca == nullptr) 138 if (xci->GetStatus() != ResultStatus::Success || nca == nullptr)
139 return ResultStatus::ErrorXCIMissingPartition; 139 return ResultStatus::ErrorXCIMissingPartition;
140 file = nca->GetRomFS(); 140 file = nca->GetRomFS();