aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAlejandro Marzini2010-08-23 19:44:39 +0000
committerAlejandro Marzini2010-08-23 19:44:39 +0000
commit5c392df4471f9928f5cc71a72d07ead4fd2767f1 (patch)
tree0ffc7eb15876db662cf9b8835714b43e1c6d9cfc /backends
parent0df6bdde1cf7657cda2ac7895d319308ef8bbf8f (diff)
downloadscummvm-rg350-5c392df4471f9928f5cc71a72d07ead4fd2767f1.tar.gz
scummvm-rg350-5c392df4471f9928f5cc71a72d07ead4fd2767f1.tar.bz2
scummvm-rg350-5c392df4471f9928f5cc71a72d07ead4fd2767f1.zip
SDL/OPENGL: Fix segfault when using -g command line option.
svn-id: r52307
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/sdl/sdl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 2385c33458..37c29a34f1 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -70,6 +70,11 @@ void OSystem_SDL::init() {
if (_timerManager == 0)
_timerManager = new SdlTimerManager();
+
+ #ifdef USE_OPENGL
+ // Setup a list with both SDL and OpenGL graphics modes
+ setupGraphicsModes();
+ #endif
}
void OSystem_SDL::initBackend() {
@@ -93,9 +98,6 @@ void OSystem_SDL::initBackend() {
if (_graphicsManager == 0) {
#ifdef USE_OPENGL
- // Setup a list with both SDL and OpenGL graphics modes
- setupGraphicsModes();
-
if (ConfMan.hasKey("gfx_mode")) {
Common::String gfxMode(ConfMan.get("gfx_mode"));
bool use_opengl = false;