Update to LibHac 0.6.0 (#792)
* Update to LibHac 0.6.0 * Create an IFileSystemProxy object from LibHac * Rename rc -> result * Alignment and spacing * Result formatting * Spacing * Sort usings
This commit is contained in:
parent
c0fe6cdca0
commit
8a8ea4c8c0
18 changed files with 353 additions and 404 deletions
|
@ -31,16 +31,11 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
|
|||
|
||||
byte[] data = new byte[size];
|
||||
|
||||
try
|
||||
{
|
||||
_baseStorage.Read(data, offset);
|
||||
}
|
||||
catch (HorizonResultException ex)
|
||||
{
|
||||
return (ResultCode)ex.ResultValue.Value;
|
||||
}
|
||||
Result result = _baseStorage.Read(offset, data);
|
||||
|
||||
context.Memory.WriteBytes(buffDesc.Position, data);
|
||||
|
||||
return (ResultCode)result.Value;
|
||||
}
|
||||
|
||||
return ResultCode.Success;
|
||||
|
@ -50,16 +45,11 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
|
|||
// GetSize() -> u64 size
|
||||
public ResultCode GetSize(ServiceCtx context)
|
||||
{
|
||||
try
|
||||
{
|
||||
context.ResponseData.Write(_baseStorage.GetSize());
|
||||
}
|
||||
catch (HorizonResultException ex)
|
||||
{
|
||||
return (ResultCode)ex.ResultValue.Value;
|
||||
}
|
||||
Result result = _baseStorage.GetSize(out long size);
|
||||
|
||||
return ResultCode.Success;
|
||||
context.ResponseData.Write(size);
|
||||
|
||||
return (ResultCode)result.Value;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue