made saveinfo readonly, other stuff
This commit is contained in:
parent
95d49ece0d
commit
12650abd1a
5 changed files with 33 additions and 31 deletions
|
@ -1,14 +0,0 @@
|
||||||
using Ryujinx.HLE.HOS.SystemState;
|
|
||||||
|
|
||||||
namespace Ryujinx.HLE.FileSystem
|
|
||||||
{
|
|
||||||
struct SaveInfo
|
|
||||||
{
|
|
||||||
public long TitleId { get; set; }
|
|
||||||
public long SaveID { get; set; }
|
|
||||||
public UserId UserID { get; set; }
|
|
||||||
|
|
||||||
public SaveDataType SaveDataType { get; set; }
|
|
||||||
public SaveSpaceId SaveSpaceId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
24
Ryujinx.HLE/FileSystem/SaveInfo.cs
Normal file
24
Ryujinx.HLE/FileSystem/SaveInfo.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
using Ryujinx.HLE.HOS;
|
||||||
|
using Ryujinx.HLE.HOS.SystemState;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.FileSystem
|
||||||
|
{
|
||||||
|
struct SaveInfo
|
||||||
|
{
|
||||||
|
public long TitleId { get; private set; }
|
||||||
|
public long SaveID { get; private set; }
|
||||||
|
public UserId UserID { get; private set; }
|
||||||
|
|
||||||
|
public SaveDataType SaveDataType { get; private set; }
|
||||||
|
public SaveSpaceId SaveSpaceId { get; private set; }
|
||||||
|
|
||||||
|
public SaveInfo(ServiceCtx Context, SaveSpaceId SaveSpaceId)
|
||||||
|
{
|
||||||
|
TitleId = Context.RequestData.ReadInt64();
|
||||||
|
UserID = new UserId(Context.RequestData.ReadInt64(), Context.RequestData.ReadInt64());
|
||||||
|
SaveID = Context.RequestData.ReadInt64();
|
||||||
|
SaveDataType = (SaveDataType)Context.RequestData.ReadByte();
|
||||||
|
this.SaveSpaceId = SaveSpaceId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,12 +6,13 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
{
|
{
|
||||||
class VirtualFileSystem : IDisposable
|
class VirtualFileSystem : IDisposable
|
||||||
{
|
{
|
||||||
public const string BasePath = "RyuFs";
|
public const string BasePath = "RyuFs";
|
||||||
public const string NandPath = "nand";
|
public const string NandPath = "nand";
|
||||||
public const string SdCardPath = "sdmc";
|
public const string SdCardPath = "sdmc";
|
||||||
public const string SystemPath = "system";
|
public const string SystemPath = "system";
|
||||||
public const string SystemNandPath = "nand/system";
|
|
||||||
public const string UserNandPath = "nand/user";
|
public static string SystemNandPath = Path.Combine("nand", "system");
|
||||||
|
public static string UserNandPath = Path.Combine("nand", "user");
|
||||||
|
|
||||||
public Stream RomFs { get; private set; }
|
public Stream RomFs { get; private set; }
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((MainProcess.MetaData?.Is64Bits).HasValue && !MainProcess.MetaData.Is64Bits)
|
if (!(MainProcess.MetaData?.Is64Bits ?? true))
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("32-bit titles are unsupported!");
|
throw new NotImplementedException("32-bit titles are unsupported!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,16 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
{
|
{
|
||||||
SaveSpaceId SaveSpaceId = (SaveSpaceId)Context.RequestData.ReadInt64();
|
SaveSpaceId SaveSpaceId = (SaveSpaceId)Context.RequestData.ReadInt64();
|
||||||
|
|
||||||
SaveInfo SaveInfo = new SaveInfo()
|
SaveInfo SaveInfo = new SaveInfo(Context, SaveSpaceId);
|
||||||
{
|
|
||||||
TitleId = Context.RequestData.ReadInt64(),
|
|
||||||
UserID = new UserId(Context.RequestData.ReadInt64(),
|
|
||||||
Context.RequestData.ReadInt64()),
|
|
||||||
SaveID = Context.RequestData.ReadInt64(),
|
|
||||||
SaveDataType = (SaveDataType)Context.RequestData.ReadByte()
|
|
||||||
};
|
|
||||||
|
|
||||||
SaveInfo.SaveSpaceId = SaveSpaceId;
|
|
||||||
|
|
||||||
MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavePath(SaveInfo, Context)));
|
MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavePath(SaveInfo, Context)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue