Fix overflow exception on right shift key press/release when running on x64 mode.

This commit is contained in:
the_fiddler 2008-11-02 17:27:12 +00:00
parent e2277e118c
commit 8c4a36b8a7

View file

@ -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;