Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Help with joystick button recognition

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
sotrain515
Guest






PostPosted: Sat May 15, 2010 8:19 am    Post subject: Help with joystick button recognition Reply with quote

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)

PostPosted: Sat May 15, 2010 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat May 15, 2010 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sotrain515
Guest






PostPosted: Sun May 16, 2010 8:12 am    Post subject: Reply with quote

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

PostPosted: Mon May 17, 2010 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon May 24, 2010 6:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group