diff options
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r-- | engines/gob/videoplayer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index a478492ccc..155989ccee 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -734,7 +734,11 @@ bool VideoPlayer::copyFrame(int slot, Surface &dest, if (!surface) return false; - Surface src(surface->w, surface->h, surface->format.bytesPerPixel, (byte *)surface->pixels); + // FIXME? This currently casts away const from the pixel data. However, it + // is only used read-only in this case (as far as I can tell). Not casting + // the const qualifier away will lead to an additional allocation and copy + // of the frame data which is undesirable. + Surface src(surface->w, surface->h, surface->format.bytesPerPixel, (byte *)const_cast<void *>(surface->getPixels())); dest.blit(src, left, top, left + width - 1, top + height - 1, x, y, transp); return true; |