diff options
author | Johannes Schickel | 2013-11-17 20:28:16 +0100 |
---|---|---|
committer | Johannes Schickel | 2013-11-17 20:28:16 +0100 |
commit | 2094bd31ec92db57c3da48bfad27252ad5a55ed2 (patch) | |
tree | 9bac7a22fe6f900880884ba999b21e1692480bf8 | |
parent | 7c753d3a13738e715f7001bbf965f772e64694e4 (diff) | |
download | scummvm-rg350-2094bd31ec92db57c3da48bfad27252ad5a55ed2.tar.gz scummvm-rg350-2094bd31ec92db57c3da48bfad27252ad5a55ed2.tar.bz2 scummvm-rg350-2094bd31ec92db57c3da48bfad27252ad5a55ed2.zip |
OPENGL: Fix >1Bpp mouse cursors which do not require format conversion.
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 9ad0e62f37..a97f680f15 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -608,13 +608,10 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int Graphics::Surface *dst = _cursor->getSurface(); const uint srcPitch = w * inputFormat.bytesPerPixel; - // In case the actual cursor format differs from the requested format - // we will need to convert the format. This might be the case because - // the cursor format does not have any alpha bits. - if (dst->format != inputFormat) { - Graphics::crossBlit((byte *)dst->getPixels(), (const byte *)buf, dst->pitch, srcPitch, - w, h, dst->format, inputFormat); - } + // Copy the cursor data to the actual texture surface. This will make + // sure that the data is also converted to the expected format. + Graphics::crossBlit((byte *)dst->getPixels(), (const byte *)buf, dst->pitch, srcPitch, + w, h, dst->format, inputFormat); // We apply the color key by setting the alpha bits of the pixels to // fully transparent. |