Skip to content

Commit

Permalink
OPENGL: Set _gameTexture to 0 after deleting it.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Johannes Schickel committed Feb 24, 2011
1 parent d81bb97 commit 020a413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backends/graphics/opengl/opengl-graphics.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 020a413

Please sign in to comment.