mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:52:57 +00:00
[host] nvfbc: avoid waking up pointer thread for no reason
If the wait times out, we used to simply restart the loop, which causes it to check this->stop and exit if set to true. However, nvfbc_stop already calls lgSignalEvent, which would wake up the pointer thread to perform the check, so there is no need to set a timeout on the wait.
This commit is contained in:
parent
57d220a43b
commit
1f24ab0742
1 changed files with 2 additions and 3 deletions
|
@ -573,10 +573,9 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame,
|
|||
|
||||
static int pointerThread(void * unused)
|
||||
{
|
||||
while(!this->stop)
|
||||
while (!this->stop)
|
||||
{
|
||||
if (!lgWaitEvent(this->cursorEvent, 1000))
|
||||
continue;
|
||||
lgWaitEvent(this->cursorEvent, TIMEOUT_INFINITE);
|
||||
|
||||
if (this->stop)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue