# HG changeset patch # User Sam Lantinga # Date 1033835249 0 # Node ID 7853b6af595784df65338a358a5f6329a64dafdf # Parent f097dba83975e0b2b81f00799d58355421c535cf Atari joystick fixes contributed by Patrice Mandin diff -r f097dba83975 -r 7853b6af5957 src/joystick/mint/SDL_sysjoystick.c --- a/src/joystick/mint/SDL_sysjoystick.c Sat Oct 05 05:46:32 2002 +0000 +++ b/src/joystick/mint/SDL_sysjoystick.c Sat Oct 05 16:27:29 2002 +0000 @@ -351,9 +351,9 @@ if ((curstate & (IKBD_JOY_LEFT|IKBD_JOY_RIGHT)) != (prevstate & (IKBD_JOY_LEFT|IKBD_JOY_RIGHT))) { curaxis=0; if (curstate & IKBD_JOY_LEFT) { - curaxis=-128; + curaxis=0x8000; } else if (curstate & IKBD_JOY_RIGHT) { - curaxis=127; + curaxis=0x7fff; } SDL_PrivateJoystickAxis(joystick,0,curaxis); } @@ -361,9 +361,9 @@ if ((curstate & (IKBD_JOY_UP|IKBD_JOY_DOWN)) != (prevstate & (IKBD_JOY_UP|IKBD_JOY_DOWN))) { curaxis=0; if (curstate & IKBD_JOY_UP) { - curaxis=-128; + curaxis=0x8000; } else if (curstate & IKBD_JOY_DOWN) { - curaxis=127; + curaxis=0x7fff; } SDL_PrivateJoystickAxis(joystick,1,curaxis); } @@ -393,9 +393,9 @@ if ((curstate & ((1<>8)-128); + SDL_PrivateJoystickAxis(joystick,0,jp_lightpens[0] ^ 0x8000); /* Y axis */ - SDL_PrivateJoystickAxis(joystick,1,(jp_lightpens[1]>>8)-128); + SDL_PrivateJoystickAxis(joystick,1,jp_lightpens[1] ^ 0x8000); /* Buttons */ for (i=0;i<2;i++) { int button; @@ -517,9 +517,9 @@ if (curstate != prevstate) { /* X axis */ - SDL_PrivateJoystickAxis(joystick,0,(jp_paddles[numpaddle]>>8)-128); + SDL_PrivateJoystickAxis(joystick,0,jp_paddles[numpaddle] ^ 0x8000); /* Y axis */ - SDL_PrivateJoystickAxis(joystick,1,(jp_paddles[numpaddle+1]>>8)-128); + SDL_PrivateJoystickAxis(joystick,1,jp_paddles[numpaddle+1] ^ 0x8000); /* Buttons */ for (i=0;i<2;i++) { int button;