mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +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
@ -573,10 +573,9 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame,
|
|||||||
|
|
||||||
static int pointerThread(void * unused)
|
static int pointerThread(void * unused)
|
||||||
{
|
{
|
||||||
while(!this->stop)
|
while (!this->stop)
|
||||||
{
|
{
|
||||||
if (!lgWaitEvent(this->cursorEvent, 1000))
|
lgWaitEvent(this->cursorEvent, TIMEOUT_INFINITE);
|
||||||
continue;
|
|
||||||
|
|
||||||
if (this->stop)
|
if (this->stop)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user