From 57f1f2d1fe350dd7defd5a8ca655216f65441a95 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 29 Jan 2020 22:12:59 +1100 Subject: [PATCH] [c-hots] fix incorrect unlock timing --- c-host/platform/Windows/capture/DXGI/src/dxgi.c | 5 ++--- c-host/platform/Windows/capture/NVFBC/src/nvfbc.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/c-host/platform/Windows/capture/DXGI/src/dxgi.c b/c-host/platform/Windows/capture/DXGI/src/dxgi.c index 94742714..d4b9ab39 100644 --- a/c-host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/c-host/platform/Windows/capture/DXGI/src/dxgi.c @@ -118,9 +118,8 @@ static void on_mouseMove(int x, int y) .x = x, .y = y }; - this->postPointerBufferFn(pointer); - LG_UNLOCK(this->pointerLock); + this->postPointerBufferFn(pointer); } static const char * dxgi_getName() @@ -820,8 +819,8 @@ static CaptureResult dxgi_capture() { LG_LOCK(this->pointerLock); pointer.visible = this->lastPointerVisible; - this->postPointerBufferFn(pointer); LG_UNLOCK(this->pointerLock); + this->postPointerBufferFn(pointer); } return CAPTURE_RESULT_OK; diff --git a/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c b/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c index b233890b..88fbcc81 100644 --- a/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -93,8 +93,8 @@ static void on_mouseMove(int x, int y) .y = this->mouseY - this->mouseHotY }; - this->postPointerBufferFn(pointer); LG_UNLOCK(this->cursorLock); + this->postPointerBufferFn(pointer); } static const char * nvfbc_getName() @@ -364,8 +364,8 @@ static int pointerThread(void * unused) pointer.x = this->mouseX - this->mouseHotX; pointer.y = this->mouseY - this->mouseHotY; - this->postPointerBufferFn(pointer); LG_UNLOCK(this->cursorLock); + this->postPointerBufferFn(pointer); } return 0;