From aaeb1b4e7b4444dbddb0e972f01b9bb7e7db8c4d Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Mon, 15 Mar 2004 11:31:19 +0000 Subject: [PATCH] Repeat-key handling for Win32 Utilise both FreeGLUT state and per-window filtering modes git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@483 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 1763461..a356c1b 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -1593,7 +1593,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, int keypress = -1; POINT mouse_pos ; - if( fgState.IgnoreKeyRepeat && (HIWORD(lParam) & KF_REPEAT) ) + if( ( fgState.KeyRepeat==GLUT_KEY_REPEAT_OFF || window->State.IgnoreKeyRepeat==GL_TRUE ) && (HIWORD(lParam) & KF_REPEAT) ) break; /* @@ -1742,7 +1742,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, case WM_SYSCHAR: case WM_CHAR: { - if( fgState.IgnoreKeyRepeat && (HIWORD(lParam) & KF_REPEAT) ) + if( (fgState.KeyRepeat==GLUT_KEY_REPEAT_OFF || window->State.IgnoreKeyRepeat==GL_TRUE) && (HIWORD(lParam) & KF_REPEAT) ) break; fgState.Modifiers = fgGetWin32Modifiers( ); -- 1.7.10.4