Sfoglia il codice sorgente

file_sys: Rename other ContentRecordType members

Bakugo 7 anni fa
parent
commit
b50557d1f0

+ 2 - 2
src/core/file_sys/nca_metadata.h

@@ -35,8 +35,8 @@ enum class ContentRecordType : u8 {
     Program = 1,
     Program = 1,
     Data = 2,
     Data = 2,
     Control = 3,
     Control = 3,
-    Manual = 4,
-    Legal = 5,
+    HtmlDocument = 4,
+    LegalInformation = 5,
     DeltaFragment = 6,
     DeltaFragment = 6,
 };
 };
 
 

+ 1 - 1
src/core/file_sys/registered_cache.cpp

@@ -99,7 +99,7 @@ ContentRecordType GetCRTypeFromNCAType(NCAContentType type) {
         return ContentRecordType::Data;
         return ContentRecordType::Data;
     case NCAContentType::Manual:
     case NCAContentType::Manual:
         // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal.
         // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal.
-        return ContentRecordType::Manual;
+        return ContentRecordType::HtmlDocument;
     default:
     default:
         UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast<u8>(type));
         UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast<u8>(type));
     }
     }

+ 2 - 2
src/core/hle/service/am/applets/web_browser.cpp

@@ -459,10 +459,10 @@ void WebBrowser::InitializeOffline() {
     case OfflineWebSource::OfflineHtmlPage:
     case OfflineWebSource::OfflineHtmlPage:
         // While there is an AppID TLV field, in official SW this is always ignored.
         // While there is an AppID TLV field, in official SW this is always ignored.
         title_id = 0;
         title_id = 0;
-        type = FileSys::ContentRecordType::Manual;
+        type = FileSys::ContentRecordType::HtmlDocument;
         break;
         break;
     case OfflineWebSource::ApplicationLegalInformation:
     case OfflineWebSource::ApplicationLegalInformation:
-        type = FileSys::ContentRecordType::Legal;
+        type = FileSys::ContentRecordType::LegalInformation;
         break;
         break;
     case OfflineWebSource::SystemDataPage:
     case OfflineWebSource::SystemDataPage:
         type = FileSys::ContentRecordType::Data;
         type = FileSys::ContentRecordType::Data;

+ 2 - 1
src/core/loader/nsp.cpp

@@ -168,7 +168,8 @@ ResultStatus AppLoader_NSP::ReadControlData(FileSys::NACP& nacp) {
 }
 }
 
 
 ResultStatus AppLoader_NSP::ReadManualRomFS(FileSys::VirtualFile& file) {
 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)
     if (nsp->GetStatus() != ResultStatus::Success || nca == nullptr)
         return ResultStatus::ErrorNoRomFS;
         return ResultStatus::ErrorNoRomFS;
     file = nca->GetRomFS();
     file = nca->GetRomFS();

+ 1 - 1
src/core/loader/xci.cpp

@@ -134,7 +134,7 @@ ResultStatus AppLoader_XCI::ReadControlData(FileSys::NACP& control) {
 
 
 ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) {
 ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) {
     const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(),
     const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(),
-                                                          FileSys::ContentRecordType::Manual);
+                                                          FileSys::ContentRecordType::HtmlDocument);
     if (xci->GetStatus() != ResultStatus::Success || nca == nullptr)
     if (xci->GetStatus() != ResultStatus::Success || nca == nullptr)
         return ResultStatus::ErrorXCIMissingPartition;
         return ResultStatus::ErrorXCIMissingPartition;
     file = nca->GetRomFS();
     file = nca->GetRomFS();