mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-03-06 00:30:49 +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
1 changed files with 2 additions and 16 deletions
|
@ -835,26 +835,12 @@ static CaptureResult dxgi_capture()
|
||||||
return CAPTURE_RESULT_ERROR;
|
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.shapeUpdate = true;
|
||||||
pointer.width = shapeInfo.Width;
|
pointer.width = shapeInfo.Width;
|
||||||
pointer.height = shapeInfo.Height;
|
pointer.height = shapeInfo.Height;
|
||||||
pointer.pitch = shapeInfo.Pitch;
|
pointer.pitch = shapeInfo.Pitch;
|
||||||
|
pointer.hx = shapeInfo.HotSpot.x;
|
||||||
|
pointer.hy = shapeInfo.HotSpot.y;
|
||||||
postPointer = true;
|
postPointer = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue