[c-host] dxgi: invisible cursors do not have position information

This commit is contained in:
Geoffrey McRae 2020-01-27 01:46:43 +11:00
parent 8745858bcf
commit fea0a98b9e
2 changed files with 9 additions and 5 deletions

View File

@ -1 +1 @@
B1-109-gb7e4426002+1
B1-111-gd860d6b891+1

View File

@ -710,15 +710,19 @@ static CaptureResult dxgi_capture()
frameInfo.PointerPosition.Visible != this->lastPointerVisible
)
{
pointer.positionUpdate = true;
this->lastPointerX = frameInfo.PointerPosition.Position.x;
this->lastPointerY = frameInfo.PointerPosition.Position.y;
pointer.positionUpdate = true;
/* the pointer position is invalid if the pointer is not visible */
if (frameInfo.PointerPosition.Visible)
{
this->lastPointerX = frameInfo.PointerPosition.Position.x;
this->lastPointerY = frameInfo.PointerPosition.Position.y;
}
this->lastPointerVisible = frameInfo.PointerPosition.Visible;
pointer.x = this->lastPointerX;
pointer.y = this->lastPointerY;
pointer.visible = this->lastPointerVisible;
postPointer = true;
}
}