[host] use the HotSpot information as provided by DXGI

I must have originally overlooked this member when I wrote this code. :S
This commit is contained in:
Geoffrey McRae 2021-01-05 20:55:39 +11:00
parent d2d6ecd1c1
commit c2ad9666bb

View File

@ -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;
}
}