From 98aec7ce1c1154805d9d05cca5c1bccbb8566b5d 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;