summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-07 22:44:14 +0000
committerdarkvater <darkvater@openttd.org>2004-09-07 22:44:14 +0000
commitd037ee4c925b7d525fc479846d0847e43592f310 (patch)
tree2ca55a223e7b01d120b90a140eee2943463fdd26 /window.c
parent6b9929d0f3ee1ad24f2342d30b54260dc2674743 (diff)
downloadopenttd-d037ee4c925b7d525fc479846d0847e43592f310.tar.xz
(svn r179) -Fix: [1023971] Fix for MouseWheel assert error in non-zoomable viewports. Zooming now will only occur if mousepointer is either in an extra viewport window, or main game-window (Dribbel)
Diffstat (limited to 'window.c')
-rw-r--r--window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/window.c b/window.c
index a6506e987..575e3fb2d 100644
--- a/window.c
+++ b/window.c
@@ -1020,7 +1020,9 @@ void MouseLoop()
if (_game_mode == GM_MENU)
return;
- if (mousewheel && !(w->flags4 & WF_DISABLE_VP_SCROLL)) {
+ // only allow zooming in-out in main window, or in viewports
+ if ( mousewheel && !(w->flags4 & WF_DISABLE_VP_SCROLL) &&
+ (w->window_class == WC_MAIN_WINDOW || w->window_class == WC_EXTRA_VIEW_PORT) ) {
ZoomInOrOutToCursorWindow(mousewheel < 0,w);
}