summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-09 14:17:27 +0200
committerBertram <bertram@cegetel.net>2009-10-09 14:17:27 +0200
commite09b5c39615f81579c863c9fd76afb173f4e250f (patch)
treeeffda8cf7df19c23f4d21090f38fe8c1ba2e9864
parent79d65e08403b4a24846eac57ca9ffd1ddd92a5cd (diff)
downloadmana-e09b5c39615f81579c863c9fd76afb173f4e250f.tar.gz
mana-e09b5c39615f81579c863c9fd76afb173f4e250f.tar.bz2
mana-e09b5c39615f81579c863c9fd76afb173f4e250f.tar.xz
mana-e09b5c39615f81579c863c9fd76afb173f4e250f.zip
IAS (I am stupid (TM) ;D...
-rw-r--r--src/openglgraphics.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 97417be7..d047eb2f 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -227,11 +227,13 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
return false;
// Just draw the image normally when no resizing is necessary,
- // or when the desired image is smaller than the current one.
- if (width >= desiredWidth && height >= desiredHeight)
- {
+ if (width == desiredWidth && height == desiredHeight)
return drawImage(image, srcX, srcY, dstX, dstY, width, height, useColor);
- }
+
+ // When the desired image is smaller than the current one,
+ // disable smooth effect.
+ if (width > desiredWidth && height > desiredHeight)
+ smooth = false;
srcX += image->mBounds.x;
srcY += image->mBounds.y;