Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: OverDhill on January 05, 2014, 11:29:56 pm

Title: Maximun number of Joystick Axis supported?
Post by: OverDhill on January 05, 2014, 11:29:56 pm
Using PPJoy Joy I can have 8 axises. How many does Freespace 2 Open support?

Title: Re: Maximun number of Joystick Axis supported?
Post by: Bobboau on January 06, 2014, 04:53:29 am
AFAIK it's dynamic.
Title: Re: Maximun number of Joystick Axis supported?
Post by: chief1983 on January 06, 2014, 10:19:11 am
Actually I thought DirectInput is limited to a lot less than 8, but with the SDL2 builds we'll have soon, we should be able to expand that with further enhancement of the input system.  I've just never heard of DirectInput supporting more than one device, and 4 or so axis with FSO
Title: Re: Maximun number of Joystick Axis supported?
Post by: z64555 on January 06, 2014, 02:35:07 pm
FSO is still limited to 5 axes. X, Y, Z, Rx, and Rz. The SDL2 builds in antipodes will hopefully bump up this limit if I can get my lazy ass moving in 3 directions  :nervous:
Title: Re: Maximun number of Joystick Axis supported?
Post by: Nuke on January 07, 2014, 09:40:43 am
every input api lets you access multiple sticks. you just have to iterate over them and enumerate. lots of dx games just use the preferred device because nobody wanted to write a for loop.
Title: Re: Maximun number of Joystick Axis supported?
Post by: z64555 on January 07, 2014, 05:32:55 pm
The no-loop strategy might be related to inlining the read function. Thought I saw somewhere that you couldn't/shouldn't do any loops in an inlined function...
Title: Re: Maximun number of Joystick Axis supported?
Post by: Nuke on January 07, 2014, 09:43:08 pm
perhaps. things do get complicated when you do multiple sticks, moreso than one would think. for one thing you can never guarantee sticks will enumerate in the same order every time. so you have to use the guid to reliably identify a stick. when you store bindings you also can store the guid string so you make sure you map the right bindings to the right stick. ive never actually done this, i always used the name string, but if you have two of the same stick, that might cause problems.