From 16b405ccfe0ead7b00b8f6e24df17019f52c5cd9 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 4 Feb 2009 20:30:02 +0000 Subject: [PATCH] Fixes some little bugs with Attendre_fin_de_click. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@597 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- boutons.c | 1 + divers.c | 1 - global.h | 2 -- input.c | 4 ---- readline.c | 1 - 5 files changed, 1 insertion(+), 8 deletions(-) diff --git a/boutons.c b/boutons.c index 975cdbf9..f1c13f6b 100644 --- a/boutons.c +++ b/boutons.c @@ -936,6 +936,7 @@ void Bouton_Settings(void) Config_choisie.Indice_Sensibilite_souris_Y=Fenetre_Attribut2+1; break; case 21 : // Nb pages Undo + Attendre_fin_de_click(); Effacer_curseur(); Num2str(Config_choisie.Nb_pages_Undo,Chaine,2); Readline(142,52,Chaine,2,1); diff --git a/divers.c b/divers.c index 8d660124..05b828c6 100644 --- a/divers.c +++ b/divers.c @@ -97,7 +97,6 @@ void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu) void Attendre_fin_de_click(void) { // On désactive tous les raccourcis clavier - Desactiver_clavier=1; while(Mouse_K) if(!Get_input()) Wait_VBL(); } diff --git a/global.h b/global.h index 157d90b4..81a6c372 100644 --- a/global.h +++ b/global.h @@ -137,8 +137,6 @@ GFX2_GLOBAL Uint8* Etat_Du_Clavier; // Scancode de la touche en cours et etat d #define MOD_CTRL 0x2000 #define MOD_ALT 0x4000 -GFX2_GLOBAL byte Desactiver_clavier; - GFX2_GLOBAL byte Quit_demande; // !=0 lorsque l'utilisateur demande la fermeture de fenêtre. GFX2_GLOBAL byte Mouse_Facteur_de_correction_X; diff --git a/input.c b/input.c index ac0b92ae..35cdcb51 100644 --- a/input.c +++ b/input.c @@ -199,7 +199,6 @@ int Handle_Mouse_Release(SDL_MouseButtonEvent event) INPUT_Nouveau_Mouse_K &= ~2; break; } - if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0; return Move_cursor_with_constraints(); } @@ -271,7 +270,6 @@ int Handle_Key_Press(SDL_KeyboardEvent event) else Touche = 0; } - if (Desactiver_clavier) Touche=0; // Utilisé uniquement dans Attendre fin de clic return 0; } @@ -297,13 +295,11 @@ int Relache_controle(int CodeTouche, int Modifieur) if(CodeTouche == (Config_Touche[SPECIAL_CLICK_LEFT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_LEFT]&Modifieur)) { INPUT_Nouveau_Mouse_K &= ~1; - if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0; return Move_cursor_with_constraints(); } if(CodeTouche == (Config_Touche[SPECIAL_CLICK_RIGHT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_RIGHT]&Modifieur)) { INPUT_Nouveau_Mouse_K &= ~2; - if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0; return Move_cursor_with_constraints(); } diff --git a/readline.c b/readline.c index edb39624..1f1ad26a 100644 --- a/readline.c +++ b/readline.c @@ -144,7 +144,6 @@ byte Readline_ex(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte T byte Offset=0; // Indice du premier caractère affiché - // Effacement de la chaîne Block(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y), Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3),COULEUR_FOND);