1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-04 23:37:10 +02:00

Init SDL timers before creating the menu

This commit is contained in:
Paul Cercueil 2014-04-14 00:28:11 +02:00
parent 9fba35feed
commit b1eedf6992

View File

@ -217,14 +217,21 @@ GMenu2X::GMenu2X()
*/
setenv("SDL_FBCON_DONT_CLEAR", "1", 0);
if( SDL_Init(SDL_INIT_TIMER) < 0) {
ERROR("Could not initialize SDL: %s\n", SDL_GetError());
quit();
}
bg = NULL;
font = NULL;
setSkin(confStr["skin"], !fileExists(confStr["wallpaper"]));
layers.insert(layers.begin(), make_shared<Background>(*this));
initMenu();
//Screen
if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
/* 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
* a black screen for a couple of seconds. */
if( SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
ERROR("Could not initialize SDL: %s\n", SDL_GetError());
quit();
}