• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows 2.1.3.271 DirectInput gamepad problems?

untune

Member
Hi all, just wondering if anyone else is having issues with gamepads. My input system was working fine before the update, but now it seems to have an issue with DI pads.

First thing: DualShock 4 now has much better support (description is now "Sony DualShock 4" as opposed to "Wireless Controller") and the triggers actually report analogue input now, BUT I no longer get any input from the 'Share' (Select) button. Face buttons appear to have been remapped to match XInput. Everything else seems fine.

Secondly, I have a cheap DirectInput pad I use for testing. It's a weird one with a Dpad that actually receives input as if it was the left analogue stick, but only gets the extreme 8 directions. As of the update, it now only registers Dpad-left pressed as extreme up/left (ie, -1, -1) and a Dpad-right press as extreme down, right (1, 1). Dpad-up and Dpad-down no longer report any input. Furthermore, it's now reporting that input from the Dpad as if it is coming from both the left AND the right thumbstick. I have checked it against an XInput pad (which still works perfectly) and the way my system reports control presses, it is acting as it would if both thumbsticks were being forced into the upper left corner and lower right corners for a left and right push, respectively.

I have another pad which is screwy to begin with and that one was treating the left trigger as the Y axis of the right thumbstick so I'm just confused as to what has happened!

Does anyone have DirectInput gamepads they can test with?

Cheers
 

untune

Member
Ha, it does simplify things I suppose. I'd already written a remapping routine for PS pads which I had to rejiggle a bit now that it has changed :p But it's not really an issue.

Since posting I've done more digging and checked all my pads directly in Windows to see how they actually behave in the device manager. Every one of them is working exactly as it should - in terms of analogue sticks, triggers, buttons etc. So there must be a problem introduced in the layer between GMS and the driver that is causing problems with the input :/
 
R

rockmann

Guest
Sorry to resurface this, but I have the exact same issue with a USB retro SNES gamepad and it is driving me crazy, and the worst is that I have eight controllers of this kind to use on a party project. Had this been solved?
 

untune

Member
I did fix this yes - I have a huge input system that basically lets you map and remap practically any pad. I've not touched the code since October and coding has taken a bit of a backseat so I've not even tried the latest GMS2 update which changed and added a bunch of input stuff. Worried a bunch of my code might be obsolete now! PM me with your issues and I'll take a closer look tomorrow if I can help
 
R

rockmann

Guest
I'm installing the december runtime, to try. I figure it out how to remap buttons, but the issue is on the axis, left inputs all axis as -1 and right as 1, even the right stick too.

EDIT: Also, up and down does not register.
 
R

rockmann

Guest
I don't know how to send PMs here :confused:

Anyway, here I'm testing the pad (pressing left) on the last stable update. As you can see it sets everything to -1.

 

untune

Member
My memory is fuzzy but I do know that, with DI pads especially, the axes are always different and sometimes even duplicated depending on the pad. Make sure you are enumerating all the axes individually and not using the gp_axislh/lv etc constants.
 
R

rockmann

Guest
That's the thing I don't know how to do, how to enumerate the axis, I can't find an example on the documentation.
 

TrunX

Member
Have the same problem with my Direct Input Controller.

Pressing right on the D-Pad results in both gp_axislh>0.5 (Analogue Right) but also gp_axislv>0.5 (Analogue Down) getting detected.
(Currently on 2022.1.1)

Inside the Windows Gamepad Settings but also 3rd Party Gamepad Input Tools, the dpad inputs are detected correctly.

Not sure if thats a general Direct Input+GMS2 problem or specific to my/our controllers.
 
Last edited:

kburkhart84

Firehammer Games
Have the same problem with my Direct Input Controller.

Pressing right on the D-Pad results in both gp_axislh>0.5 (Analogue Right) but also gp_axislv>0.5 (Analogue Down) getting detected.
(Currently on 2022.1.1)

Inside the Windows Gamepad Settings but also 3rd Party Gamepad Input Tools, the dpad inputs are detected correctly.

Not sure if thats a general Direct Input+GMS2 problem or specific to my/our controllers.
It was mentioned above, and I'm sure it will apply to you. Instead of using the gp_xxx constants for DirectInput gamepads(which are currently ids 4 - 11 on Windows), just use values 0 - x for them. And for POV hats, use those functions instead of the axis functions. I recommend the same for the buttons. DirectInput supports up to 10 axes, 32 buttons, and 4 POV Hats(with 8 directions each). If you intend to support all of that, you have to go away from the gp_constants to do it as there aren't constants for everything. And FYI, many controllers have DPads that are gong to work as POV hats instead of axes.
 
Top