mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] app: when running in sync mode send frame repeats as needed
This commit is contained in:
parent
d9cdc8d26c
commit
dafd7e7b42
@ -182,7 +182,7 @@ static bool sendFrame(void)
|
|||||||
if (app.frameValid && lgmpHostQueueNewSubs(app.frameQueue) > 0)
|
if (app.frameValid && lgmpHostQueueNewSubs(app.frameQueue) > 0)
|
||||||
{
|
{
|
||||||
// resend the last frame
|
// resend the last frame
|
||||||
repeatFrame = true;
|
repeatFrame = app.iface->asyncCapture;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,8 @@ static bool sendFrame(void)
|
|||||||
// if we are repeating a frame just send the last frame again
|
// if we are repeating a frame just send the last frame again
|
||||||
if (repeatFrame)
|
if (repeatFrame)
|
||||||
{
|
{
|
||||||
if ((status = lgmpHostQueuePost(app.frameQueue, 0, app.frameMemory[app.frameIndex])) != LGMP_OK)
|
if ((status = lgmpHostQueuePost(app.frameQueue, 0,
|
||||||
|
app.frameMemory[app.frameIndex])) != LGMP_OK)
|
||||||
DEBUG_ERROR("%s", lgmpStatusString(status));
|
DEBUG_ERROR("%s", lgmpStatusString(status));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -726,6 +727,14 @@ int app_main(int argc, char * argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CAPTURE_RESULT_TIMEOUT:
|
case CAPTURE_RESULT_TIMEOUT:
|
||||||
|
if (!iface->asyncCapture)
|
||||||
|
if (app.frameValid && lgmpHostQueueNewSubs(app.frameQueue) > 0)
|
||||||
|
{
|
||||||
|
if ((status = lgmpHostQueuePost(app.frameQueue, 0,
|
||||||
|
app.frameMemory[app.frameIndex])) != LGMP_OK)
|
||||||
|
DEBUG_ERROR("%s", lgmpStatusString(status));
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CAPTURE_RESULT_REINIT:
|
case CAPTURE_RESULT_REINIT:
|
||||||
|
Loading…
Reference in New Issue
Block a user