diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs index eb456d5511..3cedf4feba 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs @@ -31,12 +31,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv Path = LibHac.Fs.PathTools.Normalize(path); } - // Read(u32, u64 offset, u64 size) -> (u64 out_size, buffer out_buf) + // Read(u32 readOption, u64 offset, u64 size) -> (u64 out_size, buffer out_buf) public long Read(ServiceCtx context) { long position = context.Request.ReceiveBuff[0].Position; - long zero = context.RequestData.ReadInt64(); + int readOption = context.RequestData.ReadInt32(); + context.RequestData.BaseStream.Position += 4; + long offset = context.RequestData.ReadInt64(); long size = context.RequestData.ReadInt64(); @@ -51,12 +53,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv return 0; } - // Write(u32, u64 offset, u64 size, buffer) + // Write(u32 writeOption, u64 offset, u64 size, buffer) public long Write(ServiceCtx context) { long position = context.Request.SendBuff[0].Position; - long zero = context.RequestData.ReadInt64(); + int writeOption = context.RequestData.ReadInt32(); + context.RequestData.BaseStream.Position += 4; + long offset = context.RequestData.ReadInt64(); long size = context.RequestData.ReadInt64(); diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs index 18a9f1d2b7..9e772213be 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs @@ -45,12 +45,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv _provider = provider; } - // CreateFile(u32 mode, u64 size, buffer, 0x19, 0x301> path) + // CreateFile(u32 createOption, u64 size, buffer, 0x19, 0x301> path) public long CreateFile(ServiceCtx context) { string name = ReadUtf8String(context); - int mode = context.RequestData.ReadInt32(); + int createOption = context.RequestData.ReadInt32(); + context.RequestData.BaseStream.Position += 4; + long size = context.RequestData.ReadInt64(); if (name == null) @@ -70,7 +72,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv try { - _provider.CreateFile(name, size, (CreateFileOptions)mode); + _provider.CreateFile(name, size, (CreateFileOptions)createOption); } catch (DirectoryNotFoundException) {