OpenMW 0.46.0 52fa20fb1c - DirectInput Controller Buttons 11 and 12 ignored

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
User avatar
FiftyTifty
Posts: 56
Joined: 15 Oct 2014, 21:02

OpenMW 0.46.0 52fa20fb1c - DirectInput Controller Buttons 11 and 12 ignored

Post by FiftyTifty » 03 Mar 2020, 00:58

Figured I'd fire up Morrowind, now that I've moved on from a shitty i3 350 laptop with an Intel HD 2000 that needed a 64x64 texture pack for Morrowind at lowest settings, to a spiffy i5 4300m with an Intel HD 4600. Things seem to work, but I noticed that my gamepad is not supported that well.

The OpenMW controller settings are geared for XInput by the looks of it, translating the DirectInput controls to a 1:1 mapping with an Xbox 360 controller. But for some reason, buttons 11 and 12 are ignored. Every other button on the controller is detected and can be mapped, but not those two buttons. OpenMW endlessly waits for input unless I press another button or the Esc key.

The name of the controller is: Gembird JPD-DUALFORCE2 USB

Screenhot of the Game Controller Properties window: https://i.imgur.com/785tOh8.png

I've not tried X360CE yet, as I wanted to make this wee bug report first. Just seems that not all DirectInput buttons are being detected for some reason.

Edit: There is no change when using X360CE with all of the x64 XInput .dll wrappers. Buttons 11 and 12 are still not detected by OpenMW.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
AnyOldName3
Posts: 1855
Joined: 26 Nov 2015, 03:25

Re: OpenMW 0.46.0 52fa20fb1c - DirectInput Controller Buttons 11 and 12 ignored

Post by AnyOldName3 » 03 Mar 2020, 22:56

This is probably either SDL's fault or something's wrong with the drivers the gamepad is using and it's not exposing all its buttons. Do they work in any other software, and do they not work in any other software?
AnyOldName3, Master of Shadows

User avatar
FiftyTifty
Posts: 56
Joined: 15 Oct 2014, 21:02

Re: OpenMW 0.46.0 52fa20fb1c - DirectInput Controller Buttons 11 and 12 ignored

Post by FiftyTifty » 04 Mar 2020, 04:19

AnyOldName3 wrote:
03 Mar 2020, 22:56
This is probably either SDL's fault or something's wrong with the drivers the gamepad is using and it's not exposing all its buttons. Do they work in any other software, and do they not work in any other software?
They work perfectly in Dolphin and Xebra. Using X360CE to use it with Dark Souls 3 and Sekiro, it also works perfectly. OpenMW Is the only game I've found that has any issue with it, even after using a DirectInput -> XInput wrapper.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
akortunov
Posts: 743
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: OpenMW 0.46.0 52fa20fb1c - DirectInput Controller Buttons 11 and 12 ignored

Post by akortunov » 04 Mar 2020, 08:04

I have a suspicion that gamecontrollerdb.txt (which the SDL_GameControllerAddMappingsFromFile() uses) does not have an entry for your controller, so SDL uses a some kind of default setup.

Google says that a stock SDL has an entry for SVEN X-PAD, which uses the same ID as Gembird JPD-DualForce.

Code: Select all

3000000ff1100003133000000000000,SVEN X-PAD,a:b2,b:b3,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a4,start:b5,x:b0,y:b1,platform:Windows,
Note that on this setup last two buttons (b10 and b11) seem to be not mapped.

Here is a setup for an Gembird JPD-DualForce for SDL 2.0.4 from some SDL-based projects, for example (note that GUIDs have different formats in different versions of SDL):

Code: Select all

ff113133000000000000504944564944,Gembird JPD-DualForce,platform:Windows,a:b2,b:b3,x:b0,y:b1,start:b9,back:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,leftstick:b10,rightstick:b11,
Basically, these mappings are present:

Code: Select all

leftstick:b10,rightstick:b11
and some other buttons have a different layout.

Post Reply