Author Topic: Hatswitch not recognized (OS X)  (Read 3111 times)

0 Members and 1 Guest are viewing this topic.

Offline Muriac

  • 25
Hatswitch not recognized (OS X)
Everything else works perfectly, but FS_Open refuses to recognize my joystick's hatswitch. I'm using a Saitek Cyborg evo, and every button and all four axes work in FS_Open. The hatswitch, while recognized by a USB controller testing application I downloaded, is not recognized by FS_Open. It's an eight-way switch.

I can't really think of what other information might help, but I'd be happy to post whatever is needed.

 
Re: Hatswitch not recognized (OS X)
Is your Hatswitch recognized by Linux as two axis?
That's how it is for me...
I have an Saitek Cyborg Stick 3D Rumble Force...

I start FS2_Open with:
Code: [Select]
SDL_LINUX_JOYSTICK="'Saitek Cyborg 3D Rumble Force' 4 1 0" ./fs2_open_r
Of course, you would have to customize this line (I found the right synthax somewhere in the internet ;) )

EDIT: Whoops... OS X...
Okay... But SDL is SDL and maybe it's the same problem ;)
Just take a look...

 

Offline Muriac

  • 25
Re: Hatswitch not recognized (OS X)
Sorry, I don't know to talk to SDL in OS X.

 
Re: Hatswitch not recognized (OS X)
I'm using a Saitek evo force on OS X (10.4.6 Tiger) and all buttons work. things that dont work so far: throttle, force feedback.

 

Offline CaptJosh

  • 210
Re: Hatswitch not recognized (OS X)
Well, I currently have an MS Sidewinder Force Feedback Pro, and under Linux, the hatswitch is showing up as another set of axes instead of buttons. It's damned annoying, as I like to use my hat switch for things like targeting bombs, changing the fire rate of my missiles, targeting unscanned cargo, and one other thing that I've forgotten at the moment, and I can't assign any of those functions to an axis.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Hatswitch not recognized (OS X)
Well, I currently have an MS Sidewinder Force Feedback Pro, and under Linux, the hatswitch is showing up as another set of axes instead of buttons. It's damned annoying, as I like to use my hat switch for things like targeting bombs, changing the fire rate of my missiles, targeting unscanned cargo, and one other thing that I've forgotten at the moment, and I can't assign any of those functions to an axis.
That's an SDL issue, you have to tell it there is a HAT on the joystick and then it should use it properly.  All you need is to set a proper environment variable and it should work fine after that.  Look here for the variable and how to use it (the var is "SDL_LINUX_JOYSTICK"): http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fenvvars

 

Offline CaptJosh

  • 210
Re: Hatswitch not recognized (OS X)
That's interesting, but where does the variable go? It doesn't say on the page.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Hatswitch not recognized (OS X)
If you run the game from the command line then you can just do "export SDL_LINUX_JOYSTICK='Joystick Name' numaxes numhats numballs" and then run the game.  To make it permanent just add the same line to ~/.bash_profile and it will automatically set everytime you log in.  After you make that change just log out of X then log back in, the variable will now be active always and you should be ready to go.

 

Offline CaptJosh

  • 210
Re: Hatswitch not recognized (OS X)
Great. I just hope the name for the stick in Yast is the name that this will need. Thanks.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Hatswitch not recognized (OS X)
If you run a debug build just check your ~/.fs2_open/data/fs2_open.log file.  Where it initializes the joystick it will also print out the name that SDL sees it as.  It also prints out the number of axes, buttons, and hats so you can be sure that it is actually seeing things like it's supposed to.

 

Offline CaptJosh

  • 210
Re: Hatswitch not recognized (OS X)
I don't think I've ever had the CVS stuff build a debug build. Hrm... Guess I'll have to try the prebuilt one.

EDIT: Or not. There aren't any, yet.
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.