aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorKamil Zbróg2013-11-18 16:19:47 +0000
committerKamil Zbróg2013-11-18 16:19:47 +0000
commit446c57d281e592653c9935c896d33334d23f0519 (patch)
treeec3d5de5c92d10038890d72fd565e339f6bb46f4 /backends
parent3d1d1884324a240b73fea6de3b5df6f7310eeb53 (diff)
parent6244b6afe2e4634946ede4f971f664e7213014ed (diff)
downloadscummvm-rg350-446c57d281e592653c9935c896d33334d23f0519.tar.gz
scummvm-rg350-446c57d281e592653c9935c896d33334d23f0519.tar.bz2
scummvm-rg350-446c57d281e592653c9935c896d33334d23f0519.zip
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp11
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.