diff options
author | Johannes Schickel | 2011-02-24 18:36:57 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-24 18:36:57 +0100 |
commit | 020a413247b7963242f0058c8618a9140f432f3f (patch) | |
tree | 66961fc6a9ce6910a3d9644be02efe5f75d6f850 /backends/graphics/opengl | |
parent | d81bb9794f59787ced1edde4c867aa307cec68fb (diff) | |
download | scummvm-rg350-020a413247b7963242f0058c8618a9140f432f3f.tar.gz scummvm-rg350-020a413247b7963242f0058c8618a9140f432f3f.tar.bz2 scummvm-rg350-020a413247b7963242f0058c8618a9140f432f3f.zip |
OPENGL: Set _gameTexture to 0 after deleting it.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index d1804e77eb..8bca09b2d6 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -1059,8 +1059,10 @@ void OpenGLGraphicsManager::initGL() { void OpenGLGraphicsManager::loadTextures() { #ifdef USE_RGB_COLOR - if (_transactionDetails.formatChanged && _gameTexture) + if (_transactionDetails.formatChanged && _gameTexture) { delete _gameTexture; + _gameTexture = 0; + } #endif uint gameScreenBPP = 0; |