The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Tog on January 02, 2007, 02:33:30 am



Title: Gamepad with Mac OSX
Post by: Tog on January 02, 2007, 02:33:30 am
Has anyone been able to get UQM working with a gamepad in Mac OSX? The README says to edit a key.cfg file, but I don't seem to have this. The Mac port of UQM is just a big *.APP file.  Does anyone know how to get UQM working with a gamepad in Mac OSX?

Thanks!


Title: Re: Gamepad with Mac OSX
Post by: meep-eep on January 02, 2007, 07:26:28 am
If you've run the game once, you'll have a .uqm directory in your home dir. This is where your keys.cfg file is.
Note that there are two default joystick/gamepad configs which can be used simply from the key config menu.


Title: Re: Gamepad with Mac OSX
Post by: Tog on January 02, 2007, 08:30:09 pm
Thanks.

I tried using the configuration menu in the game itself, but this did not seem to have any affect. When I modify the gamepad config using the in-game config menu, should it create a keys.cfg automatically?


Title: Re: Gamepad with Mac OSX
Post by: meep-eep on January 02, 2007, 08:37:33 pm
The configuration menu itself should work.

UQM creates the keys.cfg file when it is started for the first time and it will overwrite it when you modify the settings from the in-game menu.


Title: Re: Gamepad with Mac OSX
Post by: Tog on January 03, 2007, 01:59:03 am
Hmmm... I don't seem to have a UQM directory anywhere. I even tried searching the entire harddrive, but found no sign of it. I tried reinstalling it  as well.

Are you sure that it actually creates this directory? It seems like the program is entirely contained in an  .app file. The installation is simply copying this file into my Applications folder.


Title: Re: Gamepad with Mac OSX
Post by: Tog on January 03, 2007, 02:09:29 am
AHHH!

I see. It is a hidden directory and I am not root.


Title: Re: Gamepad with Mac OSX
Post by: Tog on January 03, 2007, 02:18:43 am
It doesn't seem like UQM is even responding to the gamepad. If I try to run the setup for joysticks, and it instructs me to hit the button on the gamepad that corresponds with the action, it doesn't even respond when I hit a button. However, the gamepad works with other games. I'm not sure why it doesn't work with UQM.


Title: Re: Gamepad with Mac OSX
Post by: 0xDEC0DE on January 03, 2007, 06:28:14 pm
Entirely possible -- joysticks/gamepads have never been tried on MacOS X up to this point to my knowledge; I might have unwittingly built SDL without joystick support (and would not have known the difference, as I have no joysticks) or something similarly stupid.


Title: Re: Gamepad with Mac OSX
Post by: Psykechan on March 02, 2007, 03:57:52 am
The current stable build (0.6.2) worked on an Intel Mac for me.  I had to edit the configuration files by hand because the Control Options menu did not recognize the joystick.

BTW, if any terminal fearing OSX user would like to hand edit their config files, just tell Finder to Go -> Connect to Server (or press Shift-Command-G) and in the window, type this:

~/.uqm

This is where the config files live.  Open them with TextEdit and enjoy.

I noticed that Template 6 wasn't used (?) so I added this to the keys.cfg file:
Template-6-Weapon: joystick 0 button 3
Template-6-Special: joystick 0 button 0
Template-6-Up: joystick 0 button 10
Template-6-Down: joystick 0 button 11
Template-6-Left: joystick 0 button 12
Template-6-Right: joystick 0 button 13

I changed this in the uqm.cfg file:
config.player1control = 6

This is for an Adaptiod (USB-N64) controller with the A and B buttons used for fire/special.  YMMV


Title: Re: Gamepad with Mac OSX
Post by: Michael Martin on March 03, 2007, 12:51:47 am
I had to edit the configuration files by hand because the Control Options menu did not recognize the joystick.

Hmm.  It didn't recognize the joystick, but could still read the results from it if you configured it by hand?  That's kind of unusual.

Quote
I noticed that Template 6 wasn't used (?) so I added this to the keys.cfg file:
0.6.2 has a problem in which "impossible" controls will be trashed.  Template 6 was "Joystick 2", but without two joysticks, it becomes totally blank.

The current development version fixes this, but it also uses a different configuration file format.