summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/program_metadata.h
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-10 22:25:25 +0200
committerlat9nq <lat9nq@gmail.com>2022-02-13 08:20:56 +0100
commitbfb7cbc2922655e8a7a9e6f8bb80a186d4d75495 (patch)
tree30c36b49f63918ccf8b3c78e077bec4d769b3b6a /src/core/file_sys/program_metadata.h
parentMerge pull request #7887 from lat9nq/stub-is-usb-full-key (diff)
downloadyuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar.gz
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar.bz2
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar.lz
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar.xz
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.tar.zst
yuzu-bfb7cbc2922655e8a7a9e6f8bb80a186d4d75495.zip
Diffstat (limited to '')
-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 1eee916be..c89a1c445 100644
--- a/src/core/file_sys/program_metadata.h
+++ b/src/core/file_sys/program_metadata.h
@@ -143,20 +143,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;
@@ -164,10 +162,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;