Changeset - r178:3a9f024f5a97
[Not reviewed]
master
0 1 0
darkvater - 20 years ago 2004-09-07 22:44:14
darkvater@openttd.org
(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)
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
window.c
Show inline comments
 
@@ -1017,13 +1017,15 @@ void MouseLoop()
 
	w = MaybeBringWindowToFront(w);
 
	vp = IsPtInWindowViewport(w, x, y);
 
	if (vp != NULL) {
 
		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);
 
		}
 

	
 
		if (click == 1) {
 
			DEBUG(misc, 2) ("cursor: 0x%X (%d)", _cursor.sprite, _cursor.sprite);
 
			if (_thd.place_mode != 0 &&
0 comments (0 inline, 0 general)