From fde2fda466f6a49a0105925b026b9776c5a402b5 Mon Sep 17 00:00:00 2001 From: insofaras Date: Tue, 23 Feb 2016 21:40:49 +0000 Subject: [PATCH] linux scroll wheel --- linux_4ed.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux_4ed.cpp b/linux_4ed.cpp index deab87b4..cdbd2e6e 100644 --- a/linux_4ed.cpp +++ b/linux_4ed.cpp @@ -1645,6 +1645,16 @@ main(int argc, char **argv) linuxvars.mouse_data.right_button_pressed = 1; linuxvars.mouse_data.right_button = 1; } break; + + //NOTE(inso): scroll up + case Button4: { + linuxvars.mouse_data.wheel = 1; + }break; + + //NOTE(inso): scroll down + case Button5: { + linuxvars.mouse_data.wheel = -1; + }break; } }break; @@ -1839,6 +1849,7 @@ main(int argc, char **argv) linuxvars.mouse_data.left_button_released = 0; linuxvars.mouse_data.right_button_pressed = 0; linuxvars.mouse_data.right_button_released = 0; + linuxvars.mouse_data.wheel = 0; ProfileStart(OS_file_process); {