From d7ef626b42d2e669cac337dcf4e4c53cccdfad42 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 16 May 2003 00:11:35 +0000 Subject: fix advmame scaler ('flickering', observable in e.g. Sam&Max, and the left-screen-border-black bug). Note: this change might look fishy to you but is perfectly legal because our frame buffers put a border around the screen data to accomodate for this svn-id: r7556 --- common/scaler.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/scaler.cpp b/common/scaler.cpp index 96d25f3b3c..aef1d07ffe 100644 --- a/common/scaler.cpp +++ b/common/scaler.cpp @@ -726,9 +726,12 @@ void AdvMame2x(uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, uint16 G, H, I; while (height--) { - B = C = *(p - nextlineSrc); - E = F = *(p); - H = I = *(p + nextlineSrc); + B = *(p - 1 - nextlineSrc); + E = *(p - 1); + H = *(p - 1 + nextlineSrc); + C = *(p - nextlineSrc); + F = *(p); + I = *(p + nextlineSrc); for (int i = 0; i < width; ++i) { p++; A = B; B = C; C = *(p - nextlineSrc); @@ -759,9 +762,12 @@ void AdvMame3x(uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, uint16 G, H, I; while (height--) { - B = C = *(p - nextlineSrc); - E = F = *(p); - H = I = *(p + nextlineSrc); + B = *(p - 1 - nextlineSrc); + E = *(p - 1); + H = *(p - 1 + nextlineSrc); + C = *(p - nextlineSrc); + F = *(p); + I = *(p + nextlineSrc); for (int i = 0; i < width; ++i) { p++; A = B; B = C; C = *(p - nextlineSrc); -- cgit v1.2.3