From 69522495ded4c27b1951b04fe808b224559e9e66 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 30 Aug 2019 11:36:28 +1000 Subject: [PATCH] [client] fix invalid shutdown of renderer outside of it's thread --- VERSION | 2 +- client/src/main.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 34a60bc9..f22bed90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -fetch-0-g163a2e5d0a+1 \ No newline at end of file +fetch-1-gfce88fc72c+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 9ce9384b..62470a60 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -156,6 +156,9 @@ static int renderThread(void * unused) state.running = false; SDL_WaitThread(t_cursor, NULL); + + state.lgr->deinitialize(state.lgrData); + state.lgr = NULL; return 0; } @@ -1127,18 +1130,18 @@ int run() { state.frameTime = 1e9 / (current.refresh_rate * 2); } - else + else { DEBUG_WARN("Unable to capture monitor refresh rate using the default FPS Limit: 200"); state.frameTime = 1e9 / 200; } } - else + else { DEBUG_INFO("Using the FPS Limit from args: %d", params.fpsLimit); state.frameTime = 1e9 / params.fpsLimit; } - + register_key_binds(); // set the compositor hint to bypass for low latency @@ -1345,9 +1348,6 @@ int run() spice_disconnect(); } - if (state.lgr) - state.lgr->deinitialize(state.lgrData); - if (state.lgc) { state.lgc->free(); @@ -1396,4 +1396,4 @@ int main(int argc, char * argv[]) config_free(); return ret; -} +} \ No newline at end of file