Fix for text object on windows.
authorAlexander Kuznetsov <kuzsasha@gmail.com>
Sat, 22 Oct 2011 03:14:19 +0000 (03:14 +0000)
committerAlexander Kuznetsov <kuzsasha@gmail.com>
Sat, 22 Oct 2011 03:14:19 +0000 (03:14 +0000)
No utf8 when keyup

intern/ghost/intern/GHOST_SystemWin32.cpp

index 99ce811..956a159 100644 (file)
@@ -725,6 +725,8 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
                                                                        (wchar_t*)utf16, 1,
                                                                        (LPSTR) utf8_char, 5,
                                                                        NULL,NULL); else *utf8_char = 0;
+
+               if(!keyDown) utf8_char[0] = '\0';
                
                event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, (*utf8_char & 0x80)?'?':*utf8_char, utf8_char);