Attendre_fin_de_click could return if the event queu was empty while the button was still pressed. Now fixed.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@475 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
ab5f789fdf
commit
53c2936697
4
divers.c
4
divers.c
@ -96,9 +96,11 @@ void Attendre_fin_de_click(void)
|
|||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
|
if(Mouse_K==0) return; // Le bouton était déjà relaché
|
||||||
|
|
||||||
//On attend que l'utilisateur relache la souris. Tous les autres évènements
|
//On attend que l'utilisateur relache la souris. Tous les autres évènements
|
||||||
//sont ignorés
|
//sont ignorés
|
||||||
while(SDL_PollEvent(&event))
|
while(SDL_WaitEvent(&event))
|
||||||
{
|
{
|
||||||
Gere_Evenement_SDL(&event);
|
Gere_Evenement_SDL(&event);
|
||||||
if (event.type == SDL_MOUSEBUTTONUP)
|
if (event.type == SDL_MOUSEBUTTONUP)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user