mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-22 12:40:11 +00:00
[c-host] change getFrame/Pointer to return a real status
This commit is contained in:
14
c-host/app.c
14
c-host/app.c
@@ -86,12 +86,20 @@ static int frameThread(void * opaque)
|
||||
|
||||
while(app.running)
|
||||
{
|
||||
CaptureFrame frame;
|
||||
CaptureResult result;
|
||||
CaptureFrame frame;
|
||||
|
||||
frame.data = app.frame[frameIndex];
|
||||
if (!app.iface->getFrame(&frame))
|
||||
result = app.iface->getFrame(&frame);
|
||||
if (result == CAPTURE_RESULT_REINIT)
|
||||
{
|
||||
app.reinit = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (result == CAPTURE_RESULT_ERROR)
|
||||
{
|
||||
DEBUG_ERROR("Failed to get the frame");
|
||||
app.reinit = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user