godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.71k stars 20.12k forks source link

Hats on HOTAS are mapped as d-pad #83322

Open Changryy opened 10 months ago

Changryy commented 10 months ago

Godot version

v4.2.beta.custom_build [a574c0296]

System information

Windows 11 - Logitech G X52

Issue description

Some game controllers have hats. A hat works like a d-pad but should NOT be mapped as a d-pad. This results in conflicting bindings as seen in #60862. The offending code is in Input::joy_hat which is in core\input\input.cpp

Edit: Seems like JoypadWindows::process_joypads() only supports 1 hat while JoypadMacOS::process_joypads() and JoypadLinux::process_joypads() can have multiple hats, but since they all go through Input::joy_hat they all get mapped as a d-pad

Steps to reproduce

Not relevant

Minimal reproduction project

Not relevant

AThousandShips commented 10 months ago

In the future please do not edit the issue template, do not remove the sections