From b50557d1f02d2784dbda733b4cf21c769d1cae4d Mon Sep 17 00:00:00 2001 From: Bakugo Date: Tue, 2 Jul 2019 00:57:23 +0100 Subject: file_sys: Rename other ContentRecordType members --- src/core/file_sys/nca_metadata.h | 4 ++-- src/core/file_sys/registered_cache.cpp | 2 +- src/core/hle/service/am/applets/web_browser.cpp | 4 ++-- src/core/loader/nsp.cpp | 3 ++- src/core/loader/xci.cpp | 2 +- 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 { Program = 1, Data = 2, Control = 3, - Manual = 4, - Legal = 5, + HtmlDocument = 4, + LegalInformation = 5, DeltaFragment = 6, }; 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) { return ContentRecordType::Data; case NCAContentType::Manual: // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal. - return ContentRecordType::Manual; + return ContentRecordType::HtmlDocument; default: UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast(type)); } 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() { case OfflineWebSource::OfflineHtmlPage: // While there is an AppID TLV field, in official SW this is always ignored. title_id = 0; - type = FileSys::ContentRecordType::Manual; + type = FileSys::ContentRecordType::HtmlDocument; break; case OfflineWebSource::ApplicationLegalInformation: - type = FileSys::ContentRecordType::Legal; + type = FileSys::ContentRecordType::LegalInformation; break; case OfflineWebSource::SystemDataPage: 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) { } ResultStatus AppLoader_NSP::ReadManualRomFS(FileSys::VirtualFile& file) { - const auto nca = nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::Manual); + const auto nca = + nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::HtmlDocument); if (nsp->GetStatus() != ResultStatus::Success || nca == nullptr) return ResultStatus::ErrorNoRomFS; 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) { ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) { const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(), - FileSys::ContentRecordType::Manual); + FileSys::ContentRecordType::HtmlDocument); if (xci->GetStatus() != ResultStatus::Success || nca == nullptr) return ResultStatus::ErrorXCIMissingPartition; file = nca->GetRomFS(); -- cgit v1.2.3