View previous topic :: View next topic |
Author |
Message |
sotrain515 Guest
|
Posted: Sat May 15, 2010 8:19 am Post subject: Help with joystick button recognition |
|
|
Hello all,
I am trying to add joystick support to my game, but it does not seem to be able to recognize input other than two buttons. I am using a Gravis GamePad Pro for testing. I have tried both the "key is pressed" and the "joystick button" commands, and other than the first two buttons (key:button 1 / joystick button(1) and key:button 2 / joystick button(2)) and the axes, it does not read any other button presses.
Is this because it's a really old controller? Any help would be greatly appreciated! |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat May 15, 2010 8:51 am Post subject: |
|
|
Could be an engine bug. The joystick code hasn't gotten much love.
We have had support for 2 buttons since forever, but the code for buttons 3-9 might be buggy, or might have only been tested with certain backends |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 15, 2010 5:10 pm Post subject: |
|
|
Not exactly a bug. Rather, nobody bother to support more than 2 buttons and the first joystick in the gfx_sdl 'backend' (which is the default).
(I think) I've just added support for up to 8 joyticks and 16 buttons per joystick to gfx_sdl, but I don't actually have a joystick to test with. You can test it out by downloading the next 'nightly' build, tomorrow.
Alternatively, you can use a nightly with the old gfx_fb backend immediately, which already supports those things: http://hamsterrepublic.com/ohrrpgce/nightly/ohrrpgce-wip-fb-sdl.zip. gfx_fb is buggier.
The other backends don't support joysticks at all. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
sotrain515 Guest
|
Posted: Sun May 16, 2010 8:12 am Post subject: |
|
|
Thanks so much, James and Mad Cacti! I will download the nightly either tonight or tomorrow (whenever I have some time) and let you know if it works. |
|
Back to top |
|
 |
sotrain515
Joined: 17 May 2010 Posts: 39 Location: Connecticut
|
Posted: Mon May 17, 2010 10:31 am Post subject: |
|
|
The nightly worked great! I can confirm full joystick support with my Gravis GamePad Pro for its D-Pad and all 10 of its buttons. Thanks again! |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon May 24, 2010 6:14 am Post subject: |
|
|
Glad to help.
Hmm, someone else said they had a 12 button joystick. Clearly the 16 button limit needs to be raised. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
|