[all] fix missing cursor when client reconnects

This commit is contained in:
Geoffrey McRae 2019-05-28 14:06:15 +10:00
parent b31e8e1cee
commit 3d426ccef8
6 changed files with 70 additions and 32 deletions

View file

@ -806,11 +806,8 @@ static CaptureResult dxgi_getPointer(CapturePointer * pointer)
assert(this);
assert(this->initialized);
if (!os_waitEvent(this->pointerEvent, TIMEOUT_INFINITE))
{
DEBUG_ERROR("Failed to wait on the pointer event");
return CAPTURE_RESULT_ERROR;
}
if (!os_waitEvent(this->pointerEvent, 1000))
return CAPTURE_RESULT_TIMEOUT;
if (this->stop)
return CAPTURE_RESULT_REINIT;

View file

@ -277,11 +277,8 @@ static CaptureResult nvfbc_getPointer(CapturePointer * pointer)
{
osEventHandle * events[2];
memcpy(&events, &this->cursorEvents, sizeof(osEventHandle *) * 2);
if (!os_waitEvents(events, this->seperateCursor ? 2 : 1, false, TIMEOUT_INFINITE))
{
DEBUG_ERROR("Failed to wait on the cursor events");
return CAPTURE_RESULT_ERROR;
}
if (!os_waitEvents(events, this->seperateCursor ? 2 : 1, false, 1000))
return CAPTURE_RESULT_TIMEOUT;
if (this->stop)
return CAPTURE_RESULT_REINIT;