0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-22 22:05:45 +00:00

Merge pull request #436 from emmauss/hidhandles

Fix Out of Handles error in HidServer
This commit is contained in:
emmauss 2018-09-28 13:50:15 +03:00 committed by GitHub
commit 0254a84f90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,7 +218,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
{
long XpadId = Context.RequestData.ReadInt64();
if (Context.Process.HandleTable.GenerateHandle(XpadIdEvent, out XpadIdEventHandle) == 0)
if (Context.Process.HandleTable.GenerateHandle(XpadIdEvent, out XpadIdEventHandle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
@ -714,7 +714,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
int NpadId = Context.RequestData.ReadInt32();
long NpadStyleSet = Context.RequestData.ReadInt64();
if (Context.Process.HandleTable.GenerateHandle(NpadStyleSetUpdateEvent, out int Handle) == 0)
if (Context.Process.HandleTable.GenerateHandle(NpadStyleSetUpdateEvent, out int Handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
@ -1356,7 +1356,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
{
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
if (Context.Process.HandleTable.GenerateHandle(PalmaOperationCompleteEvent, out int Handle) == 0)
if (Context.Process.HandleTable.GenerateHandle(PalmaOperationCompleteEvent, out int Handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}