[iortcw] 76/95: All: Don't repeat alt+enter key event

Simon McVittie smcv at debian.org
Fri Sep 8 10:42:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to tag 1.51
in repository iortcw.

commit a38e14d80d4b3c2a63100ba380aeb64584433687
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Mon May 29 20:48:31 2017 -0400

    All: Don't repeat alt+enter key event
---
 MP/code/client/cl_keys.c | 5 +++++
 SP/code/client/cl_keys.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/MP/code/client/cl_keys.c b/MP/code/client/cl_keys.c
index 2ba0f5c..3a8a761 100644
--- a/MP/code/client/cl_keys.c
+++ b/MP/code/client/cl_keys.c
@@ -2220,6 +2220,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;
diff --git a/SP/code/client/cl_keys.c b/SP/code/client/cl_keys.c
index f28bbcd..4e58bed 100644
--- a/SP/code/client/cl_keys.c
+++ b/SP/code/client/cl_keys.c
@@ -2220,6 +2220,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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list