mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 13:50:46 -07:00
[hipc] Fix 'Unexpected result code Success returned' in Reply() (#4215)
* horizon: Add AbortOnFailureUnless() * hipc: Replace AbortUnless() with AbortOnFailureUnless() in Reply()
This commit is contained in:
@ -100,6 +100,14 @@ 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);
|
||||
@ -115,4 +123,4 @@ namespace Ryujinx.Horizon.Common
|
||||
return PrintableResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user