Don't repeat alt+enter key event

Holding alt+enter should not continuously toggle fullscreen mode.
This commit is contained in:
Zack Middleton 2017-05-29 16:34:55 -05:00
parent 024a8842bd
commit 8a50e2aa09

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;