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:
parent
596b61ce1f
commit
f723f6f39a
8 changed files with 238 additions and 357 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue