aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Nv
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-09-23 15:11:46 -0300
committerThomas Guillemard <thog@protonmail.com>2018-09-23 20:11:46 +0200
commit7de7b559adc1924d3ff31cc58b281f70e468155f (patch)
tree3701e1687f7fc4c4bafdffd5abda1966e6ce320f /Ryujinx.HLE/HOS/Services/Nv
parent54ed9096bd4add5cf2ca320123f551f60c06a57f (diff)
Improve kernel events implementation (#430)
* Improve kernel events implementation * Some cleanup * Address PR feedback
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv')
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
index 7d558992..96de8cab 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
@@ -123,7 +123,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv
int EventId = Context.RequestData.ReadInt32();
//TODO: Use Fd/EventId, different channels have different events.
- int Handle = Context.Process.HandleTable.OpenHandle(Event);
+ if (Context.Process.HandleTable.GenerateHandle(Event.ReadableEvent, out int Handle) != KernelResult.Success)
+ {
+ throw new InvalidOperationException("Out of handles!");
+ }
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);