From 8c4a36b8a7922719644a2eaecac2a16abbfd5749 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 2 Nov 2008 17:27:12 +0000 Subject: [PATCH] Fix overflow exception on right shift key press/release when running on x64 mode. --- Source/OpenTK/Platform/Windows/WMInput.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/Windows/WMInput.cs b/Source/OpenTK/Platform/Windows/WMInput.cs index 1628e9a8..1f6df515 100644 --- a/Source/OpenTK/Platform/Windows/WMInput.cs +++ b/Source/OpenTK/Platform/Windows/WMInput.cs @@ -144,7 +144,7 @@ namespace OpenTK.Platform.Windows // TODO: Not 100% reliable, when both keys are pressed at once. if (ShiftRightScanCode != 0) { - if ((((int)msg.LParam >> 16) & 0xFF) == ShiftRightScanCode) + if (((msg.LParam.ToInt32() >> 16) & 0xFF) == ShiftRightScanCode) keyboard[Input.Key.ShiftRight] = pressed; else keyboard[Input.Key.ShiftLeft] = pressed;