Smoother joystick to cursor move conversion.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@467 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
839ffaafd9
commit
f3c63fe785
15
divers.c
15
divers.c
@ -322,6 +322,7 @@ int Get_input(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// No SDL event, now we have to look at the joystick ones
|
||||||
if(SDL_JoystickGetButton(joystick,0))
|
if(SDL_JoystickGetButton(joystick,0))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_Y!=0)
|
if(INPUT_Nouveau_Mouse_Y!=0)
|
||||||
@ -333,7 +334,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,1))
|
if(SDL_JoystickGetButton(joystick,1))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_Y!=0)
|
if(INPUT_Nouveau_Mouse_Y!=0)
|
||||||
@ -354,7 +355,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,2))
|
if(SDL_JoystickGetButton(joystick,2))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X!=0)
|
if(INPUT_Nouveau_Mouse_X!=0)
|
||||||
@ -366,7 +367,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,3))
|
if(SDL_JoystickGetButton(joystick,3))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X!=0)
|
if(INPUT_Nouveau_Mouse_X!=0)
|
||||||
@ -391,7 +392,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,4))
|
if(SDL_JoystickGetButton(joystick,4))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
||||||
@ -407,7 +408,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,5))
|
if(SDL_JoystickGetButton(joystick,5))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
if(INPUT_Nouveau_Mouse_Y<Hauteur_ecran-1)
|
||||||
@ -436,7 +437,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,6))
|
if(SDL_JoystickGetButton(joystick,6))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
||||||
@ -452,7 +453,7 @@ int Get_input(void)
|
|||||||
ok=1;
|
ok=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if(SDL_JoystickGetButton(joystick,7))
|
if(SDL_JoystickGetButton(joystick,7))
|
||||||
{
|
{
|
||||||
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
if(INPUT_Nouveau_Mouse_X<Largeur_ecran-1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user