summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-12-10 14:14:36 -0500
committerGravatar Zach Hilman2018-12-10 14:14:36 -0500
commit5e632caca5835e67c42640f355039cc34e1690ed (patch)
tree6c983017da997babca44b4e8c64f383d260e47ed /src/core
parentMerge pull request #1868 from lioncash/config (diff)
downloadyuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.gz
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.xz
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.zip
fsp_srv: Implement IStorage::GetSize
Takes no input and returns the size as a u64. Needed by Katamari Damacy Reroll to boot.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index d2ffd5776..c4a75a7da 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -45,8 +45,12 @@ public:
45 explicit IStorage(FileSys::VirtualFile backend_) 45 explicit IStorage(FileSys::VirtualFile backend_)
46 : ServiceFramework("IStorage"), backend(std::move(backend_)) { 46 : ServiceFramework("IStorage"), backend(std::move(backend_)) {
47 static const FunctionInfo functions[] = { 47 static const FunctionInfo functions[] = {
48 {0, &IStorage::Read, "Read"}, {1, nullptr, "Write"}, {2, nullptr, "Flush"}, 48 {0, &IStorage::Read, "Read"},
49 {3, nullptr, "SetSize"}, {4, nullptr, "GetSize"}, {5, nullptr, "OperateRange"}, 49 {1, nullptr, "Write"},
50 {2, nullptr, "Flush"},
51 {3, nullptr, "SetSize"},
52 {4, &IStorage::GetSize, "GetSize"},
53 {5, nullptr, "OperateRange"},
50 }; 54 };
51 RegisterHandlers(functions); 55 RegisterHandlers(functions);
52 } 56 }
@@ -83,6 +87,15 @@ private:
83 IPC::ResponseBuilder rb{ctx, 2}; 87 IPC::ResponseBuilder rb{ctx, 2};
84 rb.Push(RESULT_SUCCESS); 88 rb.Push(RESULT_SUCCESS);
85 } 89 }
90
91 void GetSize(Kernel::HLERequestContext& ctx) {
92 const u64 size = backend->GetSize();
93 LOG_DEBUG(Service_FS, "called, size={}", size);
94
95 IPC::ResponseBuilder rb{ctx, 4};
96 rb.Push(RESULT_SUCCESS);
97 rb.Push<u64>(size);
98 }
86}; 99};
87 100
88class IFile final : public ServiceFramework<IFile> { 101class IFile final : public ServiceFramework<IFile> {