From a37b527bbd0d7e4462f693b148937bbc099ca9b3 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 5 Aug 2021 07:01:28 +1000 Subject: [PATCH] [client] main: make core overlays register before everything else The display servers and renderers may want to register their own overlays in the future, as such we need g_state.overlays to be initialized to allow for this. --- client/src/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index d0402f59..614b2908 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1261,13 +1261,6 @@ int main(int argc, char * argv[]) ivshmemOptionsInit(); egl_dynProcsInit(); - // early renderer setup for option registration - for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i) - LG_Renderers[i]->setup(); - - for(unsigned int i = 0; i < LG_DISPLAYSERVER_COUNT; ++i) - LG_DisplayServers[i]->setup(); - g_state.overlays = ll_new(); app_registerOverlay(&LGOverlayConfig, NULL); app_registerOverlay(&LGOverlayAlert , NULL); @@ -1275,6 +1268,13 @@ int main(int argc, char * argv[]) app_registerOverlay(&LGOverlayGraphs, NULL); app_registerOverlay(&LGOverlayHelp , NULL); + // early renderer setup for option registration + for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i) + LG_Renderers[i]->setup(); + + for(unsigned int i = 0; i < LG_DISPLAYSERVER_COUNT; ++i) + LG_DisplayServers[i]->setup(); + if (!config_load(argc, argv)) return -1;