Changeset - r10821:3f1efeb4dbe6
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-01-19 22:27:43
rubidium@openttd.org
(svn r15156) -Fix: add scrollwheel support to allegro
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/video/allegro_v.cpp
Show inline comments
 
@@ -381,6 +381,13 @@ static void PollEvent()
 
		mouse_action = true;
 
	}
 

	
 
	static int prev_mouse_z = 0;
 
	if (prev_mouse_z != mouse_z) {
 
		_cursor.wheel = (prev_mouse_z - mouse_z) < 0 ? -1 : 1;
 
		prev_mouse_z = mouse_z;
 
		mouse_action = true;
 
	}
 

	
 
	if (mouse_action) HandleMouseEvents();
 

	
 
	poll_keyboard();
0 comments (0 inline, 0 general)