Nvdrv: Correct Event setup in Nvdrv

Events are supposed to be cleared on quering. This fixes that issue.
This commit is contained in:
Fernando Sahmkow 2019-09-26 18:11:27 -04:00 committed by FernandoS27
parent 3897935493
commit 87f41384a8
2 changed files with 14 additions and 23 deletions

View file

@ -134,7 +134,9 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 3, 1};
rb.Push(RESULT_SUCCESS);
if (event_id < MaxNvEvents) {
rb.PushCopyObjects(nvdrv->GetEvent(event_id));
auto event = nvdrv->GetEvent(event_id);
event->Clear();
rb.PushCopyObjects(event);
rb.Push<u32>(NvResult::Success);
} else {
rb.Push<u32>(0);