From 3705c206688c69d3348f5cec84dc480d8d7c578e Mon Sep 17 00:00:00 2001 From: Alex Barney <thealexbarney@gmail.com> Date: Sat, 26 Feb 2022 16:52:25 -0700 Subject: Update LibHac to v0.16.0 (#3159) --- .../Fs/FileSystemProxy/FileSystemProxyHelper.cs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs') diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs index 6e999486..2afa3480 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs @@ -132,22 +132,10 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy } } - public static Result ReadFsPath(out FsPath path, ServiceCtx context, int index = 0) - { - ulong position = context.Request.PtrBuff[index].Position; - ulong size = context.Request.PtrBuff[index].Size; - - byte[] pathBytes = new byte[size]; - - context.Memory.Read(position, pathBytes); - - return FsPath.FromSpan(out path, pathBytes); - } - public static ref readonly FspPath GetFspPath(ServiceCtx context, int index = 0) { - ulong position = (ulong)context.Request.PtrBuff[index].Position; - ulong size = (ulong)context.Request.PtrBuff[index].Size; + ulong position = context.Request.PtrBuff[index].Position; + ulong size = context.Request.PtrBuff[index].Size; ReadOnlySpan<byte> buffer = context.Memory.GetSpan(position, (int)size); ReadOnlySpan<FspPath> fspBuffer = MemoryMarshal.Cast<byte, FspPath>(buffer); @@ -157,8 +145,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy public static ref readonly LibHac.FsSrv.Sf.Path GetSfPath(ServiceCtx context, int index = 0) { - ulong position = (ulong)context.Request.PtrBuff[index].Position; - ulong size = (ulong)context.Request.PtrBuff[index].Size; + ulong position = context.Request.PtrBuff[index].Position; + ulong size = context.Request.PtrBuff[index].Size; ReadOnlySpan<byte> buffer = context.Memory.GetSpan(position, (int)size); ReadOnlySpan<LibHac.FsSrv.Sf.Path> pathBuffer = MemoryMarshal.Cast<byte, LibHac.FsSrv.Sf.Path>(buffer); -- cgit v1.2.3-70-g09d2