made saveinfo readonly, other stuff

This commit is contained in:
emmaus 2018-08-30 21:54:11 +00:00
parent 95d49ece0d
commit 12650abd1a
5 changed files with 33 additions and 31 deletions

View file

@ -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; }
}
}

View 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;
}
}
}

View file

@ -6,12 +6,13 @@ namespace Ryujinx.HLE.FileSystem
{
class VirtualFileSystem : IDisposable
{
public const string BasePath = "RyuFs";
public const string NandPath = "nand";
public const string SdCardPath = "sdmc";
public const string SystemPath = "system";
public const string SystemNandPath = "nand/system";
public const string UserNandPath = "nand/user";
public const string BasePath = "RyuFs";
public const string NandPath = "nand";
public const string SdCardPath = "sdmc";
public const string SystemPath = "system";
public static string SystemNandPath = Path.Combine("nand", "system");
public static string UserNandPath = Path.Combine("nand", "user");
public Stream RomFs { get; private set; }

View file

@ -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!");
}

View file

@ -76,16 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{
SaveSpaceId SaveSpaceId = (SaveSpaceId)Context.RequestData.ReadInt64();
SaveInfo SaveInfo = new SaveInfo()
{
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;
SaveInfo SaveInfo = new SaveInfo(Context, SaveSpaceId);
MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavePath(SaveInfo, Context)));
}