From f3c63fe78576a63f44bb38736d5c1c7419817bc2 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 6 Jan 2009 13:41:57 +0000 Subject: [PATCH] Smoother joystick to cursor move conversion. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@467 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- divers.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/divers.c b/divers.c index 9becfa15..9e7c196e 100644 --- a/divers.c +++ b/divers.c @@ -322,6 +322,7 @@ int Get_input(void) } else { + // No SDL event, now we have to look at the joystick ones if(SDL_JoystickGetButton(joystick,0)) { if(INPUT_Nouveau_Mouse_Y!=0) @@ -333,7 +334,7 @@ int Get_input(void) ok=1; } } - else + if(SDL_JoystickGetButton(joystick,1)) { if(INPUT_Nouveau_Mouse_Y!=0) @@ -354,7 +355,7 @@ int Get_input(void) ok=1; } } - else + if(SDL_JoystickGetButton(joystick,2)) { if(INPUT_Nouveau_Mouse_X!=0) @@ -366,7 +367,7 @@ int Get_input(void) ok=1; } } - else + if(SDL_JoystickGetButton(joystick,3)) { if(INPUT_Nouveau_Mouse_X!=0) @@ -391,7 +392,7 @@ int Get_input(void) ok=1; } } - else + if(SDL_JoystickGetButton(joystick,4)) { if(INPUT_Nouveau_Mouse_Y