diff --git a/Ryujinx.Horizon.Common/Result.cs b/Ryujinx.Horizon.Common/Result.cs index ac843688..28056310 100644 --- a/Ryujinx.Horizon.Common/Result.cs +++ b/Ryujinx.Horizon.Common/Result.cs @@ -100,14 +100,6 @@ namespace Ryujinx.Horizon.Common } } - public void AbortOnFailureUnless(Result result, Result result2) - { - if (this != Success && this != result && this != result2) - { - ThrowInvalidResult(); - } - } - private void ThrowInvalidResult() { throw new InvalidResultException(this); diff --git a/Ryujinx.Horizon/Sdk/Sf/Hipc/Api.cs b/Ryujinx.Horizon/Sdk/Sf/Hipc/Api.cs index 822a4b4a..33c42825 100644 --- a/Ryujinx.Horizon/Sdk/Sf/Hipc/Api.cs +++ b/Ryujinx.Horizon/Sdk/Sf/Hipc/Api.cs @@ -51,22 +51,18 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc { Result result = ReplyImpl(sessionHandle, messageBuffer); - result.AbortOnFailureUnless(KernelResult.TimedOut, KernelResult.PortRemoteClosed); + result.AbortUnless(KernelResult.TimedOut, KernelResult.PortRemoteClosed); return Result.Success; } private static Result ReplyImpl(int sessionHandle, ReadOnlySpan messageBuffer) { - Span handles = stackalloc int[1]; - - handles[0] = sessionHandle; - var tlsSpan = HorizonStatic.AddressSpace.GetSpan(HorizonStatic.ThreadContext.TlsAddress, TlsMessageBufferSize); if (messageBuffer == tlsSpan) { - return HorizonStatic.Syscall.ReplyAndReceive(out _, handles, sessionHandle, 0); + return HorizonStatic.Syscall.ReplyAndReceive(out _, ReadOnlySpan.Empty, sessionHandle, 0); } else {