From 7d0b9711bd15feec3b27042ff8351908aafe0e6d Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 12 Jul 2021 17:01:23 +1000 Subject: [PATCH] [host] nvfbc: remove the `frameEvent` event and associated code Now that the host application can run the capture interface in synchronous mode, and NVFBC uses this mode there is no longer need for the frameEvent. --- host/platform/Windows/capture/NVFBC/src/nvfbc.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/host/platform/Windows/capture/NVFBC/src/nvfbc.c b/host/platform/Windows/capture/NVFBC/src/nvfbc.c index 8e56da18..f40786e3 100644 --- a/host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -57,7 +57,6 @@ struct iface NvFBCFrameGrabInfo grabInfo; - LGEvent * frameEvent; LGEvent * cursorEvent; int mouseX, mouseY, mouseHotX, mouseHotY; @@ -134,13 +133,6 @@ static bool nvfbc_create( return false; this = (struct iface *)calloc(sizeof(struct iface), 1); - this->frameEvent = lgCreateEvent(true, 17); - if (!this->frameEvent) - { - DEBUG_ERROR("failed to create the frame event"); - nvfbc_free(); - return false; - } this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor"); this->getPointerBufferFn = getPointerBufferFn; @@ -186,7 +178,6 @@ static bool nvfbc_init(void) free(privData); getDesktopSize(&this->width, &this->height, &this->dpi); - lgResetEvent(this->frameEvent); HANDLE event; if (!NvFBCToSysSetup( @@ -239,7 +230,6 @@ static void nvfbc_stop(void) this->stop = true; lgSignalEvent(this->cursorEvent); - lgSignalEvent(this->frameEvent); if (this->pointerThread) { @@ -262,9 +252,6 @@ static bool nvfbc_deinit(void) static void nvfbc_free(void) { - if (this->frameEvent) - lgFreeEvent(this->frameEvent); - if (this->mouseHookCreated) mouseHook_remove(); @@ -313,16 +300,12 @@ done: return CAPTURE_RESULT_TIMEOUT; memcpy(&this->grabInfo, &grabInfo, sizeof(grabInfo)); - lgSignalEvent(this->frameEvent); return CAPTURE_RESULT_OK; } static CaptureResult nvfbc_waitFrame(CaptureFrame * frame, const size_t maxFrameSize) { - if (!lgWaitEvent(this->frameEvent, 1000)) - return CAPTURE_RESULT_TIMEOUT; - if (this->stop) return CAPTURE_RESULT_REINIT;