summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/openglgraphics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 84ed7820..97417be7 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -226,8 +226,9 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
if (!image)
return false;
- // Just draw the image normally when no resizing is necessary
- if (width == desiredWidth && height == desiredHeight)
+ // 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)
{
return drawImage(image, srcX, srcY, dstX, dstY, width, height, useColor);
}