summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-05-19 23:52:04 +0000
committertruelight <truelight@openttd.org>2007-05-19 23:52:04 +0000
commitecb8585bd4dcf75d536fd1214bbf6be807a5e366 (patch)
treed468c2b79a9bef97f027aeadc327e65c7fc0ed6e /src/main_gui.cpp
parentd2c750b2c944e86680b4f64e4f7fab9b96356807 (diff)
downloadopenttd-ecb8585bd4dcf75d536fd1214bbf6be807a5e366.tar.xz
(svn r9885) -Fix r9846: some last bitshifts with zoom-levels that were forgotten
-Fix r9846: initialize the zoom level for 'screen', as assuming 0 is not correct
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 5fc4b3f97..613ea7dce 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -2425,8 +2425,8 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
_scrolling_viewport = false;
}
- WP(w, vp_d).scrollpos_x += e->we.scroll.delta.x << vp->zoom;
- WP(w, vp_d).scrollpos_y += e->we.scroll.delta.y << vp->zoom;
+ WP(w, vp_d).scrollpos_x += ScaleByZoom(e->we.scroll.delta.x, vp->zoom);
+ WP(w, vp_d).scrollpos_y += ScaleByZoom(e->we.scroll.delta.y, vp->zoom);
} break;
case WE_MOUSEWHEEL: