mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-17 22:56:16 +02:00
Init SDL timers before creating the menu
This commit is contained in:
parent
9fba35feed
commit
b1eedf6992
@ -217,14 +217,21 @@ GMenu2X::GMenu2X()
|
|||||||
*/
|
*/
|
||||||
setenv("SDL_FBCON_DONT_CLEAR", "1", 0);
|
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;
|
bg = NULL;
|
||||||
font = NULL;
|
font = NULL;
|
||||||
setSkin(confStr["skin"], !fileExists(confStr["wallpaper"]));
|
setSkin(confStr["skin"], !fileExists(confStr["wallpaper"]));
|
||||||
layers.insert(layers.begin(), make_shared<Background>(*this));
|
layers.insert(layers.begin(), make_shared<Background>(*this));
|
||||||
initMenu();
|
initMenu();
|
||||||
|
|
||||||
//Screen
|
/* We enable video at a later stage, so that the menu elements are
|
||||||
if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
|
* 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());
|
ERROR("Could not initialize SDL: %s\n", SDL_GetError());
|
||||||
quit();
|
quit();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user