Don't repeat alt+enter key event

Holding alt+enter should not continuously toggle fullscreen mode.
This commit is contained in:
Zack Middleton committed 2017-05-29 16:41:03 -05:00
1 parent 024a8842bd
commit 8a50e2aa09
1 file changed
+5
+5
View File
@@ -1239,6 +1239,11 @@ void CL_KeyDownEvent( int key, unsigned time )
if( keys[K_ALT].down && key == K_ENTER )
{
// don't repeat fullscreen toggle when keys are held down
if ( keys[K_ENTER].repeats > 1 ) {
return;
}
Cvar_SetValue( "r_fullscreen",
!Cvar_VariableIntegerValue( "r_fullscreen" ) );
return;