From 8dd01136974c441f7751c89248f421e258cf1545 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 3 Nov 2008 17:03:30 +0000 Subject: [PATCH] Fixed the key release handling. Avoid to mess with global variables... or the shortcut keys will trigger the actions twice (both when pressed and released) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@323 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- divers.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/divers.c b/divers.c index 1ffc094d..d317bae2 100644 --- a/divers.c +++ b/divers.c @@ -183,15 +183,14 @@ void Get_input(void) INPUT_Nouveau_Mouse_K=0; break; case SDL_KEYUP: - Touche = Conversion_Touche(event.key.keysym); - Touche_ANSI = Conversion_ANSI(event.key.keysym); + int ToucheR = Conversion_Touche(event.key.keysym); - if(Touche == Config_Touche[4]) + if(ToucheR == Config_Touche[4]) { INPUT_Nouveau_Mouse_K=0; ok=1; } - else if(Touche == Config_Touche[5]) + else if(ToucheR == Config_Touche[5]) { //[Touche] = Emulation de MOUSE CLICK RIGHT INPUT_Nouveau_Mouse_K=0;