mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[c-host] fix deadlock when there is no update
This commit is contained in:
parent
eedde4abcb
commit
8df850023c
@ -71,8 +71,8 @@ static int pointerThread(void * opaque)
|
||||
pointer->data = app.pointerData;
|
||||
if (!app.iface->getPointer(&pointer))
|
||||
DEBUG_ERROR("Failed to get the pointer");
|
||||
os_signalEvent(app.updateEvent);
|
||||
#endif
|
||||
os_signalEvent(app.updateEvent);
|
||||
}
|
||||
|
||||
DEBUG_INFO("Cursor thread stopped");
|
||||
@ -303,6 +303,7 @@ int app_main()
|
||||
bool frameUpdate = false;
|
||||
bool pointerUpdate = false;
|
||||
|
||||
retry_capture:
|
||||
switch(iface->capture(&frameUpdate, &pointerUpdate))
|
||||
{
|
||||
case CAPTURE_RESULT_OK:
|
||||
@ -342,6 +343,9 @@ int app_main()
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (!frameUpdate && !pointerUpdate)
|
||||
goto retry_capture;
|
||||
|
||||
if (frameUpdate && !os_signalEvent(app.frameEvent))
|
||||
{
|
||||
DEBUG_ERROR("Failed to signal the frame thread");
|
||||
|
Loading…
Reference in New Issue
Block a user