aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS')
-rw-r--r--Ryujinx.HLE/HOS/Horizon.cs2
-rw-r--r--Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs44
2 files changed, 33 insertions, 13 deletions
diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs
index 92a87661..2e216cdf 100644
--- a/Ryujinx.HLE/HOS/Horizon.cs
+++ b/Ryujinx.HLE/HOS/Horizon.cs
@@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS
}
}
- if (!MainProcess.MetaData.Is64Bits)
+ if (!(MainProcess.MetaData?.Is64Bits ?? true))
{
throw new NotImplementedException("32-bit titles are unsupported!");
}
diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs
index 14edcc75..937ea6d6 100644
--- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs
+++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs
@@ -1,5 +1,6 @@
+using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS.Ipc;
-using Ryujinx.HLE.Logging;
+using Ryujinx.HLE.HOS.SystemState;
using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Services.FspSrv
@@ -14,13 +15,13 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
- { 1, SetCurrentProcess },
- { 18, OpenSdCardFileSystem },
- { 22, CreateSaveDataFileSystem },
- { 51, OpenSaveDataFileSystem },
- { 200, OpenDataStorageByCurrentProcess },
- { 203, OpenPatchDataStorageByCurrentProcess },
- { 1005, GetGlobalAccessLogMode }
+ { 1, SetCurrentProcess },
+ { 18, OpenSdCardFileSystem },
+ { 51, OpenSaveDataFileSystem },
+ { 52, OpenSaveDataFileSystemBySystemSaveDataId },
+ { 200, OpenDataStorageByCurrentProcess },
+ { 203, OpenPatchDataStorageByCurrentProcess },
+ { 1005, GetGlobalAccessLogMode }
};
}
@@ -36,16 +37,16 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
- public long CreateSaveDataFileSystem(ServiceCtx Context)
+ public long OpenSaveDataFileSystem(ServiceCtx Context)
{
- Context.Device.Log.PrintStub(LogClass.ServiceFs, "Stubbed.");
+ LoadSaveDataFileSystem(Context);
return 0;
}
- public long OpenSaveDataFileSystem(ServiceCtx Context)
+ public long OpenSaveDataFileSystemBySystemSaveDataId(ServiceCtx Context)
{
- MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavesPath()));
+ LoadSaveDataFileSystem(Context);
return 0;
}
@@ -70,5 +71,24 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
+
+ public void LoadSaveDataFileSystem(ServiceCtx Context)
+ {
+ SaveSpaceId SaveSpaceId = (SaveSpaceId)Context.RequestData.ReadInt64();
+
+ long TitleId = Context.RequestData.ReadInt64();
+
+ UserId UserId = new UserId(
+ Context.RequestData.ReadInt64(),
+ Context.RequestData.ReadInt64());
+
+ long SaveId = Context.RequestData.ReadInt64();
+
+ SaveDataType SaveDataType = (SaveDataType)Context.RequestData.ReadByte();
+
+ SaveInfo SaveInfo = new SaveInfo(TitleId, SaveId, SaveDataType, UserId, SaveSpaceId);
+
+ MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavePath(SaveInfo, Context)));
+ }
}
} \ No newline at end of file