diff options
author | Johannes Schickel | 2011-02-24 23:04:34 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-24 23:04:34 +0100 |
commit | f3ea868cf6b3603e88e0899fef6e71bcc800e481 (patch) | |
tree | 1ed61d4ef6ea6469731255f16702155e8f770ff5 /backends | |
parent | e0ce5a61b54cde3916b9aad51be43e8e9d5ea651 (diff) | |
download | scummvm-rg350-f3ea868cf6b3603e88e0899fef6e71bcc800e481.tar.gz scummvm-rg350-f3ea868cf6b3603e88e0899fef6e71bcc800e481.tar.bz2 scummvm-rg350-f3ea868cf6b3603e88e0899fef6e71bcc800e481.zip |
SDL: Prevent graphics manager hotswapping on startup. (This time for real)
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 0bc0119a80..bddb48ca95 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -128,7 +128,6 @@ void OSystem_SDL::init() { #ifdef USE_OPENGL // Setup a list with both SDL and OpenGL graphics modes setupGraphicsModes(); - _graphicsMode = _sdlModesCount; #endif } @@ -149,11 +148,15 @@ void OSystem_SDL::initBackend() { Common::String gfxMode(ConfMan.get("gfx_mode")); bool use_opengl = false; const OSystem::GraphicsMode *mode = OpenGLSdlGraphicsManager::supportedGraphicsModes(); + int i = 0; while (mode->name) { - if (scumm_stricmp(mode->name, gfxMode.c_str()) == 0) + if (scumm_stricmp(mode->name, gfxMode.c_str()) == 0) { + _graphicsMode = i + _sdlModesCount; use_opengl = true; + } mode++; + ++i; } // If the gfx_mode is from OpenGL, create the OpenGL graphics manager |