[client] always update positional information when new format

This commit is contained in:
Geoffrey McRae 2021-01-04 19:16:18 +11:00
parent 4c31cef709
commit 53ae0ea9f1

View file

@ -503,6 +503,14 @@ static int frameThread(void * unused)
g_state.state = APP_STATE_SHUTDOWN;
break;
}
g_state.srcSize.x = lgrFormat.width;
g_state.srcSize.y = lgrFormat.height;
g_state.haveSrcSize = true;
if (params.autoResize)
SDL_SetWindowSize(g_state.window, lgrFormat.width, lgrFormat.height);
updatePositionInfo();
}
if (useDMA)
@ -553,17 +561,6 @@ static int frameThread(void * unused)
}
}
if (lgrFormat.width != g_state.srcSize.x || lgrFormat.height != g_state.srcSize.y)
{
g_state.srcSize.x = lgrFormat.width;
g_state.srcSize.y = lgrFormat.height;
g_state.haveSrcSize = true;
if (params.autoResize)
SDL_SetWindowSize(g_state.window, lgrFormat.width, lgrFormat.height);
updatePositionInfo();
}
FrameBuffer * fb = (FrameBuffer *)(((uint8_t*)frame) + frame->offset);
if (!g_state.lgr->on_frame(g_state.lgrData, fb, useDMA ? dma->fd : -1))
{