ZVISION: Fix frame scaling for 2bpp

This commit is contained in:
richiesams 2013-08-11 16:44:13 -05:00
parent 372c55fd8b
commit 7e93b6407a

View File

@ -61,11 +61,13 @@ void scaleBuffer(const byte *src, byte *dst, uint32 srcWidth, uint32 srcHeight,
const byte color = *srcPtr++;
const byte color2 = *srcPtr++;
dst[i] = color;
dst[i + 1] = color2;
dst[pitch + i] = color;
dst[pitch + i + 1] = color2;
for (uint i = 0; i < scaleAmount; i++) {
uint index = i *2;
dst[index] = color;
dst[index + 1] = color2;
dst[pitch + index] = color;
dst[pitch + index + 1] = color2;
}
dst += 2 * scaleAmount;
}