diff --git a/OpenGL.Net.CoreUI/NativeWindowMouseEventArgs.cs b/OpenGL.Net.CoreUI/NativeWindowMouseEventArgs.cs index bbaa524d..df9b2adb 100644 --- a/OpenGL.Net.CoreUI/NativeWindowMouseEventArgs.cs +++ b/OpenGL.Net.CoreUI/NativeWindowMouseEventArgs.cs @@ -74,6 +74,7 @@ internal NativeWindowMouseEventArgs(DeviceContext deviceContext, IntPtr renderCo { Location = location; Buttons = buttons; + WheelTicks = wheelTicks; } #endregion diff --git a/OpenGL.Net.CoreUI/NativeWindowWinNT.cs b/OpenGL.Net.CoreUI/NativeWindowWinNT.cs index c7929dfc..a9c848d5 100644 --- a/OpenGL.Net.CoreUI/NativeWindowWinNT.cs +++ b/OpenGL.Net.CoreUI/NativeWindowWinNT.cs @@ -243,7 +243,7 @@ private IntPtr WindowsWndProc_BUTTONDOUBLECLICK(IntPtr hWnd, IntPtr wParam, IntP private IntPtr WindowsWndProc_MOUSEWHEEL(IntPtr hWnd, IntPtr wParam, IntPtr lParam) { - short wheelTicks = (short)(((wParam.ToInt32() >> 16) & 0xFFFF) / /* WHEEL_DELTA */ 120); + short wheelTicks = (short)(((wParam.ToInt64() >> 16) & 0xFFFF) / /* WHEEL_DELTA */ 120); OnMouseWheel(WindowsWndProc_GetMouseLocation(lParam), WindowsWndProc_GetMouseButtons(wParam), wheelTicks); @@ -263,7 +263,7 @@ private Point WindowsWndProc_GetMouseLocation(IntPtr lParam) private static MouseButton WindowsWndProc_GetMouseButtons(IntPtr wParam) { MouseButton buttons = MouseButton.None; - int wParamValue = wParam.ToInt32() & 0xFFFF; + int wParamValue = wParam.ToInt64() & 0xFFFF; if ((wParamValue & 0x0001) != 0) buttons |= MouseButton.Left;