mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 12:59:33 +00:00
(svn r15156) -Fix: add scrollwheel support to allegro
This commit is contained in:
parent
9b463c26de
commit
6e1af6a051
@ -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