diff options
author | Johannes Schickel | 2013-10-20 23:00:28 +0200 |
---|---|---|
committer | Kamil Zbróg | 2013-10-24 12:59:16 +0100 |
commit | b53770366bdc5a79c81a35b5c04bb7b1804f233f (patch) | |
tree | 5f70665853213a0a526530e9b7ca6b7d95cb1721 /backends/platform/sdl/sdl.cpp | |
parent | 2784901dac98f5972327a82bde147026cf7d7aee (diff) | |
download | scummvm-rg350-b53770366bdc5a79c81a35b5c04bb7b1804f233f.tar.gz scummvm-rg350-b53770366bdc5a79c81a35b5c04bb7b1804f233f.tar.bz2 scummvm-rg350-b53770366bdc5a79c81a35b5c04bb7b1804f233f.zip |
SDL: Always initialize video subsystem in initSDL.
Diffstat (limited to 'backends/platform/sdl/sdl.cpp')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 84187f9638..e8a7f7b9af 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -262,16 +262,15 @@ void OSystem_SDL::engineDone() { void OSystem_SDL::initSDL() { // Check if SDL has not been initialized if (!_initedSDL) { - uint32 sdlFlags = 0; + // We always initialize the video subsystem because we will need it to + // be initialized before the graphics managers to retrieve the desktop + // resolution, for example. WebOS also requires this initialization + // or otherwise the application won't start. + uint32 sdlFlags = SDL_INIT_VIDEO; + if (ConfMan.hasKey("disable_sdl_parachute")) sdlFlags |= SDL_INIT_NOPARACHUTE; -#if defined(WEBOS) || defined(USE_OPENGL) - // WebOS needs this flag or otherwise the application won't start. - // OpenGL SDL needs this to query the desktop resolution on startup. - sdlFlags |= SDL_INIT_VIDEO; -#endif - // Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers) if (SDL_Init(sdlFlags) == -1) error("Could not initialize SDL: %s", SDL_GetError()); @@ -279,6 +278,9 @@ void OSystem_SDL::initSDL() { // Enable unicode support if possible SDL_EnableUNICODE(1); + // Disable OS cursor + SDL_ShowCursor(SDL_DISABLE); + _initedSDL = true; } } |