From df341ba65d01a9562b45c77768efa37cc4733084 Mon Sep 17 00:00:00 2001 From: Dmitri Trembovetski Date: Wed, 17 Jun 2009 00:43:02 +0000 Subject: Newt: update to the previous fix : need to use 0xFFFF not 0xFF. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1969 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/newt/native/WindowsWindow.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/newt/native/WindowsWindow.c') diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index b86159bb1..908eb2ac0 100755 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -461,24 +461,24 @@ static jchar* GetNullTerminatedStringChars(JNIEnv* env, jstring str) static jint GetModifiers() { jint modifiers = 0; - // have to do &0xFF to avoid runtime assert crash caused by compiling with + // have to do &0xFFFF to avoid runtime assert caused by compiling with // /RTCcsu - if (HIBYTE((GetKeyState(VK_CONTROL) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_CONTROL) & 0xFFFF)) != 0) { modifiers |= EVENT_CTRL_MASK; } - if (HIBYTE((GetKeyState(VK_SHIFT) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_SHIFT) & 0xFFFF)) != 0) { modifiers |= EVENT_SHIFT_MASK; } - if (HIBYTE((GetKeyState(VK_MENU) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_MENU) & 0xFFFF)) != 0) { modifiers |= EVENT_ALT_MASK; } - if (HIBYTE((GetKeyState(VK_LBUTTON) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_LBUTTON) & 0xFFFF)) != 0) { modifiers |= EVENT_BUTTON1_MASK; } - if (HIBYTE((GetKeyState(VK_MBUTTON) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_MBUTTON) & 0xFFFF)) != 0) { modifiers |= EVENT_BUTTON2_MASK; } - if (HIBYTE((GetKeyState(VK_RBUTTON) & 0xFF)) != 0) { + if (HIBYTE((GetKeyState(VK_RBUTTON) & 0xFFFF)) != 0) { modifiers |= EVENT_BUTTON3_MASK; } -- cgit v1.2.3