From 35f154cb72fa4766b678f0418f75b15d7ce38f97 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 26 Sep 2007 16:12:31 +0000 Subject: [PATCH] Problem with mouse wheel not getting updated. --- Source/OpenTK/Platform/X11/X11Mouse.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/X11/X11Mouse.cs b/Source/OpenTK/Platform/X11/X11Mouse.cs index c22484c9..69749840 100644 --- a/Source/OpenTK/Platform/X11/X11Mouse.cs +++ b/Source/OpenTK/Platform/X11/X11Mouse.cs @@ -90,8 +90,10 @@ namespace OpenTK.Platform.X11 m[OpenTK.Input.MouseButton.Left] = (state & (int)X11.MouseMask.Button1Mask) != 0; m[OpenTK.Input.MouseButton.Middle] = (state & (int)X11.MouseMask.Button2Mask) != 0; m[OpenTK.Input.MouseButton.Right] = (state & (int)X11.MouseMask.Button3Mask) != 0; - m.Wheel += (state & (int)X11.MouseMask.Button4Mask); - m.Wheel -= (state & (int)X11.MouseMask.Button5Mask); + if ((state & (int)X11.MouseMask.Button4Mask) != 0) m.Wheel++; + if ((state & (int)X11.MouseMask.Button5Mask) != 0) m.Wheel--; + //m.Wheel += (state & (int)X11.MouseMask.Button4Mask); + //m.Wheel -= (state & (int)X11.MouseMask.Button5Mask); m.X = root_x; m.Y = root_y; }