diff options
author | Max Horn | 2003-05-16 00:11:35 +0000 |
---|---|---|
committer | Max Horn | 2003-05-16 00:11:35 +0000 |
commit | d7ef626b42d2e669cac337dcf4e4c53cccdfad42 (patch) | |
tree | a8e4d057e7ab2f577687026b36c93bb3d26ffced | |
parent | 9d7cd48dcc7b51bcb405c7e7574d5a94236a7af5 (diff) | |
download | scummvm-rg350-d7ef626b42d2e669cac337dcf4e4c53cccdfad42.tar.gz scummvm-rg350-d7ef626b42d2e669cac337dcf4e4c53cccdfad42.tar.bz2 scummvm-rg350-d7ef626b42d2e669cac337dcf4e4c53cccdfad42.zip |
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
-rw-r--r-- | common/scaler.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
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); |