aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/scaler.cpp18
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);