From f17fa4bc2dd870d879f7d5c155775ec887af6c02 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 18 Jan 2018 22:34:13 +1100 Subject: [PATCH] Fix pressing alt + [numpad numbers] raising OnKeyPress with '?' --- src/OpenTK/Platform/Windows/API.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenTK/Platform/Windows/API.cs b/src/OpenTK/Platform/Windows/API.cs index 5992b63d..6a751cd6 100644 --- a/src/OpenTK/Platform/Windows/API.cs +++ b/src/OpenTK/Platform/Windows/API.cs @@ -354,7 +354,7 @@ namespace OpenTK.Platform.Windows /// To get extended error information, call GetLastError. /// [System.Security.SuppressUnmanagedCodeSecurity] - [DllImport("User32.dll"), CLSCompliant(false)] + [DllImport("User32.dll", CharSet = CharSet.Auto), CLSCompliant(false)] //[return: MarshalAs(UnmanagedType.Bool)] internal static extern INT GetMessage(ref MSG msg, IntPtr windowHandle, int messageFilterMin, int messageFilterMax); @@ -388,11 +388,11 @@ namespace OpenTK.Platform.Windows internal static extern void PostQuitMessage(int exitCode); [SuppressUnmanagedCodeSecurity] - [DllImport("User32.dll"), CLSCompliant(false)] + [DllImport("User32.dll", CharSet = CharSet.Auto), CLSCompliant(false)] internal static extern LRESULT DispatchMessage(ref MSG msg); [SuppressUnmanagedCodeSecurity] - [DllImport("User32.dll"), CLSCompliant(false)] + [DllImport("User32.dll", CharSet = CharSet.Auto), CLSCompliant(false)] internal static extern BOOL TranslateMessage(ref MSG lpMsg); ///