diff options
author | Alejandro Marzini | 2010-07-31 22:54:10 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-31 22:54:10 +0000 |
commit | 7dbe257da8fcfd0996b21bdfe0d3851e3e2e1927 (patch) | |
tree | 00559cacc66487150ad9e124efa0ddbc689fec8d /backends/platform/sdl | |
parent | c93adcbd298b65fff72d3991d2690379c2ba8a88 (diff) | |
download | scummvm-rg350-7dbe257da8fcfd0996b21bdfe0d3851e3e2e1927.tar.gz scummvm-rg350-7dbe257da8fcfd0996b21bdfe0d3851e3e2e1927.tar.bz2 scummvm-rg350-7dbe257da8fcfd0996b21bdfe0d3851e3e2e1927.zip |
OPENGL: Add support for BGR and rgb(a) reversed formats (Not available for GLES). General cleanup and commenting.
svn-id: r51559
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index cf6d44ebb7..2385c33458 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -313,6 +313,7 @@ const OSystem::GraphicsMode *OSystem_SDL::getSupportedGraphicsModes() const { } int OSystem_SDL::getDefaultGraphicsMode() const { + // Return the default graphics mode from the current graphics manager if (_graphicsMode < _sdlModesCount) return _graphicsManager->getDefaultGraphicsMode(); else @@ -322,6 +323,7 @@ int OSystem_SDL::getDefaultGraphicsMode() const { bool OSystem_SDL::setGraphicsMode(int mode) { const OSystem::GraphicsMode *srcMode; int i; + // Check if mode is from SDL or OpenGL if (mode < _sdlModesCount) { srcMode = SdlGraphicsManager::supportedGraphicsModes(); i = 0; @@ -329,8 +331,11 @@ bool OSystem_SDL::setGraphicsMode(int mode) { srcMode = OpenGLSdlGraphicsManager::supportedGraphicsModes(); i = _sdlModesCount; } + // Loop through modes while (srcMode->name) { if (i == mode) { + // If the new mode and the current mode are not from the same graphics + // manager, delete and create the new mode graphics manager if (_graphicsMode >= _sdlModesCount && mode < _sdlModesCount) { delete _graphicsManager; _graphicsManager = new SdlGraphicsManager(); |