Author Topic: Anyone else unable to use XInput controllers in recent nightlies?  (Read 3158 times)

0 Members and 1 Guest are viewing this topic.

Offline Yarn

  • 210
Anyone else unable to use XInput controllers in recent nightlies?
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:
Code: [Select]
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]
« Last Edit: March 21, 2017, 06:50:32 pm by Yarn »
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: Anyone else unable to use XInput controllers in recent nightlies?
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!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Anyone else unable to use XInput controllers in recent nightlies?
Which version of wxLauncher are you running?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: Anyone else unable to use XInput controllers in recent nightlies?
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

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Anyone else unable to use XInput controllers in recent nightlies?
What are the joystick settings set to in your fs2_open.ini?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: Anyone else unable to use XInput controllers in recent nightlies?
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.

 

Offline Yarn

  • 210
Re: Anyone else unable to use XInput controllers in recent nightlies?
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.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

  

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Anyone else unable to use XInput controllers in recent nightlies?
I posted 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.