summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-02-06 17:51:05 +0000
committerfrosch <frosch@openttd.org>2013-02-06 17:51:05 +0000
commit05203587b57c086d3891d3f4a336db00d52050b8 (patch)
tree88567f39833745076a343af5a7e7bc3489f0f4ee
parent5bffc704f9c5fd465ca196f2986683b1de9fadfb (diff)
downloadopenttd-05203587b57c086d3891d3f4a336db00d52050b8.tar.xz
(svn r24975) -Fix [FS#5463]: Additional zoom in levels could glitch by a few pixels due to incorrect rounding.
-rw-r--r--src/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index eac16a6e6..bfcc8d9d1 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1051,7 +1051,7 @@ static void ViewportAddLandscape()
/* determine size of area */
{
Point pt = RemapCoords(x, y, 241);
- width = (_vd.dpi.left + _vd.dpi.width - pt.x + 95 * ZOOM_LVL_BASE) >> (6 + ZOOM_LVL_SHIFT);
+ width = (_vd.dpi.left + _vd.dpi.width - pt.x + 96 * ZOOM_LVL_BASE - 1) >> (6 + ZOOM_LVL_SHIFT);
height = (_vd.dpi.top + _vd.dpi.height - pt.y) >> (5 + ZOOM_LVL_SHIFT) << 1;
}