Jump to content

Joysticks not being detected


photo

Recommended Posts

I can't get any joystick to be detected via ControlsJoystick. When I run joystick_00 in the controls demo it says "Not available" and an error just repeats continuously "ControlsJoystick::updateEvents(): Aquire(): failed". (I am making sure the joystick is connected before running the demo.)

 

I've tried this with a couple of different joysticks. First was an ancient PS1 controller plugged in via a USB adapter. Windows reports this as a "4 axis 16 button joystick" in the Game Controllers panel. The Unigine demo can't detect it at all.

The second is a Logitech Wireless Gamepad F710, which has a couple of modes. One mode they call DirectInput and the other XInput. In DirectInput mode Windows shows it as "Logitech Cordless RumblePad 2" and the Unigine controls demo will not detect it in any of the examples. In XInput mode Windows shows it as "Controller (Wireless Gamepad F710)" and it works in the xpad360 samples, so this seems to be some sort of XBox 360 controller emulation.

 

So I have a couple of questions here...

1) Why is Unigine not detecting the PS1 controller, or the Logitech controller in XInput mode via the ControlsJoystick class? I would expect both of these to work.

2) I have implemented controls in my game via the class scripts/input/control.h and I would have expected this to at least work with the Logitech controller in XInput mode but it doesn't. On closer inspection it seems that ControlsXPad360 is not included in input_device.h. Has this just not been updated since XBox controller support was added? Could someone update that or should I just go ahead and code it in myself? (I've avoided making any changes to those standard files so far, but I'd be happy to have a go at adding it if it would be then included in the distribution.)

Link to comment

I would be suspicious that some other application was grabbing the joysticks therefor making them unavailable to Unigine... (it might be the control center panel - I vaguely remember having difficulties with this, though I have tested most of our non 360 controllers on Linux) --

 

also here is a version of input_device.h that I added XBox360 to

Link to comment

Well I've tested again, making sure I had the Game Controllers panel closed, and it still doesn't work. I guess it's possible something else has grabbed the joystick, but I'm not sure what that could be. I have confirmed that my code works on another PC with a USB plug in Logitech controller, so the problem is definitely specific to my setup. For now I'll be satisfied if I can get the XInput mode working with the input classes.

 

I can't see the file on that last post though. Did you forget to attach?

Link to comment
×
×
  • Create New...