aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/program_metadata.cpp1
-rw-r--r--src/core/file_sys/program_metadata.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp
index ad09b19e68..464e496ea3 100644
--- a/src/core/file_sys/program_metadata.cpp
+++ b/src/core/file_sys/program_metadata.cpp
@@ -47,6 +47,7 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
return Loader::ResultStatus::ErrorBadACIDHeader;
}
LOG_INFO(Loader, "NPDM uses the Switch 2 ACID layout");
+ is_switch2 = true;
}
if (sizeof(AciHeader) != file->ReadObject(&aci_header, npdm_header.aci_offset)) {
diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h
index 115e6d6cd1..5ce32af1a4 100644
--- a/src/core/file_sys/program_metadata.h
+++ b/src/core/file_sys/program_metadata.h
@@ -72,6 +72,10 @@ public:
KernelCapabilityDescriptors capabilities);
bool Is64BitProgram() const;
+ /// True when the NPDM uses the Switch 2 ACID layout.
+ bool IsSwitch2() const {
+ return is_switch2;
+ }
ProgramAddressSpaceType GetAddressSpaceType() const;
u8 GetMainThreadPriority() const;
u8 GetMainThreadCore() const;
@@ -179,6 +183,7 @@ private:
Header npdm_header{};
AciHeader aci_header{};
AcidHeader acid_header{};
+ bool is_switch2{};
FileAccessControl acid_file_access{};
FileAccessHeader aci_file_access{};