From 159d623f446cb5748c07c43a3ea46128e7bd251f Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 4 Jan 2009 16:18:29 +0000 Subject: [PATCH] Sliders no longer lag the mouse cursor, and the delay stops when you release one mouse button or click the other. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@455 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- divers.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/divers.c b/divers.c index 089a5759..ab057ec1 100644 --- a/divers.c +++ b/divers.c @@ -841,11 +841,13 @@ void Rotate_180_deg_LOWLEVEL(void) void Tempo_jauge(byte Vitesse) //Boucle d'attente pour faire bouger les scrollbars à une vitesse correcte { - while (Vitesse!=0) - { - Wait_VBL(); - Vitesse--; - } + Uint32 Fin; + byte MouseK_Original = Mouse_K; + Fin = SDL_GetTicks() + Vitesse*10; + do + { + if (!Get_input()) Wait_VBL(); + } while (Mouse_K == MouseK_Original && SDL_GetTicks()