aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-07-02 22:38:42 +0000
committerJohannes Schickel2010-07-02 22:38:42 +0000
commit2662d569d9fb8ee899b0124ebb237be9866b6957 (patch)
tree1caface71b88118d2926a68b499742573181b892
parenta6e07f01bb7699162be879abae1d01ab6980f768 (diff)
downloadscummvm-rg350-2662d569d9fb8ee899b0124ebb237be9866b6957.tar.gz
scummvm-rg350-2662d569d9fb8ee899b0124ebb237be9866b6957.tar.bz2
scummvm-rg350-2662d569d9fb8ee899b0124ebb237be9866b6957.zip
Fix long standing regression (introduced with r34053) in thumbnail scaling code for Hercules graphics.
svn-id: r50605
-rw-r--r--graphics/scaler/thumbnail_intern.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index ad8f73305d..f767c91bd5 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -148,8 +148,8 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
Graphics::Surface newscreen;
newscreen.create(width, in.h, in.bytesPerPixel);
- uint8 *dst = (uint8*)newscreen.getBasePtr((320 - in.w) / 2, 0);
- const uint8 *src = (uint8*)in.getBasePtr(0, 0);
+ uint8 *dst = (uint8 *)newscreen.getBasePtr((320 - in.w) / 2, 0);
+ const uint8 *src = (const uint8 *)in.getBasePtr(0, 0);
uint16 height = in.h;
while (height--) {
@@ -173,8 +173,8 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
Graphics::Surface newscreen;
newscreen.create(width, 400, in.bytesPerPixel);
- uint8 *dst = (uint8*)in.getBasePtr(0, (400 - 240) / 2);
- const uint8 *src = (uint8*)in.getBasePtr(41, 28);
+ uint8 *dst = (uint8 *)newscreen.getBasePtr(0, (400 - 240) / 2);
+ const uint8 *src = (const uint8 *)in.getBasePtr(41, 28);
for (int y = 0; y < 240; ++y) {
memcpy(dst, src, 640 * in.bytesPerPixel);