From b2318b5261816c1d24ad5fe9ae0354731e2093a8 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 13 Mar 2013 17:49:13 +0100 Subject: [PATCH] Tried to fix Windows unicode messages Former-commit-id: bf4680a4507545d7d91171efd86e6265c07e7343 --- src/Nazara/Utility/Win32/WindowImpl.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Nazara/Utility/Win32/WindowImpl.cpp b/src/Nazara/Utility/Win32/WindowImpl.cpp index 77eb9efae..ac67db5b1 100644 --- a/src/Nazara/Utility/Win32/WindowImpl.cpp +++ b/src/Nazara/Utility/Win32/WindowImpl.cpp @@ -880,6 +880,25 @@ bool NzWindowImpl::HandleMessage(HWND window, UINT message, WPARAM wParam, LPARA break; } + case WM_UNICHAR: + { + // http://msdn.microsoft.com/en-us/library/windows/desktop/ms646288(v=vs.85).aspx + if (wParam != UNICODE_NOCHAR) + { + bool repeated = ((HIWORD(lParam) & KF_REPEAT) != 0); + if (m_keyRepeat || !repeated) + { + NzEvent event; + event.type = nzEventType_TextEntered; + event.text.character = static_cast(wParam); + event.text.repeated = repeated; + m_parent->PushEvent(event); + } + + return true; + } + } + case WM_XBUTTONDBLCLK: { NzEvent event;