1
0
Fork 0

(svn r15156) -Fix: add scrollwheel support to allegro

release/0.7
rubidium 2009-01-19 22:27:43 +00:00
parent 9b463c26de
commit 6e1af6a051
1 changed files with 7 additions and 0 deletions

View File

@ -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();