From c2ad9666bba46f6296cb151c76c4d69c3f2a13c3 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 5 Jan 2021 20:55:39 +1100 Subject: [PATCH] [host] use the HotSpot information as provided by DXGI I must have originally overlooked this member when I wrote this code. :S --- host/platform/Windows/capture/DXGI/src/dxgi.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index a3d49aaa..ac87315b 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -835,26 +835,12 @@ static CaptureResult dxgi_capture() return CAPTURE_RESULT_ERROR; } - CURSORINFO ci = { .cbSize = sizeof(CURSORINFO) }; - ICONINFO ii; - if (GetCursorInfo(&ci) && ci.hCursor && GetIconInfo(ci.hCursor, &ii)) - { - DeleteObject(ii.hbmMask); - DeleteObject(ii.hbmColor); - - pointer.hx = ii.xHotspot; - pointer.hy = ii.yHotspot; - } - else - { - pointer.hx = 0; - pointer.hy = 0; - } - pointer.shapeUpdate = true; pointer.width = shapeInfo.Width; pointer.height = shapeInfo.Height; pointer.pitch = shapeInfo.Pitch; + pointer.hx = shapeInfo.HotSpot.x; + pointer.hy = shapeInfo.HotSpot.y; postPointer = true; } }