diff options
author | Jochen Hoenicke | 2003-08-16 11:00:13 +0000 |
---|---|---|
committer | Jochen Hoenicke | 2003-08-16 11:00:13 +0000 |
commit | c9ece33b810748abf9edee3b1f2a8964c0da1cc6 (patch) | |
tree | 935bcb6120ea989b89553ae9d7ef5403b0028e10 /common | |
parent | 8cd96c7926f7ef764a22b65c4d6eb9d599e82f31 (diff) | |
download | scummvm-rg350-c9ece33b810748abf9edee3b1f2a8964c0da1cc6.tar.gz scummvm-rg350-c9ece33b810748abf9edee3b1f2a8964c0da1cc6.tar.bz2 scummvm-rg350-c9ece33b810748abf9edee3b1f2a8964c0da1cc6.zip |
Fixed aspect ratio scaler
svn-id: r9723
Diffstat (limited to 'common')
-rw-r--r-- | common/scaler.cpp | 8 | ||||
-rw-r--r-- | common/scaler.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp index 2f59d6d4d4..3198e5bfac 100644 --- a/common/scaler.cpp +++ b/common/scaler.cpp @@ -783,13 +783,17 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i memcpy(dstPtr, srcPtr, width * 2); break; case 1: - case 4: interpolate5Line<1>((uint16 *)dstPtr, (const uint16 *)(srcPtr - pitch), (const uint16 *)srcPtr, width); break; case 2: - case 3: interpolate5Line<2>((uint16 *)dstPtr, (const uint16 *)(srcPtr - pitch), (const uint16 *)srcPtr, width); break; + case 3: + interpolate5Line<2>((uint16 *)dstPtr, (const uint16 *)srcPtr, (const uint16 *)(srcPtr - pitch), width); + break; + case 4: + interpolate5Line<1>((uint16 *)dstPtr, (const uint16 *)srcPtr, (const uint16 *)(srcPtr - pitch), width); + break; } #endif dstPtr -= pitch; diff --git a/common/scaler.h b/common/scaler.h index bf09604552..50cf196582 100644 --- a/common/scaler.h +++ b/common/scaler.h @@ -46,7 +46,7 @@ FORCEINLINE int real2Aspect(int y) { } FORCEINLINE int aspect2Real(int y) { - return (y * 5 + 3) / 6; + return (y * 5 + 4) / 6; } extern void makeRectStretchable(int &x, int &y, int &w, int &h); |