|
|
@@ -35,12 +35,11 @@
|
|
|
#include <Windows.h>
|
|
|
#else
|
|
|
#include <GL/glfw.h>
|
|
|
-
|
|
|
-static Input* inputInstance = 0;
|
|
|
#endif
|
|
|
|
|
|
#include "DebugNew.h"
|
|
|
|
|
|
+#ifndef USE_OPENGL
|
|
|
/// Convert the virtual key code & scan code if necessary. Return non-zero if key should be posted
|
|
|
int ConvertKeyCode(unsigned wParam, unsigned lParam)
|
|
|
{
|
|
|
@@ -59,14 +58,14 @@ int ConvertKeyCode(unsigned wParam, unsigned lParam)
|
|
|
case VK_CONTROL:
|
|
|
// Control might not be a real key, as Windows posts it whenever Alt-Gr is pressed (inspired by GLFW)
|
|
|
{
|
|
|
- MSG nextMsg;
|
|
|
- DWORD msgTime = GetMessageTime();
|
|
|
-
|
|
|
- if (PeekMessage(&nextMsg, NULL, 0, 0, PM_NOREMOVE))
|
|
|
- {
|
|
|
- if ((nextMsg.message == WM_KEYDOWN || nextMsg.message == WM_SYSKEYDOWN) && nextMsg.wParam == VK_MENU &&
|
|
|
- (nextMsg.lParam & 0x01000000) != 0 && nextMsg.time == msgTime)
|
|
|
- return 0;
|
|
|
+ MSG nextMsg;
|
|
|
+ DWORD msgTime = GetMessageTime();
|
|
|
+
|
|
|
+ if (PeekMessage(&nextMsg, NULL, 0, 0, PM_NOREMOVE))
|
|
|
+ {
|
|
|
+ if ((nextMsg.message == WM_KEYDOWN || nextMsg.message == WM_SYSKEYDOWN) && nextMsg.wParam == VK_MENU &&
|
|
|
+ (nextMsg.lParam & 0x01000000) != 0 && nextMsg.time == msgTime)
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
if (scanCode & 0x100)
|
|
|
@@ -86,6 +85,9 @@ int ConvertKeyCode(unsigned wParam, unsigned lParam)
|
|
|
return wParam;
|
|
|
}
|
|
|
}
|
|
|
+#else
|
|
|
+static Input* inputInstance = 0;
|
|
|
+#endif
|
|
|
|
|
|
OBJECTTYPESTATIC(Input);
|
|
|
|