From e7239c53fdcd4502af7d6e642c255548a4f0f274 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 9 Jan 2020 21:20:01 +1100 Subject: [PATCH] [c-host] cleanup dxgi cursor code a bit --- c-host/platform/Windows/capture/DXGI/src/dxgi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/c-host/platform/Windows/capture/DXGI/src/dxgi.c b/c-host/platform/Windows/capture/DXGI/src/dxgi.c index b42686ff..08c055fe 100644 --- a/c-host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/c-host/platform/Windows/capture/DXGI/src/dxgi.c @@ -710,9 +710,9 @@ static CaptureResult dxgi_capture() frameInfo.PointerPosition.Visible != this->lastPointerVisible ) { - this->lastPointerX = pointer.x = frameInfo.PointerPosition.Position.x; - this->lastPointerY = pointer.y = frameInfo.PointerPosition.Position.y; - this->lastPointerVisible = pointer.visible = frameInfo.PointerPosition.Visible; + this->lastPointerX = frameInfo.PointerPosition.Position.x; + this->lastPointerY = frameInfo.PointerPosition.Position.y; + this->lastPointerVisible = frameInfo.PointerPosition.Visible; postPointer = true; } } @@ -754,7 +754,12 @@ static CaptureResult dxgi_capture() // post back the pointer information if (postPointer) + { + pointer.x = this->lastPointerX; + pointer.y = this->lastPointerY; + pointer.visible = this->lastPointerVisible; this->postPointerBufferFn(pointer); + } return CAPTURE_RESULT_OK; }