[c-host] inform the client if we have positional cursor information

This commit is contained in:
Geoffrey McRae
2020-01-26 17:25:14 +11:00
parent b4cf8f76c8
commit b7e4426002
5 changed files with 45 additions and 26 deletions

View File

@@ -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
};
};