diff options
author | Alejandro Marzini | 2010-07-13 05:38:10 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-13 05:38:10 +0000 |
commit | 84ceae932852fe684ea553daee712b52da83add6 (patch) | |
tree | 13bc020842cff6ebc0d12685551c122ec3df4f12 /backends/platform/sdl | |
parent | 5f86d1127528244f20296833889881e185f16795 (diff) | |
download | scummvm-rg350-84ceae932852fe684ea553daee712b52da83add6.tar.gz scummvm-rg350-84ceae932852fe684ea553daee712b52da83add6.tar.bz2 scummvm-rg350-84ceae932852fe684ea553daee712b52da83add6.zip |
Check if USE_OPENGL is defined for compiling OpenGL code.
svn-id: r50842
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index e5ae3bb523..58e4167a7c 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -32,8 +32,10 @@ #include "backends/events/sdl/sdl-events.h" #include "backends/mutex/sdl/sdl-mutex.h" #include "backends/timer/sdl/sdl-timer.h" -//#include "backends/graphics/sdl/sdl-graphics.h" +#include "backends/graphics/sdl/sdl-graphics.h" +#ifdef USE_OPENGL #include "backends/graphics/openglsdl/openglsdl-graphics.h" +#endif #include "icons/scummvm.xpm" @@ -84,11 +86,31 @@ void OSystem_SDL::initBackend() { } if (_graphicsManager == 0) { - // Changed to OpenGL for testing - //_graphicsManager = new SdlGraphicsManager(); - _graphicsManager = new OpenGLSdlGraphicsManager(); +#ifdef USE_OPENGL + /*if (ConfMan.hasKey("gfx_mode")) { + Common::String gfxMode(ConfMan.get("gfx_mode")); + + _openglGraphicsMode = OpenGLSdlGraphicsManager::getSupportedGraphicsModes(); + + bool use_opengl = false; + while (_openglGraphicsMode->name) { + if (scumm_stricmp(_openglGraphicsMode->name, gfxMode.c_str()) == 0) + use_opengl = true; + + _openglGraphicsMode++; + } + + if (use_opengl) { + _graphicsManager = new OpenGLSdlGraphicsManager(); + ((OpenGLSdlGraphicsManager *)_graphicsManager)->init(); + } + }*/ + _graphicsManager = new OpenGLSdlGraphicsManager(); ((OpenGLSdlGraphicsManager *)_graphicsManager)->init(); +#endif + if (_graphicsManager == 0) + _graphicsManager = new SdlGraphicsManager(); } if (_audiocdManager == 0) |