summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/program_metadata.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-07 05:42:15 +0200
committerGitHub <noreply@github.com>2022-10-07 05:42:15 +0200
commit61883d8820c057259c6c6113934a44f69742164c (patch)
treeeaae02f36b56101035ec9f79fc008ec0e2d2a938 /src/core/file_sys/program_metadata.h
parentMerge pull request #8944 from Tachi107/patch-2 (diff)
parentprogram_metadata: Unpack FileAccessHeader and FileAccessControl (diff)
downloadyuzu-61883d8820c057259c6c6113934a44f69742164c.tar
yuzu-61883d8820c057259c6c6113934a44f69742164c.tar.gz
yuzu-61883d8820c057259c6c6113934a44f69742164c.tar.bz2
yuzu-61883d8820c057259c6c6113934a44f69742164c.tar.lz
yuzu-61883d8820c057259c6c6113934a44f69742164c.tar.xz
yuzu-61883d8820c057259c6c6113934a44f69742164c.tar.zst
yuzu-61883d8820c057259c6c6113934a44f69742164c.zip
Diffstat (limited to 'src/core/file_sys/program_metadata.h')
-rw-r--r--src/core/file_sys/program_metadata.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h
index e8fb4e27f..2e8960b07 100644
--- a/src/core/file_sys/program_metadata.h
+++ b/src/core/file_sys/program_metadata.h
@@ -144,20 +144,18 @@ private:
static_assert(sizeof(AciHeader) == 0x40, "ACI0 header structure size is wrong");
-#pragma pack(push, 1)
-
+ // FileAccessControl and FileAccessHeader need loaded per-component: this layout does not
+ // reflect the real layout to avoid reference binding to misaligned addresses
struct FileAccessControl {
u8 version;
- INSERT_PADDING_BYTES(3);
+ // 3 padding bytes
u64_le permissions;
std::array<u8, 0x20> unknown;
};
- static_assert(sizeof(FileAccessControl) == 0x2C, "FS access control structure size is wrong");
-
struct FileAccessHeader {
u8 version;
- INSERT_PADDING_BYTES(3);
+ // 3 padding bytes
u64_le permissions;
u32_le unk_offset;
u32_le unk_size;
@@ -165,10 +163,6 @@ private:
u32_le unk_size_2;
};
- static_assert(sizeof(FileAccessHeader) == 0x1C, "FS access header structure size is wrong");
-
-#pragma pack(pop)
-
Header npdm_header;
AciHeader aci_header;
AcidHeader acid_header;