mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 19:18:57 +02:00
[fs, qlaunch] add CreateSaveDataFileSystemWithCreationInfo2 and make qlaunch work again (#2760)
Fixes qlaunch regression I introduced previously. Add a few known structs. Adds CreateSaveDataFileSystemWithCreationInfo2, which is called when games are started via qlaunch and corrupts save files. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2760 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: unknown <sahyno1996@gmail.com> Co-committed-by: unknown <sahyno1996@gmail.com>
This commit is contained in:
parent
3e8fe622a7
commit
de46b8e817
13 changed files with 221 additions and 79 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -68,6 +71,11 @@ enum class SaveDataMetaType : u8 {
|
|||
ExtensionContext = 2,
|
||||
};
|
||||
|
||||
enum class SaveDataFormatType : u8 {
|
||||
Normal = 0,
|
||||
NoJournal = 1,
|
||||
};
|
||||
|
||||
struct SaveDataMetaInfo {
|
||||
u32 size;
|
||||
SaveDataMetaType type;
|
||||
|
|
@ -185,4 +193,31 @@ struct HashSalt {
|
|||
static_assert(std::is_trivially_copyable_v<HashSalt>, "Data type must be trivially copyable.");
|
||||
static_assert(sizeof(HashSalt) == HashSalt::Size);
|
||||
|
||||
struct SaveDataCreationInfo2 {
|
||||
|
||||
static constexpr u32 SaveDataCreationInfo2Version = 0x00010000;
|
||||
|
||||
u32 version;
|
||||
SaveDataAttribute attribute;
|
||||
s64 size;
|
||||
s64 journal_size;
|
||||
s64 block_size;
|
||||
u64 owner_id;
|
||||
u32 flags;
|
||||
SaveDataSpaceId space_id;
|
||||
SaveDataFormatType format_type;
|
||||
bool pseudo;
|
||||
u8 reserved1;
|
||||
bool is_hash_salt_enabled;
|
||||
u8 reserved2;
|
||||
HashSalt hash_salt;
|
||||
SaveDataMetaType meta_type;
|
||||
u8 reserved3;
|
||||
s32 meta_size;
|
||||
u8 reserved4;
|
||||
};
|
||||
static_assert(std::is_trivially_copyable_v<SaveDataCreationInfo2>,
|
||||
"Data type must be trivially copyable.");
|
||||
static_assert(sizeof(SaveDataCreationInfo2) == 0xA0, "SaveDataCreationInfo has invalid size.");
|
||||
|
||||
} // namespace FileSys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue