mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(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)
This commit is contained in:
parent
6b9929d0f3
commit
d037ee4c92
4
window.c
4
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user