From 020a413247b7963242f0058c8618a9140f432f3f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 24 Feb 2011 18:36:57 +0100 Subject: 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. --- backends/graphics/opengl/opengl-graphics.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backends') 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; -- cgit v1.2.3