diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index 5f2dd45..8aad6bc 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -226,7 +226,6 @@ GMenu2X::GMenu2X() font = NULL; setSkin(confStr["skin"], !fileExists(confStr["wallpaper"])); layers.insert(layers.begin(), make_shared(*this)); - initMenu(); /* We enable video at a later stage, so that the menu elements are * loaded before SDL inits the video; this is made so that we won't show @@ -238,10 +237,6 @@ GMenu2X::GMenu2X() s = Surface::openOutputSurface(resX, resY, confInt["videoBpp"]); -#ifdef ENABLE_INOTIFY - monitor = new MediaMonitor(CARD_ROOT); -#endif - if (!fileExists(confStr["wallpaper"])) { DEBUG("No wallpaper defined; we will take the default one.\n"); confStr["wallpaper"] = DEFAULT_WALLPAPER_PATH; @@ -249,6 +244,17 @@ GMenu2X::GMenu2X() initBG(); + /* the menu may take a while to load, so we show the background here */ + for (auto layer : layers) + layer->paint(*s); + s->flip(); + + initMenu(); + +#ifdef ENABLE_INOTIFY + monitor = new MediaMonitor(CARD_ROOT); +#endif + /* If a user-specified input.conf file exists, we load it; * otherwise, we load the default one. */ string input_file = getHome() + "/input.conf";