diff options
author | Strangerke | 2012-10-10 08:26:41 +0200 |
---|---|---|
committer | Strangerke | 2012-10-10 08:26:41 +0200 |
commit | b164cbb571fc4e0f2a6f002760a851d8ac592540 (patch) | |
tree | 4d25f2e1f8241f6f3352fd9fb1135f5faa36dfd4 /graphics/scaler.cpp | |
parent | b2f2f8d7b08b40e43702e8db325f8136066f10be (diff) | |
parent | 1e200620d673af4acdd2d128ed6e390df001aacf (diff) | |
download | scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.gz scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.bz2 scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.zip |
Merge branch 'master' of github.com:scummvm/scummvm into mortevielle
Conflicts:
base/plugins.cpp
configure
Diffstat (limited to 'graphics/scaler.cpp')
-rw-r--r-- | graphics/scaler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 9ade0e6c57..b81e8937a8 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -167,12 +167,12 @@ void DestroyScalers(){ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { // Spot the case when it can all be done in 1 hit - if ((srcPitch == sizeof(OverlayColor) * (uint)width) && (dstPitch == sizeof(OverlayColor) * (uint)width)) { - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width * height); + if ((srcPitch == sizeof(uint16) * (uint)width) && (dstPitch == sizeof(uint16) * (uint)width)) { + memcpy(dstPtr, srcPtr, sizeof(uint16) * width * height); return; } while (height--) { - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); srcPtr += srcPitch; dstPtr += dstPitch; } @@ -207,11 +207,10 @@ void Normal2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit uint8 *r; assert(IS_ALIGNED(dstPtr, 4)); - assert(sizeof(OverlayColor) == 2); while (height--) { r = dstPtr; for (int i = 0; i < width; ++i, r += 4) { - uint32 color = *(((const OverlayColor *)srcPtr) + i); + uint32 color = *(((const uint16 *)srcPtr) + i); color |= color << 16; |