mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 21:47:23 +00:00
[c-host] dxgi: dont send null movements when only the visibility changed
This commit is contained in:
parent
e2adbaa5c1
commit
582ed6b5d1
@ -706,14 +706,10 @@ static CaptureResult dxgi_capture()
|
|||||||
|
|
||||||
if (frameInfo.LastMouseUpdateTime.QuadPart)
|
if (frameInfo.LastMouseUpdateTime.QuadPart)
|
||||||
{
|
{
|
||||||
if (
|
/* the pointer position is only valid if the pointer is visible */
|
||||||
frameInfo.PointerPosition.Position.x != this->lastPointerX ||
|
if (frameInfo.PointerPosition.Visible &&
|
||||||
frameInfo.PointerPosition.Position.y != this->lastPointerY ||
|
(frameInfo.PointerPosition.Position.x != this->lastPointerX ||
|
||||||
frameInfo.PointerPosition.Visible != this->lastPointerVisible
|
frameInfo.PointerPosition.Position.y != this->lastPointerY))
|
||||||
)
|
|
||||||
{
|
|
||||||
/* the pointer position is invalid if the pointer is not visible */
|
|
||||||
if (frameInfo.PointerPosition.Visible)
|
|
||||||
{
|
{
|
||||||
pointer.positionUpdate = true;
|
pointer.positionUpdate = true;
|
||||||
pointer.x =
|
pointer.x =
|
||||||
@ -722,8 +718,11 @@ static CaptureResult dxgi_capture()
|
|||||||
pointer.y =
|
pointer.y =
|
||||||
this->lastPointerY =
|
this->lastPointerY =
|
||||||
frameInfo.PointerPosition.Position.y;
|
frameInfo.PointerPosition.Position.y;
|
||||||
|
postPointer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->lastPointerVisible != frameInfo.PointerPosition.Visible)
|
||||||
|
{
|
||||||
this->lastPointerVisible = frameInfo.PointerPosition.Visible;
|
this->lastPointerVisible = frameInfo.PointerPosition.Visible;
|
||||||
postPointer = true;
|
postPointer = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user