mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r15156) -Fix: add scrollwheel support to allegro
This commit is contained in:
parent
7a81c0e5b4
commit
0893cb2adf
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user