Hard Light Productions Forums
General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Yarn on March 21, 2017, 06:19:10 pm
-
By "XInput controller," I'm referring to Xbox One and Xbox 360 controllers as well as other controllers that use the XInput standard (such as the Logitech F710 in XInput mode).
I noticed today that I'm unable to use any XInput controllers an any nightly build since SDL Everywhere was merged (July 18, 2016 and later). I can select the controller in wxLauncher, but the game doesn't seem to utilize it at all, neither on the control configuration screen nor in a mission.
I've attached a log that was produced by running the game with my Xbox 360 controller selected. Here's the part of the log regarding controller initialization:
Initializing Joystick...
Printing joystick info:
Joystick name: XInput Controller #1
Joystick GUID: 78696E70757401000000000000000000
Joystick ID: 0
Joystick device ID: 0
No joystick is being used.
Initializing Haptic...
Available haptic devices:
XInput Controller #1
missing constant effect
missing sine effect
missing sawtoothdown effect
missing spring effect
ERROR: Haptic joystick does not support the necessary effects
So, yeah, as it says, the game isn't using the controller.
DirectInput controllers still work.
(I'm running Windows 7 SP1 64-bit, by the way.)
[attachment stolen by Russian hackers]
-
Hi I had the same issue... I must use the "Store config in portable location" option in order to have my xinput controller to work ingame!
-
Which version of wxLauncher are you running?
-
I'm using the latest 0.12_RC2 For Yarn I don't know but my system specs are similar I'm on Win7 pro 64bits
-
What are the joystick settings set to in your fs2_open.ini?
-
I already posted about this issue but did not get an answer.
Curent joystick ID is set to 000000000000000000000000.
If I use portable location it works, but if I copy the fs2open.ini to my portable location (root folder), then my joystick stops working, that's weird!
Using 3.7.4 there's no such problem.
-
I figured out that the problem is in wxLauncher, not FS2 Open.
When fs2_open.ini is written, two fields have to be properly set to select a joystick: CurrentJoystick, which is the index of the joystick (0 for the first one, 1 for the second, and so on); and CurrentJoystickGUID, which appears to be an identifier for the joystick consisting of 32 hexadecimal digits. In the case of XInput devices, wxLauncher is setting the latter field to 00000000000000000000000000000000 instead of the correct value (78696E70757401000000000000000000 in my case). I will let the wxLauncher team know about this.
In the meantime, here's how to get XInput devices working in recent builds of FSO:
- From wxLauncher, run a debug or fast debug build of FSO with your desired settings, including those for joysticks. (But don't bother with portable mode, since wxLauncher doesn't actually support it yet.)
- Open your fs2_open.log (should be in %APPDATA%\HardLightProductions\FreeSpaceOpen\data). (I recommend not using Notepad or else lines will not be broken properly.)
- Scroll down to the line that says "Printing joystick info:".
- Find your controller in the list below that line and find the line in that section that starts with "Joystick GUID:". Leave the log open.
- Open fs2_open.ini (should be in %APPDATA%\HardLightProductions\FreeSpaceOpen).
- Find the field named "CurrentJoystickGUID".
- Copy the joystick GUID that you obtained from your fs2_open.log and paste it to the "CurrentJoystickGUID" field.
- Save fs2_open.ini and close both fs2_open.log and fs2_open.ini.
-
I posted (http://www.hard-light.net/forums/index.php?topic=67950.msg1848369#msg1848369) in the wxL release thread that I can take a look at this.
As mentioned there:
I'll need some information from a coder who's familiar with the FSO input control code, specifically:
- which platforms this issue applies to (presumably all)
how to get the joystick/controller GUID, since FSO must do it somewhere. Presumably it's an SDL2 API call.