Fix crashing when pressing non-mapped keys on 64 bit platforms.

This commit is contained in:
UnknownShadow200 2015-09-16 06:50:26 +10:00
parent e35850c535
commit 9b7e12bb9d

View File

@ -312,13 +312,10 @@ namespace OpenTK.Platform.Windows
default:
Key tkKey;
if (!KeyMap.TryGetMappedKey((VirtualKeys)wParam, out tkKey))
{
Debug.Print("Virtual key {0} ({1}) not mapped.", (VirtualKeys)wParam, (int)lParam);
if (!KeyMap.TryGetMappedKey((VirtualKeys)wParam, out tkKey)) {
Debug.Print("Virtual key {0} ({1}) not mapped.", (VirtualKeys)wParam, lParam.ToInt64());
break;
}
else
{
} else{
keyboard[tkKey] = pressed;
}
return IntPtr.Zero;