From 86d5cb7204c9afd378edce0cc83d0aa5d0697d25 Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Tue, 27 Jan 2004 01:29:30 +0000 Subject: Fix 640x480, part 1, perfect fix tomorrow probably :p svn-id: r12632 --- backends/wince/CEScaler.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'backends/wince/CEScaler.cpp') diff --git a/backends/wince/CEScaler.cpp b/backends/wince/CEScaler.cpp index 5a2a51031d..e1469ce466 100644 --- a/backends/wince/CEScaler.cpp +++ b/backends/wince/CEScaler.cpp @@ -53,9 +53,10 @@ void PocketPCHalf(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 ds int width, int height) { uint8 *work; int i; + int dec; uint16 srcPitch16 = (uint16)(srcPitch / sizeof(uint16)); - while (height--) { + while ((height-=2) >= 0) { i = 0; work = dstPtr; @@ -66,10 +67,10 @@ void PocketPCHalf(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 ds uint16 color3 = *(((const uint16 *)srcPtr) + (i + srcPitch16)); *(((uint16 *)work) + 0) = interpolate16_3<565, 2, 1, 1>(color1, color2, color3); - - work += 2 * sizeof(uint16); + + work += sizeof(uint16); } - srcPtr += 2 * srcPitch; + srcPtr += 2 * srcPitch; dstPtr += dstPitch; } } -- cgit v1.2.3