From f90bbf9cfad20c6122b98d8b2f99c2cdaa5ce5d6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 17:25:08 +0200 Subject: VIDEO: Prefer Surface::format over Surface::bytesPerPixel. --- video/codecs/indeo3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video/codecs') diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp index 53ab56dd2d..742b30243f 100644 --- a/video/codecs/indeo3.cpp +++ b/video/codecs/indeo3.cpp @@ -322,10 +322,10 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream * const uint32 color = _pixelFormat.RGBToColor(r, g, b); - for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->bytesPerPixel) { - if (_surface->bytesPerPixel == 1) + for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->format.bytesPerPixel) { + if (_surface->format.bytesPerPixel == 1) *((uint8 *)rowDest) = (uint8)color; - else if (_surface->bytesPerPixel == 2) + else if (_surface->format.bytesPerPixel == 2) *((uint16 *)rowDest) = (uint16)color; } } -- cgit v1.2.3