From 9fba35feedfcb58761dbeb9cdbe6de96cab5cf74 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sun, 23 Mar 2014 12:48:30 +0100 Subject: [PATCH] Init the Menu before initializing SDL This avoids seeing a black screen for a few seconds while GMenu2X is loading. --- src/gmenu2x.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index b75ed5e..49cd224 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -217,6 +217,12 @@ GMenu2X::GMenu2X() */ setenv("SDL_FBCON_DONT_CLEAR", "1", 0); + bg = NULL; + font = NULL; + setSkin(confStr["skin"], !fileExists(confStr["wallpaper"])); + layers.insert(layers.begin(), make_shared(*this)); + initMenu(); + //Screen if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { ERROR("Could not initialize SDL: %s\n", SDL_GetError()); @@ -225,12 +231,6 @@ GMenu2X::GMenu2X() s = Surface::openOutputSurface(resX, resY, confInt["videoBpp"]); - bg = NULL; - font = NULL; - setSkin(confStr["skin"], !fileExists(confStr["wallpaper"])); - layers.insert(layers.begin(), make_shared(*this)); - initMenu(); - #ifdef ENABLE_INOTIFY monitor = new MediaMonitor(CARD_ROOT); #endif