Skip to content

Commit

Permalink
VIDEO: Fix regression in Urban Runner videos.
Browse files Browse the repository at this point in the history
This is a regression from 6fce92b. Thanks to
DrMcCoy for tracking this down.
  • Loading branch information
Johannes Schickel committed Aug 3, 2013
1 parent 604e1b0 commit 8fc54d6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions video/coktel_decoder.cpp
Expand Up @@ -2399,7 +2399,10 @@ void VMDDecoder::blit16(const Graphics::Surface &srcSurf, Common::Rect &rect) {

Graphics::PixelFormat pixelFormat = getPixelFormat();

const byte *src = (const byte *)srcSurf.getBasePtr(srcRect.left, srcRect.top);
// We cannot use getBasePtr here because srcSurf.format.bytesPerPixel is
// different from _bytesPerPixel.
const byte *src = (const byte *)srcSurf.getPixels() +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
byte *dst = (byte *)_surface.getBasePtr(_x + rect.left, _y + rect.top);

for (int i = 0; i < rect.height(); i++) {
Expand Down Expand Up @@ -2437,7 +2440,10 @@ void VMDDecoder::blit24(const Graphics::Surface &srcSurf, Common::Rect &rect) {

Graphics::PixelFormat pixelFormat = getPixelFormat();

const byte *src = (const byte *)srcSurf.getBasePtr(srcRect.left, srcRect.top);
// We cannot use getBasePtr here because srcSurf.format.bytesPerPixel is
// different from _bytesPerPixel.
const byte *src = (const byte *)srcSurf.getPixels() +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
byte *dst = (byte *)_surface.getBasePtr(_x + rect.left, _y + rect.top);

for (int i = 0; i < rect.height(); i++) {
Expand Down

0 comments on commit 8fc54d6

Please sign in to comment.