Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Archaic on July 21, 2011, 04:12:39 pm

Title: gamepad Axis Read Issue
Post by: Archaic on July 21, 2011, 04:12:39 pm
I recently bought a Logitech F510 gamepad for use with FS2 as well as other games. However, when trying to implement a control scheme that utilizes the dual analog sticks, I found that the game was not reading the horizontal axis on the right analog stick during play. FS2 does however acknowledge the existence of the axis as I can bind it. The windows calibration screen confirms that all is as it should be with the gamepad.

The only thing i can think of is that FSO only supports 4 axis, where the gamepad has 5 (2 analog sticks, each with an x and y, and 2 shoulder buttons operating on the same axis).

I dont really know where to post this, but you guys make the game work, so I figured here was as good a place as any.

Title: Re: gamepad Axis Read Issue
Post by: chief1983 on July 21, 2011, 09:15:22 pm
If there is a problem with the code, this may not be fixable until we get FSO on Windows using libsdl.
Title: Re: gamepad Axis Read Issue
Post by: IronBeer on July 21, 2011, 09:27:10 pm
Use Xpadder, emulate one of the sticks as a mouse (I'm assuming you use one of the sticks for pitch/yaw), emulate everything else as keypresses, tell FSO to not use the gamepad directly, and tell FSO to use mouse pitch/yaw. As a user of a 360 gamepad, I've not really found any ways to make FSO register the twin sticks properly aside from the previous sentence. I know it sucks, but there are workarounds that don't require code tweaking.
Title: Re: gamepad Axis Read Issue
Post by: Archaic on July 21, 2011, 10:03:37 pm
i switched it over to direct input mode and set the right stick to mouse, works fine now! thanks IronBeer!
Title: Re: gamepad Axis Read Issue
Post by: Nuke on July 23, 2011, 04:08:28 am
you know ive always had trouble reading the 6th axis on any joystick since retail. this is on every 6-axis joystick and gamepad ive ever owned. makes me wonder if an array got initialized wrong somewhere. ive jest never complained about it since its easy to workaround with 3rd party software and the game only really uses 4 axes at max anyway.