summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;