mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] don't stop the timer when restarting capture
This commit is contained in:
parent
aa32c5ffad
commit
9e3a42cb62
@ -206,12 +206,6 @@ static int frameThread(void * opaque)
|
||||
bool startThreads()
|
||||
{
|
||||
app.running = true;
|
||||
if (!lgCreateTimer(100, lgmpTimer, NULL, &app.lgmpTimer))
|
||||
{
|
||||
DEBUG_ERROR("Failed to create the LGMP timer");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!lgCreateThread("FrameThread", frameThread, NULL, &app.frameThread))
|
||||
{
|
||||
DEBUG_ERROR("Failed to create the frame thread");
|
||||
@ -235,12 +229,6 @@ bool stopThreads()
|
||||
}
|
||||
app.frameThread = NULL;
|
||||
|
||||
if (app.lgmpTimer)
|
||||
{
|
||||
lgTimerDestroy(app.lgmpTimer);
|
||||
app.lgmpTimer = NULL;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -539,6 +527,12 @@ int app_main(int argc, char * argv[])
|
||||
|
||||
LG_LOCK_INIT(app.pointerLock);
|
||||
|
||||
if (!lgCreateTimer(100, lgmpTimer, NULL, &app.lgmpTimer))
|
||||
{
|
||||
DEBUG_ERROR("Failed to create the LGMP timer");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!captureStart())
|
||||
{
|
||||
exitcode = -1;
|
||||
@ -587,8 +581,9 @@ int app_main(int argc, char * argv[])
|
||||
|
||||
finish:
|
||||
stopThreads();
|
||||
exit:
|
||||
|
||||
exit:
|
||||
lgTimerDestroy(app.lgmpTimer);
|
||||
LG_LOCK_FREE(app.pointerLock);
|
||||
|
||||
iface->deinit();
|
||||
|
Loading…
Reference in New Issue
Block a user