From 78850be8df2bf9b76884a3517c74fbfc8d3bbacd Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sat, 31 Oct 2009 16:24:10 +0000 Subject: [PATCH] FS#134 - Fix Event::TextEntered ignoring the key repeat state git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1254 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Win32/WindowImplWin32.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 91487745..c670a764 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -745,10 +745,13 @@ void WindowImplWin32::ProcessEvent(UINT Message, WPARAM WParam, LPARAM LParam) // Text event case WM_CHAR : { - Event Evt; - Evt.Type = Event::TextEntered; - Evt.Text.Unicode = static_cast(WParam); - SendEvent(Evt); + if (myKeyRepeatEnabled || ((LParam & (1 << 30)) == 0)) + { + Event Evt; + Evt.Type = Event::TextEntered; + Evt.Text.Unicode = static_cast(WParam); + SendEvent(Evt); + } break; }