Implemented basic joystick control : dir+AB on most platforms, pad+AB on GP2X
Implemented accelerating cursor with joystick / kb cursor Fixed up the contextual help, somehow git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@583 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
db02be0e41
commit
1150dcea21
13
clavier.c
13
clavier.c
@ -310,6 +310,8 @@ word Touche_pour_scancode(word scancode)
|
|||||||
word Conversion_Touche(SDL_keysym Sym)
|
word Conversion_Touche(SDL_keysym Sym)
|
||||||
{
|
{
|
||||||
word Retour = 0;
|
word Retour = 0;
|
||||||
|
word Mod;
|
||||||
|
|
||||||
// On ignore shift, alt et control isolés.
|
// On ignore shift, alt et control isolés.
|
||||||
if (Sym.sym == SDLK_RSHIFT || Sym.sym == SDLK_LSHIFT ||
|
if (Sym.sym == SDLK_RSHIFT || Sym.sym == SDLK_LSHIFT ||
|
||||||
Sym.sym == SDLK_RCTRL || Sym.sym == SDLK_LCTRL ||
|
Sym.sym == SDLK_RCTRL || Sym.sym == SDLK_LCTRL ||
|
||||||
@ -326,11 +328,16 @@ word Conversion_Touche(SDL_keysym Sym)
|
|||||||
Retour = (Sym.scancode & 0x07FF) | 0x0800;
|
Retour = (Sym.scancode & 0x07FF) | 0x0800;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Sym.mod & (KMOD_LSHIFT | KMOD_RSHIFT))
|
// Normally I should test Sym.mod here, but on windows the implementation
|
||||||
|
// is buggy: if you release a modifier key, the following keys (when they repeat)
|
||||||
|
// still name the original modifiers.
|
||||||
|
Mod=SDL_GetModState();
|
||||||
|
// SDL_GetModState() seems to get the right up-to-date info.
|
||||||
|
if (Mod & (KMOD_LSHIFT | KMOD_RSHIFT))
|
||||||
Retour |= MOD_SHIFT;
|
Retour |= MOD_SHIFT;
|
||||||
if (Sym.mod & (KMOD_LCTRL | KMOD_RCTRL))
|
if (Mod & (KMOD_LCTRL | KMOD_RCTRL))
|
||||||
Retour |= MOD_CTRL;
|
Retour |= MOD_CTRL;
|
||||||
if (Sym.mod & (KMOD_LALT | KMOD_RALT | KMOD_MODE))
|
if (Mod & (KMOD_LALT | KMOD_RALT | KMOD_MODE))
|
||||||
Retour |= MOD_ALT;
|
Retour |= MOD_ALT;
|
||||||
return Retour;
|
return Retour;
|
||||||
}
|
}
|
||||||
|
|||||||
330
input.c
330
input.c
@ -31,6 +31,17 @@
|
|||||||
void Handle_Window_Resize(SDL_Event* event);
|
void Handle_Window_Resize(SDL_Event* event);
|
||||||
void Handle_Window_Exit(SDL_Event* event);
|
void Handle_Window_Exit(SDL_Event* event);
|
||||||
|
|
||||||
|
byte Directional_up;
|
||||||
|
byte Directional_up_right;
|
||||||
|
byte Directional_right;
|
||||||
|
byte Directional_down_right;
|
||||||
|
byte Directional_down;
|
||||||
|
byte Directional_down_left;
|
||||||
|
byte Directional_left;
|
||||||
|
byte Directional_up_left;
|
||||||
|
long Directional_delay;
|
||||||
|
long Directional_last_move;
|
||||||
|
long Directional_step;
|
||||||
|
|
||||||
// Called each time there is a cursor move, either triggered by mouse or keyboard shortcuts
|
// Called each time there is a cursor move, either triggered by mouse or keyboard shortcuts
|
||||||
int Move_cursor_with_constraints()
|
int Move_cursor_with_constraints()
|
||||||
@ -187,60 +198,23 @@ int Handle_Key_Press(SDL_Event* event)
|
|||||||
|
|
||||||
if(Touche == Config_Touche[SPECIAL_MOUSE_UP])
|
if(Touche == Config_Touche[SPECIAL_MOUSE_UP])
|
||||||
{
|
{
|
||||||
//si on est déjà en haut on peut plus bouger
|
Directional_up=1;
|
||||||
if(INPUT_Nouveau_Mouse_Y!=0)
|
return 0;
|
||||||
{
|
|
||||||
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
|
||||||
INPUT_Nouveau_Mouse_Y=INPUT_Nouveau_Mouse_Y<Loupe_Facteur?0:INPUT_Nouveau_Mouse_Y-Loupe_Facteur;
|
|
||||||
else
|
|
||||||
INPUT_Nouveau_Mouse_Y--;
|
|
||||||
if(Move_cursor_with_constraints()) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(Touche == Config_Touche[SPECIAL_MOUSE_DOWN])
|
else if(Touche == Config_Touche[SPECIAL_MOUSE_DOWN])
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
Directional_down=1;
|
||||||
{
|
return 0;
|
||||||
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
|
||||||
{
|
|
||||||
INPUT_Nouveau_Mouse_Y+=Loupe_Facteur;
|
|
||||||
if (INPUT_Nouveau_Mouse_Y>=Hauteur_ecran)
|
|
||||||
INPUT_Nouveau_Mouse_Y=Hauteur_ecran-1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
INPUT_Nouveau_Mouse_Y++;
|
|
||||||
if(Move_cursor_with_constraints()) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(Touche == Config_Touche[SPECIAL_MOUSE_LEFT])
|
else if(Touche == Config_Touche[SPECIAL_MOUSE_LEFT])
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X!=0)
|
Directional_left=1;
|
||||||
{
|
return 0;
|
||||||
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
|
||||||
INPUT_Nouveau_Mouse_X-=Loupe_Facteur;
|
|
||||||
else
|
|
||||||
INPUT_Nouveau_Mouse_X--;
|
|
||||||
if(Move_cursor_with_constraints()) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(Touche == Config_Touche[SPECIAL_MOUSE_RIGHT])
|
else if(Touche == Config_Touche[SPECIAL_MOUSE_RIGHT])
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
Directional_right=1;
|
||||||
{
|
return 0;
|
||||||
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
|
||||||
{
|
|
||||||
INPUT_Nouveau_Mouse_X+=Loupe_Facteur;
|
|
||||||
if (INPUT_Nouveau_Mouse_X>=Largeur_ecran)
|
|
||||||
INPUT_Nouveau_Mouse_X=Largeur_ecran-1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
INPUT_Nouveau_Mouse_X++;
|
|
||||||
if(Move_cursor_with_constraints()) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(Touche == Config_Touche[SPECIAL_CLICK_LEFT])
|
else if(Touche == Config_Touche[SPECIAL_CLICK_LEFT])
|
||||||
{
|
{
|
||||||
@ -288,14 +262,50 @@ int Handle_Key_Press(SDL_Event* event)
|
|||||||
|
|
||||||
void Handle_Key_Release(SDL_Event* event)
|
void Handle_Key_Release(SDL_Event* event)
|
||||||
{
|
{
|
||||||
int ToucheR = Conversion_Touche(event->key.keysym);
|
int Modifieur;
|
||||||
|
int ToucheR = Conversion_Touche(event->key.keysym) & 0x0FFF;
|
||||||
|
|
||||||
if(ToucheR == Config_Touche[SPECIAL_CLICK_LEFT])
|
switch(event->key.keysym.sym)
|
||||||
|
{
|
||||||
|
case SDLK_RSHIFT:
|
||||||
|
case SDLK_LSHIFT:
|
||||||
|
Modifieur=MOD_SHIFT;
|
||||||
|
break;
|
||||||
|
case SDLK_RCTRL:
|
||||||
|
case SDLK_LCTRL:
|
||||||
|
Modifieur=MOD_CTRL;
|
||||||
|
break;
|
||||||
|
case SDLK_RALT:
|
||||||
|
case SDLK_LALT:
|
||||||
|
case SDLK_MODE:
|
||||||
|
Modifieur=MOD_ALT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Modifieur=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ToucheR == (Config_Touche[SPECIAL_MOUSE_UP]&0x0FFF) || (Config_Touche[SPECIAL_MOUSE_UP]&Modifieur))
|
||||||
|
{
|
||||||
|
Directional_up=0;
|
||||||
|
}
|
||||||
|
if(ToucheR == (Config_Touche[SPECIAL_MOUSE_DOWN]&0x0FFF) || (Config_Touche[SPECIAL_MOUSE_DOWN]&Modifieur))
|
||||||
|
{
|
||||||
|
Directional_down=0;
|
||||||
|
}
|
||||||
|
if(ToucheR == (Config_Touche[SPECIAL_MOUSE_LEFT]&0x0FFF) || (Config_Touche[SPECIAL_MOUSE_LEFT]&Modifieur))
|
||||||
|
{
|
||||||
|
Directional_left=0;
|
||||||
|
}
|
||||||
|
if(ToucheR == (Config_Touche[SPECIAL_MOUSE_RIGHT]&0x0FFF) || (Config_Touche[SPECIAL_MOUSE_RIGHT]&Modifieur))
|
||||||
|
{
|
||||||
|
Directional_right=0;
|
||||||
|
}
|
||||||
|
if(ToucheR == (Config_Touche[SPECIAL_CLICK_LEFT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_LEFT]&Modifieur))
|
||||||
{
|
{
|
||||||
INPUT_Nouveau_Mouse_K &= ~1;
|
INPUT_Nouveau_Mouse_K &= ~1;
|
||||||
Move_cursor_with_constraints();
|
Move_cursor_with_constraints();
|
||||||
}
|
}
|
||||||
else if(ToucheR == Config_Touche[SPECIAL_CLICK_RIGHT])
|
if(ToucheR == (Config_Touche[SPECIAL_CLICK_RIGHT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_RIGHT]&Modifieur))
|
||||||
{
|
{
|
||||||
INPUT_Nouveau_Mouse_K &= ~2;
|
INPUT_Nouveau_Mouse_K &= ~2;
|
||||||
Move_cursor_with_constraints();
|
Move_cursor_with_constraints();
|
||||||
@ -311,12 +321,133 @@ void Handle_Key_Release(SDL_Event* event)
|
|||||||
|
|
||||||
void Handle_Joystick_Press(SDL_Event* event)
|
void Handle_Joystick_Press(SDL_Event* event)
|
||||||
{
|
{
|
||||||
|
if (event->jbutton.which==0) // joystick number 0
|
||||||
|
{
|
||||||
|
#ifdef __gp2x__
|
||||||
|
switch(event->jbutton.button)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Directional_up=1;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
Directional_up_right=1;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
Directional_right=1;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Directional_down_right=1;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Directional_down=1;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Directional_down_left=1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Directional_left=1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Directional_up_left=1;
|
||||||
|
break;
|
||||||
|
case 12: // A
|
||||||
|
INPUT_Nouveau_Mouse_K=1;
|
||||||
|
break;
|
||||||
|
case 13: // B
|
||||||
|
INPUT_Nouveau_Mouse_K=2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
switch(event->jbutton.button)
|
||||||
|
{
|
||||||
|
case 0: // A
|
||||||
|
INPUT_Nouveau_Mouse_K=1;
|
||||||
|
break;
|
||||||
|
case 1: // B
|
||||||
|
INPUT_Nouveau_Mouse_K=2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Handle_Joystick_Release(SDL_Event* event)
|
void Handle_Joystick_Release(SDL_Event* event)
|
||||||
{
|
{
|
||||||
|
if (event->jbutton.which==0) // joystick number 0
|
||||||
|
{
|
||||||
|
#ifdef __gp2x__
|
||||||
|
switch(event->jbutton.button)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Directional_up=0;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
Directional_up_right=0;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
Directional_right=0;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Directional_down_right=0;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Directional_down=0;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Directional_down_left=0;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Directional_left=0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Directional_up_left=0;
|
||||||
|
break;
|
||||||
|
case 12: // A
|
||||||
|
INPUT_Nouveau_Mouse_K &= ~1;
|
||||||
|
break;
|
||||||
|
case 13: // B
|
||||||
|
INPUT_Nouveau_Mouse_K &= ~2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
switch(event->jbutton.button)
|
||||||
|
{
|
||||||
|
case 0: // A
|
||||||
|
INPUT_Nouveau_Mouse_K &= ~1;
|
||||||
|
break;
|
||||||
|
case 1: // B
|
||||||
|
INPUT_Nouveau_Mouse_K &= ~2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Handle_Joystick_Movement(SDL_Event* event)
|
||||||
|
{
|
||||||
|
if (event->jaxis.which==0) // joystick number 0
|
||||||
|
{
|
||||||
|
if (event->jaxis.axis==0) // X
|
||||||
|
{
|
||||||
|
Directional_right=Directional_left=0;
|
||||||
|
if (event->jaxis.value<-1000)
|
||||||
|
{
|
||||||
|
Directional_left=1;
|
||||||
|
}
|
||||||
|
else if (event->jaxis.value>1000)
|
||||||
|
Directional_right=1;
|
||||||
|
}
|
||||||
|
else if (event->jaxis.axis==1) // Y
|
||||||
|
{
|
||||||
|
Directional_up=Directional_down=0;
|
||||||
|
if (event->jaxis.value<-1000)
|
||||||
|
{
|
||||||
|
Directional_up=1;
|
||||||
|
}
|
||||||
|
else if (event->jaxis.value>1000)
|
||||||
|
Directional_down=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main input handling function
|
// Main input handling function
|
||||||
@ -327,6 +458,7 @@ int Get_input(void)
|
|||||||
int User_Feedback_Required = 0; // Flag qui indique si on doit arrêter de traiter les évènements ou si on peut enchainer
|
int User_Feedback_Required = 0; // Flag qui indique si on doit arrêter de traiter les évènements ou si on peut enchainer
|
||||||
|
|
||||||
Touche_ANSI = 0;
|
Touche_ANSI = 0;
|
||||||
|
Touche = 0;
|
||||||
|
|
||||||
// Process as much events as possible without redrawing the screen.
|
// Process as much events as possible without redrawing the screen.
|
||||||
// This mostly allows us to merge mouse events for people with an high
|
// This mostly allows us to merge mouse events for people with an high
|
||||||
@ -369,20 +501,116 @@ int Get_input(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_JOYBUTTONUP:
|
case SDL_JOYBUTTONUP:
|
||||||
Handle_Joystick_Press(&event);
|
Handle_Joystick_Release(&event);
|
||||||
|
User_Feedback_Required = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_JOYBUTTONDOWN:
|
case SDL_JOYBUTTONDOWN:
|
||||||
Handle_Joystick_Release(&event);
|
Handle_Joystick_Press(&event);
|
||||||
User_Feedback_Required = 1;
|
User_Feedback_Required = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SDL_JOYAXISMOTION:
|
||||||
|
Handle_Joystick_Movement(&event);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DEBUG("Unhandled SDL event number : ",event.type);
|
DEBUG("Unhandled SDL event number : ",event.type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Directional controller
|
||||||
|
if (!(Directional_up||Directional_up_right||Directional_right||
|
||||||
|
Directional_down_right||Directional_down||Directional_down_left||
|
||||||
|
Directional_left||Directional_up_left))
|
||||||
|
{
|
||||||
|
Directional_delay=-1;
|
||||||
|
Directional_last_move=SDL_GetTicks();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
long Now;
|
||||||
|
|
||||||
|
Now=SDL_GetTicks();
|
||||||
|
|
||||||
|
if (Now>Directional_last_move+Directional_delay)
|
||||||
|
{
|
||||||
|
if (Directional_delay==-1)
|
||||||
|
{
|
||||||
|
Directional_delay=150;
|
||||||
|
Directional_step=16;
|
||||||
|
}
|
||||||
|
else if (Directional_delay==150)
|
||||||
|
Directional_delay=40;
|
||||||
|
else if (Directional_delay!=0)
|
||||||
|
Directional_delay=Directional_delay*8/10;
|
||||||
|
else if (Directional_step<16*4)
|
||||||
|
Directional_step++;
|
||||||
|
Directional_last_move = Now;
|
||||||
|
|
||||||
|
// Directional controller UP
|
||||||
|
if ((Directional_up||Directional_up_left||Directional_up_right) &&
|
||||||
|
!(Directional_down_right||Directional_down||Directional_down_left))
|
||||||
|
{
|
||||||
|
//si on est déjà en haut on peut plus bouger
|
||||||
|
if(INPUT_Nouveau_Mouse_Y!=0)
|
||||||
|
{
|
||||||
|
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
||||||
|
INPUT_Nouveau_Mouse_Y=INPUT_Nouveau_Mouse_Y<Loupe_Facteur?0:INPUT_Nouveau_Mouse_Y-Loupe_Facteur;
|
||||||
|
else
|
||||||
|
INPUT_Nouveau_Mouse_Y-=Directional_step/16;
|
||||||
|
Move_cursor_with_constraints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Directional controller RIGHT
|
||||||
|
if ((Directional_up_right||Directional_right||Directional_down_right) &&
|
||||||
|
!(Directional_down_left||Directional_left||Directional_up_left))
|
||||||
|
{
|
||||||
|
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
||||||
|
{
|
||||||
|
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
||||||
|
{
|
||||||
|
INPUT_Nouveau_Mouse_X+=Loupe_Facteur;
|
||||||
|
if (INPUT_Nouveau_Mouse_X>=Largeur_ecran)
|
||||||
|
INPUT_Nouveau_Mouse_X=Largeur_ecran-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
INPUT_Nouveau_Mouse_X+=Directional_step/16;
|
||||||
|
Move_cursor_with_constraints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Directional controller DOWN
|
||||||
|
if ((Directional_down_right||Directional_down||Directional_down_left) &&
|
||||||
|
!(Directional_up_left||Directional_up||Directional_up_right))
|
||||||
|
{
|
||||||
|
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
||||||
|
{
|
||||||
|
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
||||||
|
{
|
||||||
|
INPUT_Nouveau_Mouse_Y+=Loupe_Facteur;
|
||||||
|
if (INPUT_Nouveau_Mouse_Y>=Hauteur_ecran)
|
||||||
|
INPUT_Nouveau_Mouse_Y=Hauteur_ecran-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
INPUT_Nouveau_Mouse_Y+=Directional_step/16;
|
||||||
|
Move_cursor_with_constraints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Directional controller LEFT
|
||||||
|
if ((Directional_down_left||Directional_left||Directional_up_left) &&
|
||||||
|
!(Directional_up_right||Directional_right||Directional_down_right))
|
||||||
|
{
|
||||||
|
if(INPUT_Nouveau_Mouse_X!=0)
|
||||||
|
{
|
||||||
|
if(Loupe_Mode && INPUT_Nouveau_Mouse_Y < Menu_Ordonnee && INPUT_Nouveau_Mouse_X > Principal_Split)
|
||||||
|
INPUT_Nouveau_Mouse_X-=Loupe_Facteur;
|
||||||
|
else
|
||||||
|
INPUT_Nouveau_Mouse_X-=Directional_step/16;
|
||||||
|
Move_cursor_with_constraints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Vidage de toute mise à jour de l'affichage à l'écran qui serait encore en attente.
|
// Vidage de toute mise à jour de l'affichage à l'écran qui serait encore en attente.
|
||||||
// (c'est fait ici car on est sur que cette fonction est apellée partout ou on a besoin d'interragir avec l'utilisateur)
|
// (c'est fait ici car on est sur que cette fonction est apellée partout ou on a besoin d'interragir avec l'utilisateur)
|
||||||
Flush_update();
|
Flush_update();
|
||||||
|
|||||||
2
moteur.c
2
moteur.c
@ -899,10 +899,8 @@ void Gestion_principale(void)
|
|||||||
// on lance le bouton.
|
// on lance le bouton.
|
||||||
if (Bouton_Touche!=-1)
|
if (Bouton_Touche!=-1)
|
||||||
{
|
{
|
||||||
Touche=0;
|
|
||||||
Enclencher_bouton(Bouton_Touche,Bouton_Cote);
|
Enclencher_bouton(Bouton_Touche,Bouton_Cote);
|
||||||
Indice_bouton_precedent=-1;
|
Indice_bouton_precedent=-1;
|
||||||
Touche=0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user