File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
GeneralsMD/Code/GameEngine/Source/GameClient/Input
Generals/Code/GameEngine/Source/GameClient/Input Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ Bool Keyboard::checkKeyRepeat( void )
225225
226226 // Scan Keyboard status array for first key down
227227 // long enough to repeat
228+ const UnsignedInt KEY_REPEAT_INTERVAL_MSEC = 67 ; // ~2 frames at 30 FPS
228229 UnsignedInt now = timeGetTime ();
229230 for ( key = 0 ; key < ARRAY_SIZE (m_keyStatus); key++ )
230231 {
@@ -246,8 +247,7 @@ Bool Keyboard::checkKeyRepeat( void )
246247 for ( index = 0 ; index< NUM_KEYS; index++ )
247248 m_keyStatus[ index ].sequence = m_inputFrame;
248249
249- // Set repeated key so it will repeat again after a short interval
250- const UnsignedInt KEY_REPEAT_INTERVAL_MSEC = 67 ; // ~2 frames at 30 FPS
250+ // Set repeated key so it will repeat again after the interval
251251 m_keyStatus[ key ].keyDownTimeMsec = now - (Keyboard::KEY_REPEAT_DELAY_MSEC - KEY_REPEAT_INTERVAL_MSEC);
252252
253253 retVal = TRUE ;
Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ Bool Keyboard::checkKeyRepeat( void )
225225
226226 // Scan Keyboard status array for first key down
227227 // long enough to repeat
228+ const UnsignedInt KEY_REPEAT_INTERVAL_MSEC = 67 ; // ~2 frames at 30 FPS
228229 UnsignedInt now = timeGetTime ();
229230 for ( key = 0 ; key < ARRAY_SIZE (m_keyStatus); key++ )
230231 {
@@ -246,8 +247,7 @@ Bool Keyboard::checkKeyRepeat( void )
246247 for ( index = 0 ; index< NUM_KEYS; index++ )
247248 m_keyStatus[ index ].sequence = m_inputFrame;
248249
249- // Set repeated key so it will repeat again after a short interval
250- const UnsignedInt KEY_REPEAT_INTERVAL_MSEC = 67 ; // ~2 frames at 30 FPS
250+ // Set repeated key so it will repeat again after the interval
251251 m_keyStatus[ key ].keyDownTimeMsec = now - (Keyboard::KEY_REPEAT_DELAY_MSEC - KEY_REPEAT_INTERVAL_MSEC);
252252
253253 retVal = TRUE ;
You can’t perform that action at this time.
0 commit comments