mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-12 10:28:08 +00:00
[c-host] inform the client if we have positional cursor information
This commit is contained in:
@@ -710,9 +710,15 @@ static CaptureResult dxgi_capture()
|
||||
frameInfo.PointerPosition.Visible != this->lastPointerVisible
|
||||
)
|
||||
{
|
||||
pointer.positionUpdate = true;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -754,12 +760,7 @@ static CaptureResult dxgi_capture()
|
||||
|
||||
// post back the pointer information
|
||||
if (postPointer)
|
||||
{
|
||||
pointer.x = this->lastPointerX;
|
||||
pointer.y = this->lastPointerY;
|
||||
pointer.visible = this->lastPointerVisible;
|
||||
this->postPointerBufferFn(pointer);
|
||||
}
|
||||
|
||||
return CAPTURE_RESULT_OK;
|
||||
}
|
||||
@@ -868,4 +869,4 @@ struct CaptureInterface Capture_DXGI =
|
||||
.capture = dxgi_capture,
|
||||
.waitFrame = dxgi_waitFrame,
|
||||
.getFrame = dxgi_getFrame
|
||||
};
|
||||
};
|
||||
|
@@ -316,9 +316,9 @@ static int pointerThread(void * unused)
|
||||
if (this->stop)
|
||||
break;
|
||||
|
||||
CaptureResult result;
|
||||
CaptureResult result;
|
||||
CapturePointer pointer = { 0 };
|
||||
pointer.shapeUpdate = false;
|
||||
|
||||
if (this->seperateCursor && events[1])
|
||||
{
|
||||
void * data;
|
||||
@@ -341,9 +341,13 @@ static int pointerThread(void * unused)
|
||||
this->mouseHotY = pointer.y;
|
||||
}
|
||||
|
||||
pointer.visible = this->mouseVisible;
|
||||
pointer.x = this->mouseX - this->mouseHotX;
|
||||
pointer.y = this->mouseY - this->mouseHotY;
|
||||
if (events[0])
|
||||
{
|
||||
pointer.positionUpdate = true;
|
||||
pointer.visible = this->mouseVisible;
|
||||
pointer.x = this->mouseX - this->mouseHotX;
|
||||
pointer.y = this->mouseY - this->mouseHotY;
|
||||
}
|
||||
|
||||
this->postPointerBufferFn(pointer);
|
||||
}
|
||||
@@ -365,4 +369,4 @@ struct CaptureInterface Capture_NVFBC =
|
||||
.capture = nvfbc_capture,
|
||||
.waitFrame = nvfbc_waitFrame,
|
||||
.getFrame = nvfbc_getFrame
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user