Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Merge pull request #559 from Subv/mount_savedata

bunneic2ade32fad3b
diff --cc src/core/hle/service/filesystem/fsp_srv.cpp
index 216bfea0a6,eb5748cf88..82efe7f7db
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@@ -529,10 -530,18 +530,18 @@@ void FSP_SRV::CreateSaveData(Kernel::HL
}
void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) {
- NGLOG_WARNING(Service_FS, "(STUBBED) called");
+ LOG_WARNING(Service_FS, "(STUBBED) called");
+ // TODO(Subv): Read the input parameters and mount the requested savedata instead of always
+ // mounting the current process' savedata.
FileSys::Path unused;
- auto filesystem = OpenFileSystem(Type::SaveData, unused).Unwrap();
+ auto filesystem = OpenFileSystem(Type::SaveData, unused);
+
+ if (filesystem.Failed()) {
+ IPC::ResponseBuilder rb{ctx, 2, 0, 0};
+ rb.Push(ResultCode(ErrorModule::FS, FileSys::ErrCodes::SaveDataNotFound));
+ return;
+ }
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);