aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-10-17 01:17:44 -0500
committerAc_K <Acoustik666@gmail.com>2019-10-17 08:17:44 +0200
commit8a8ea4c8c00e8ba23349d9cdb0a6b681d09e6b0d (patch)
treeaee0876fbc6e5f9fd2808d942297938ab3ab9495 /Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
parentc0fe6cdca0ebe6b19f8578893ec503d432683897 (diff)
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs24
1 files changed, 7 insertions, 17 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
index 107599a4..cc407039 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
@@ -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;
}
}
} \ No newline at end of file