From a8c0c7adf4a545ea72d461e75fd4879d2f14040c Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 16 Nov 2009 10:38:49 +0000 Subject: [PATCH] Preserve the sign of the mouse position. Fixes issue [#1376]: "mouse position". --- Source/OpenTK/Platform/Windows/WinGLNative.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index cf622365..812809ba 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -293,8 +293,8 @@ namespace OpenTK.Platform.Windows case WindowMessage.MOUSEMOVE: Point point = new Point( - (int)(lParam.ToInt32() & 0x0000FFFF), - (int)(lParam.ToInt32() & 0xFFFF0000) >> 16); + (short)((uint)lParam.ToInt32() & 0x0000FFFF), + (short)(((uint)lParam.ToInt32() & 0xFFFF0000) >> 16)); mouse.Position = point; { if (!ClientRectangle.Contains(point))