summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-28 15:35:29 +0200
committerGitHub <noreply@github.com>2023-09-28 15:35:29 +0200
commitf24d956ae2cb54bb1445db9f02691b5d0e08ccb4 (patch)
treed71f0896ee03e7c745644a2ffc3ece034f84bf1c
parentMerge pull request #11604 from t895/only-install-nsp (diff)
parentfsp-srv: add GetFileSystemAttribute (diff)
downloadyuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar.gz
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar.bz2
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar.lz
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar.xz
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.tar.zst
yuzu-f24d956ae2cb54bb1445db9f02691b5d0e08ccb4.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 2492bbc16..c2054e8a0 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -329,6 +329,7 @@ public:
{13, &IFileSystem::CleanDirectoryRecursively, "CleanDirectoryRecursively"},
{14, &IFileSystem::GetFileTimeStampRaw, "GetFileTimeStampRaw"},
{15, nullptr, "QueryEntry"},
+ {16, &IFileSystem::GetFileSystemAttribute, "GetFileSystemAttribute"},
};
RegisterHandlers(functions);
}
@@ -521,6 +522,46 @@ public:
rb.PushRaw(vfs_timestamp);
}
+ void GetFileSystemAttribute(HLERequestContext& ctx) {
+ LOG_WARNING(Service_FS, "(STUBBED) called");
+
+ struct FileSystemAttribute {
+ u8 dir_entry_name_length_max_defined;
+ u8 file_entry_name_length_max_defined;
+ u8 dir_path_name_length_max_defined;
+ u8 file_path_name_length_max_defined;
+ INSERT_PADDING_BYTES_NOINIT(0x5);
+ u8 utf16_dir_entry_name_length_max_defined;
+ u8 utf16_file_entry_name_length_max_defined;
+ u8 utf16_dir_path_name_length_max_defined;
+ u8 utf16_file_path_name_length_max_defined;
+ INSERT_PADDING_BYTES_NOINIT(0x18);
+ s32 dir_entry_name_length_max;
+ s32 file_entry_name_length_max;
+ s32 dir_path_name_length_max;
+ s32 file_path_name_length_max;
+ INSERT_PADDING_WORDS_NOINIT(0x5);
+ s32 utf16_dir_entry_name_length_max;
+ s32 utf16_file_entry_name_length_max;
+ s32 utf16_dir_path_name_length_max;
+ s32 utf16_file_path_name_length_max;
+ INSERT_PADDING_WORDS_NOINIT(0x18);
+ INSERT_PADDING_WORDS_NOINIT(0x1);
+ };
+ static_assert(sizeof(FileSystemAttribute) == 0xc0,
+ "FileSystemAttribute has incorrect size");
+
+ FileSystemAttribute savedata_attribute{};
+ savedata_attribute.dir_entry_name_length_max_defined = true;
+ savedata_attribute.file_entry_name_length_max_defined = true;
+ savedata_attribute.dir_entry_name_length_max = 0x40;
+ savedata_attribute.file_entry_name_length_max = 0x40;
+
+ IPC::ResponseBuilder rb{ctx, 50};
+ rb.Push(ResultSuccess);
+ rb.PushRaw(savedata_attribute);
+ }
+
private:
VfsDirectoryServiceWrapper backend;
SizeGetter size;