diff options
author | Liam <byteslice@airmail.cc> | 2023-12-09 20:05:16 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-09 20:05:16 +0100 |
commit | d597383ab2558f27e91953035350c2ed05dcbd50 (patch) | |
tree | ca4e398736f7b0f9bc43d4f59c583f1b7f2c60db /src/core/file_sys | |
parent | Merge pull request #12289 from german77/aruid (diff) | |
download | yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar.gz yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar.bz2 yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar.lz yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar.xz yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.tar.zst yuzu-d597383ab2558f27e91953035350c2ed05dcbd50.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 6 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index a4d060007..8d5d593e8 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -12,8 +12,6 @@ namespace FileSys { -constexpr char SAVE_DATA_SIZE_FILENAME[] = ".yuzu_save_size"; - namespace { void PrintSaveDataAttributeWarnings(SaveDataAttribute meta) { @@ -197,7 +195,7 @@ SaveDataSize SaveDataFactory::ReadSaveDataSize(SaveDataType type, u64 title_id, GetFullPath(system, dir, SaveDataSpaceId::NandUser, type, title_id, user_id, 0); const auto relative_dir = GetOrCreateDirectoryRelative(dir, path); - const auto size_file = relative_dir->GetFile(SAVE_DATA_SIZE_FILENAME); + const auto size_file = relative_dir->GetFile(GetSaveDataSizeFileName()); if (size_file == nullptr || size_file->GetSize() < sizeof(SaveDataSize)) { return {0, 0}; } @@ -216,7 +214,7 @@ void SaveDataFactory::WriteSaveDataSize(SaveDataType type, u64 title_id, u128 us GetFullPath(system, dir, SaveDataSpaceId::NandUser, type, title_id, user_id, 0); const auto relative_dir = GetOrCreateDirectoryRelative(dir, path); - const auto size_file = relative_dir->CreateFile(SAVE_DATA_SIZE_FILENAME); + const auto size_file = relative_dir->CreateFile(GetSaveDataSizeFileName()); if (size_file == nullptr) { return; } diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index 45c7c81fb..e3a0f8cef 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h @@ -83,6 +83,10 @@ struct SaveDataSize { u64 journal; }; +constexpr const char* GetSaveDataSizeFileName() { + return ".yuzu_save_size"; +} + /// File system interface to the SaveData archive class SaveDataFactory { public: |