Update to LibHac 0.4.1

Updates the IFile Read and Write methods to use any specified ReadOption and WriteOption
This commit is contained in:
Alex Barney 2019-06-05 00:40:56 -05:00
parent 6fbe87cccc
commit c31908e322
3 changed files with 8 additions and 7 deletions

View file

@ -260,7 +260,7 @@ namespace Ryujinx.HLE.HOS
if (nca.Header.ContentType == ContentType.Program)
{
int dataIndex = Nca.SectionIndexFromType(NcaSectionType.Data, ContentType.Program);
int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, ContentType.Program);
if (nca.Header.GetFsHeader(dataIndex).IsPatchSection())
{
@ -338,7 +338,7 @@ namespace Ryujinx.HLE.HOS
if (nca.Header.ContentType == ContentType.Program)
{
int dataIndex = Nca.SectionIndexFromType(NcaSectionType.Data, ContentType.Program);
int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, ContentType.Program);
if (nca.Header.GetFsHeader(dataIndex).IsPatchSection())
{

View file

@ -1,3 +1,4 @@
using LibHac.Fs;
using Ryujinx.HLE.HOS.Ipc;
using System;
using System.Collections.Generic;
@ -36,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{
long position = context.Request.ReceiveBuff[0].Position;
int readOption = context.RequestData.ReadInt32();
ReadOption readOption = (ReadOption)context.RequestData.ReadInt32();
context.RequestData.BaseStream.Position += 4;
long offset = context.RequestData.ReadInt64();
@ -44,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
byte[] data = new byte[size];
int readSize = _baseFile.Read(data, offset);
int readSize = _baseFile.Read(data, offset, readOption);
context.Memory.WriteBytes(position, data);
@ -58,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{
long position = context.Request.SendBuff[0].Position;
int writeOption = context.RequestData.ReadInt32();
WriteOption writeOption = (WriteOption)context.RequestData.ReadInt32();
context.RequestData.BaseStream.Position += 4;
long offset = context.RequestData.ReadInt64();
@ -66,7 +67,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
byte[] data = context.Memory.ReadBytes(position, size);
_baseFile.Write(data, offset);
_baseFile.Write(data, offset, writeOption);
return 0;
}

View file

@ -46,7 +46,7 @@
<ItemGroup>
<PackageReference Include="Concentus" Version="1.1.7" />
<PackageReference Include="LibHac" Version="0.4.0" />
<PackageReference Include="LibHac" Version="0.4.1" />
</ItemGroup>
</Project>