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:
parent
6fbe87cccc
commit
c31908e322
3 changed files with 8 additions and 7 deletions
|
@ -260,7 +260,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
if (nca.Header.ContentType == ContentType.Program)
|
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())
|
if (nca.Header.GetFsHeader(dataIndex).IsPatchSection())
|
||||||
{
|
{
|
||||||
|
@ -338,7 +338,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
if (nca.Header.ContentType == ContentType.Program)
|
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())
|
if (nca.Header.GetFsHeader(dataIndex).IsPatchSection())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using LibHac.Fs;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -36,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
{
|
{
|
||||||
long position = context.Request.ReceiveBuff[0].Position;
|
long position = context.Request.ReceiveBuff[0].Position;
|
||||||
|
|
||||||
int readOption = context.RequestData.ReadInt32();
|
ReadOption readOption = (ReadOption)context.RequestData.ReadInt32();
|
||||||
context.RequestData.BaseStream.Position += 4;
|
context.RequestData.BaseStream.Position += 4;
|
||||||
|
|
||||||
long offset = context.RequestData.ReadInt64();
|
long offset = context.RequestData.ReadInt64();
|
||||||
|
@ -44,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
|
|
||||||
byte[] data = new byte[size];
|
byte[] data = new byte[size];
|
||||||
|
|
||||||
int readSize = _baseFile.Read(data, offset);
|
int readSize = _baseFile.Read(data, offset, readOption);
|
||||||
|
|
||||||
context.Memory.WriteBytes(position, data);
|
context.Memory.WriteBytes(position, data);
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
{
|
{
|
||||||
long position = context.Request.SendBuff[0].Position;
|
long position = context.Request.SendBuff[0].Position;
|
||||||
|
|
||||||
int writeOption = context.RequestData.ReadInt32();
|
WriteOption writeOption = (WriteOption)context.RequestData.ReadInt32();
|
||||||
context.RequestData.BaseStream.Position += 4;
|
context.RequestData.BaseStream.Position += 4;
|
||||||
|
|
||||||
long offset = context.RequestData.ReadInt64();
|
long offset = context.RequestData.ReadInt64();
|
||||||
|
@ -66,7 +67,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
|
|
||||||
byte[] data = context.Memory.ReadBytes(position, size);
|
byte[] data = context.Memory.ReadBytes(position, size);
|
||||||
|
|
||||||
_baseFile.Write(data, offset);
|
_baseFile.Write(data, offset, writeOption);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Concentus" Version="1.1.7" />
|
<PackageReference Include="Concentus" Version="1.1.7" />
|
||||||
<PackageReference Include="LibHac" Version="0.4.0" />
|
<PackageReference Include="LibHac" Version="0.4.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue