The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Asfand Yar Qazi on June 05, 2005, 06:32:52 am



Title: Stop using my joystick!
Post by: Asfand Yar Qazi on June 05, 2005, 06:32:52 am
How do I stop Ur-Quan masters using my joystick?  Apart from hacking the sources with the following patch?

Code:

*** src/sc2code/libs/input/sdl/input.c.old
Sun Jun  5 01:29:38 2005
--- src/sc2code/libs/input/sdl/input.c
Sun Jun  5 01:33:08 2005
***************
*** 165,186 ****
 
SDL_EnableUNICODE(1);
 
!
if ((SDL_InitSubSystem(SDL_INIT_JOYSTICK)) == -1)
!
{
!

fprintf (stderr, "Couldn't initialize joystick subsystem: %s\n", SDL_GetError());
!

exit(-1);
!
}
!
!
fprintf (stderr, "%i joysticks were found.\n", SDL_NumJoysticks ());
!
!
nJoysticks = SDL_NumJoysticks ();
!
if (nJoysticks > 0)
!
{
!

fprintf (stderr, "The names of the joysticks are:\n");
!

for(i = 0; i < nJoysticks; i++)
!

{
!


fprintf (stderr, "    %s\n", SDL_JoystickName (i));
!

}
!

SDL_JoystickEventState (SDL_ENABLE);
!
}
 
 
_in_character_mode = FALSE;
--- 165,169 ----
 
SDL_EnableUNICODE(1);
 
!
nJoysticks = 0;
 
 
_in_character_mode = FALSE;



You see, I like to play on zSnes while I'm flying from star system to another.


Title: Re: Stop using my joystick!
Post by: Defender on June 05, 2005, 10:06:34 am
in your keys.cfg:

place # symbols at the beginning of your gamepad code, like this:


#joystick 0 threshold 1   # How far to move before it counts; 0-30000
#Menu-Left: joystick 0 axis 0 negative
#Player-1-Left: joystick 0 axis 0 negative
#Lander-Left: joystick 0 axis 0 negative
#Menu-Right: joystick 0 axis 0 positive
#Player-1-Right: joystick 0 axis 0 positive
#Lander-Right: joystick 0 axis 0 positive
#Menu-Up: joystick 0 axis 1 negative
#Player-1-Thrust: joystick 0 axis 1 negative
#Lander-Thrust: joystick 0 axis 1 negative
#Menu-Down: joystick 0 axis 1 positive
#Menu-Cancel: joystick 0 button 1
#Player-1-Special: joystick 0 button 1
#Menu-Select: joystick 0 button 2
#Player-1-Weapon: joystick 0 button 2
#Lander-Weapon: joystick 0 button 2
#Menu-Page-Up: joystick 0 button 4
#Menu-Page-Down: joystick 0 button 5
#Menu-Zoom-In: joystick 0 button 7
#Player-1-Escape: joystick 0 button 0
#Lander-Escape: joystick 0 button 1
#Menu-Zoom-Out: joystick 0 button 6

that should disable your joystick.


Title: Re: Stop using my joystick!
Post by: Razorback on November 05, 2006, 01:28:54 am
*bump*