aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorVicent Marti2008-07-21 21:23:23 +0000
committerVicent Marti2008-07-21 21:23:23 +0000
commit7071a95a5753861bce494f1e7906e033ce8bd7c4 (patch)
tree3b13f55b2067d8aa7e860c6e381e802f8bd35aff /graphics
parentc7b624d91eaa0444fdc454dfb5c5dd7beaa56bcc (diff)
downloadscummvm-rg350-7071a95a5753861bce494f1e7906e033ce8bd7c4.tar.gz
scummvm-rg350-7071a95a5753861bce494f1e7906e033ce8bd7c4.tar.bz2
scummvm-rg350-7071a95a5753861bce494f1e7906e033ce8bd7c4.zip
Fixed several segfaults and graphical glitches when drawing at low resolutions. Fixed dialog stack redrawing.
svn-id: r33182
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 9b460e1ac0..639039fe28 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -440,8 +440,8 @@ drawRoundedSquare(int x, int y, int r, int w, int h) {
w <= 0 || h <= 0 || x < 0 || y < 0)
return;
- while ((r << 1) > w || (r << 1) > h)
- r <<= 1;
+ if ((r << 1) > w || (r << 1) > h)
+ r = MIN(w >> 1, h >> 1);
if (Base::_fillMode != kFillDisabled && Base::_shadowOffset
&& x + w + Base::_shadowOffset < Base::_activeSurface->w