From e09b5c39615f81579c863c9fd76afb173f4e250f Mon Sep 17 00:00:00 2001 From: Bertram Date: Fri, 9 Oct 2009 14:17:27 +0200 Subject: IAS (I am stupid (TM) ;D... --- src/openglgraphics.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2