mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +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.PointerPosition.Position.x != this->lastPointerX ||
|
||||
frameInfo.PointerPosition.Position.y != this->lastPointerY ||
|
||||
frameInfo.PointerPosition.Visible != this->lastPointerVisible
|
||||
)
|
||||
{
|
||||
/* the pointer position is invalid if the pointer is not visible */
|
||||
if (frameInfo.PointerPosition.Visible)
|
||||
/* the pointer position is only valid if the pointer is visible */
|
||||
if (frameInfo.PointerPosition.Visible &&
|
||||
(frameInfo.PointerPosition.Position.x != this->lastPointerX ||
|
||||
frameInfo.PointerPosition.Position.y != this->lastPointerY))
|
||||
{
|
||||
pointer.positionUpdate = true;
|
||||
pointer.x =
|
||||
@ -722,8 +718,11 @@ static CaptureResult dxgi_capture()
|
||||
pointer.y =
|
||||
this->lastPointerY =
|
||||
frameInfo.PointerPosition.Position.y;
|
||||
postPointer = true;
|
||||
}
|
||||
|
||||
if (this->lastPointerVisible != frameInfo.PointerPosition.Visible)
|
||||
{
|
||||
this->lastPointerVisible = frameInfo.PointerPosition.Visible;
|
||||
postPointer = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user