aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorJordi Vilalta Prat2011-01-08 16:05:27 +0000
committerJordi Vilalta Prat2011-01-08 16:05:27 +0000
commitb24aab30527feb67f32e0f7a43dc8be4eb0fc0da (patch)
treeb218bf036da0ed188d3d7a6df6a816ae58e1cf0f /backends/graphics
parentdd6fd0ef27d0eb5617bc0f34054e3b1d2ded207e (diff)
downloadscummvm-rg350-b24aab30527feb67f32e0f7a43dc8be4eb0fc0da.tar.gz
scummvm-rg350-b24aab30527feb67f32e0f7a43dc8be4eb0fc0da.tar.bz2
scummvm-rg350-b24aab30527feb67f32e0f7a43dc8be4eb0fc0da.zip
OPENGL: Skip empty texture updates.
This fixes some hangs when calling the GMM while running Fascination. svn-id: r55166
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/opengl/gltexture.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index 843ec2d2b3..cd9e23cb71 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -141,6 +141,10 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {
}
void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLuint w, GLuint h) {
+ // Skip empty updates.
+ if (w * h == 0)
+ return;
+
// Select this OpenGL texture
glBindTexture(GL_TEXTURE_2D, _textureName); CHECK_GL_ERROR();