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

This commit is contained in:
rubidium 2009-01-19 22:27:43 +00:00
parent 7a81c0e5b4
commit 0893cb2adf

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