dinput: Ignore repeated key events.

Vitaliy Margolen wine-patch at kievinfo.com
Sun Jul 16 13:59:51 CDT 2006


ChangeLog:
dinput: Ignore repeated key events.

Fixes bug # 5643.

 dlls/dinput/keyboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
-------------- next part --------------
2d68cede9c2c6a8222685057b2b5df5771f1651a
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index 9640db9..d9a8c43 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -97,7 +97,8 @@ LRESULT CALLBACK KeyboardCallback( int c
 
     /** returns now if key event already known */
     new_diks = (down ? 0x80 : 0);
-    /*if (new_diks != DInputKeyState[dik_code]) return CallNextHookEx(keyboard_hook, code, wparam, lparam); TO BE FIXED */
+    if (new_diks == DInputKeyState[dik_code])
+        return CallNextHookEx(0, code, wparam, lparam);
 
     DInputKeyState[dik_code] = new_diks;
     TRACE(" setting %02X to %02X\n", dik_code, DInputKeyState[dik_code]);


More information about the wine-patches mailing list