diff options
author | Torbjörn Andersson | 2003-06-22 14:41:09 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-06-22 14:41:09 +0000 |
commit | 53d679bfb7bc26a7d697b6717500e0c2cea47c07 (patch) | |
tree | cf5e6cf3ae3369aa294a5ed42488b35529aa5502 /common | |
parent | 4604b2600ecc2895e049868d3a6287c2fa0f9093 (diff) | |
download | scummvm-rg350-53d679bfb7bc26a7d697b6717500e0c2cea47c07.tar.gz scummvm-rg350-53d679bfb7bc26a7d697b6717500e0c2cea47c07.tar.bz2 scummvm-rg350-53d679bfb7bc26a7d697b6717500e0c2cea47c07.zip |
Fix some graphics glitches that would sometimes be visible around the mouse
cursor in aspect-ratio correction mode.
svn-id: r8618
Diffstat (limited to 'common')
-rw-r--r-- | common/scaler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp index d78a52de3b..b767036cd5 100644 --- a/common/scaler.cpp +++ b/common/scaler.cpp @@ -697,19 +697,20 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i for (y = maxDstY; y >= srcY; y--) { uint8 *srcPtr = buf + srcX * 2 + (aspect2Real(y) + off) * pitch; - if (srcPtr == dstPtr) - break; - #if 0 // Don't use bilinear filtering, rather just duplicate pixel lines: // a little bit faster, but looks ugly + if (srcPtr == dstPtr) + break; + memcpy(dstPtr, srcPtr, width * 2); #else // Bilinear filter switch (y % 6) { case 0: case 5: - memcpy(dstPtr, srcPtr, width * 2); + if (srcPtr != dstPtr) + memcpy(dstPtr, srcPtr, width * 2); break; case 1: case 4: |