Skip to content
Permalink
Browse files

[c-host] dxgi: dont send null movements when only the visibility changed

  • Loading branch information
gnif committed Feb 12, 2020
1 parent e2adbaa commit 582ed6b5d1746a3187954ceb7151b6b616ed4168
Showing with 16 additions and 17 deletions.
  1. +1 −1 VERSION
  2. +15 −16 c-host/platform/Windows/capture/DXGI/src/dxgi.c
@@ -1 +1 @@
B1-156-g4acf800ace+1
B1-157-ge2adbaa5c1+1
@@ -706,24 +706,23 @@ 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 only valid if the pointer is visible */
if (frameInfo.PointerPosition.Visible &&
(frameInfo.PointerPosition.Position.x != this->lastPointerX ||
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.x =
this->lastPointerX =
frameInfo.PointerPosition.Position.x;
pointer.y =
this->lastPointerY =
frameInfo.PointerPosition.Position.y;
}
pointer.positionUpdate = true;
pointer.x =
this->lastPointerX =
frameInfo.PointerPosition.Position.x;
pointer.y =
this->lastPointerY =
frameInfo.PointerPosition.Position.y;
postPointer = true;
}

if (this->lastPointerVisible != frameInfo.PointerPosition.Visible)
{
this->lastPointerVisible = frameInfo.PointerPosition.Visible;
postPointer = true;
}

0 comments on commit 582ed6b

Please sign in to comment.
You can’t perform that action at this time.