mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[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:
parent
d2d6ecd1c1
commit
c2ad9666bb
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user