From 53ae0ea9f19b5cc6378dde7a0e748641feb0478f Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 4 Jan 2021 19:16:18 +1100 Subject: [PATCH] [client] always update positional information when new format --- client/src/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 97c86bfd..392e9a10 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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)) {