mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-03 22:22:08 +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:
		@@ -575,8 +575,7 @@ 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;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user