http://bugs.winehq.org/show_bug.cgi?id=30837
Bug #: 30837 Summary: Star Trek Online doesn't detect joystick/gamepad Product: Wine Version: 1.5.5 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: directx-dinput AssignedTo: wine-bugs@winehq.org ReportedBy: vitor.dominor@gmail.com Classification: Unclassified
Recently I decided to try playing Star Trek Online with one of my old but still working xbox 1 gamepads. For that purpose, I installed the xboxdrv (the userspace driver for xbox 360 and 1 gamepads) and after running xboxdrv with the command xboxdrv --silent --trigger-as-button, I started the game. The game has support for joysticks (I made sure I enabled joystick support in the in-game options). However, the game does not detect it, since it does not respond to any button presses or axis movements from the gamepad.
When running the game from the terminal, the output I get with the gamepad attached to the PC is attached to this bug report.
I have tried running the game natively on Windows 7 and XP SP3 with the gamepad attached and it is detected and runs as expected. Furthermore, by running STO with apimonitor from http://www.rohitab.com/apimonitor in Windows, I was able to determine that the game uses direct input 8, specifically the IDirectInputDevice8 and IDirectInput8 interfaces, to detect and control the system mouse and any attached joystick. It uses in particular the IDirectInput8::EnumDevices to find any available joysticks.
In order to determine if this is an issue specific to this game running on Wine, I tried using the gamepad with another game well supported by wine and which also supports joysticks: Trackmania Nations Forever. This one detects the gamepad as a joystick automatically and by adding +dinput to WINEDEBUG, I noticed the following line on the output: Code: trace:dinput:IDirectInputWImpl_EnumDevices (this=0x12f718,0x0004 'DIDEVTYPE_JOYSTICK',0x8fc5a0,0x12238a0,0001). After that, wine outputs successfull detection of the joystick: Code: trace:dinput:find_joydevs Found a joystick on /dev/input/event16: Xbox Gamepad (userspace driver) ({9e573eda-7734-11d2-8d4a-23903fb6bdf7})
Next, while running STO on wine with WINEDEBUG="+dinput": and while the game detects and initializes the system mouse through dinput, it seems to initialize the IDirectInput8 Interface, but it does not enumerate any joystick unlike Trackmania.