mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 06:54:05 +02:00
Show the background while loading the menu
This is better than showing an empty black screen, I think.
This commit is contained in:
parent
5fa8919f2b
commit
dac1e49238
@ -226,7 +226,6 @@ GMenu2X::GMenu2X()
|
||||
font = NULL;
|
||||
setSkin(confStr["skin"], !fileExists(confStr["wallpaper"]));
|
||||
layers.insert(layers.begin(), make_shared<Background>(*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";
|
||||
|
Loading…
Reference in New Issue
Block a user