Update to LibHac 0.5.0 (#725)

* Update to libhac 0.5

* Catch HorizonResultException in IFileSystemProxy

* Changes based on feedback
This commit is contained in:
Alex Barney 2019-07-10 12:20:01 -05:00 committed by Ac_K
parent 596b61ce1f
commit f723f6f39a
8 changed files with 238 additions and 357 deletions

View file

@ -1,3 +1,4 @@
using LibHac;
using Ryujinx.HLE.HOS.Ipc;
using System.Collections.Generic;
@ -40,7 +41,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
byte[] data = new byte[size];
_baseStorage.Read(data, offset);
try
{
_baseStorage.Read(data, offset);
}
catch (HorizonResultException ex)
{
return ex.ResultValue.Value;
}
context.Memory.WriteBytes(buffDesc.Position, data);
}
@ -51,7 +59,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
// GetSize() -> u64 size
public long GetSize(ServiceCtx context)
{
context.ResponseData.Write(_baseStorage.GetSize());
try
{
context.ResponseData.Write(_baseStorage.GetSize());
}
catch (HorizonResultException ex)
{
return ex.ResultValue.Value;
}
return 0;
}