AntiMicroX / antimicrox

Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support.
GNU General Public License v3.0
2.26k stars 138 forks source link

USB gamepad controller mapping DPad is fully possible #805

Open visko83 opened 1 year ago

visko83 commented 1 year ago

Is there an existing issue for this?

Current Behavior

I have a simple USB gamepad controller (NES controller). In AntiMicroX's Controller mapping I am unable to assign the DPad buttons. For a DPad button in the application, only an Axis can be set, but the position is ignored. I can only assign: DPad Down as Axis 1 DPad Right as Axis 2 for DPad Up/Left I can not assign the controller's DPad Up/Left button.

Expected Behavior

I should be able to assign axis with its position: DPad Up - Axis 2: -32768 DPad Down - Axis 2: 32767 DPad Left - Axis 1: -32768 DPad Right - Axis 1: 32767

Steps To Reproduce

With an USB gamepad controller (like https://www.amazon.com/Controller-Compatible-Raspberry-Retropie-Emulator/dp/B0BLYWHBH8/ref=sr_1_1?keywords=usb+gamepad+controller&qid=1688206451&sr=8-1 )

  1. click on Controller Mapping (bottom left)
  2. scroll down to DPad section, start with DPad Up
  3. click DPad Up on the controller -> nothing happens (last axis event is recognised as Axis 2: -32768)
  4. (you automatically get to the DPad Left cell) click DPad Left on the controller -> nothing happens (last axis event is recognised as Axis 1: -32768)
  5. (you automatically get to the DPad Down cell) click DPad Down on the controller -> recognised as Axis 2 (last axis event is recognised as Axis 2: 32767)
  6. (you automatically get to the DPad Right cell) click DPad Right on the controller -> recognised as Axis 1 (last axis event is recognised as Axis 1: 32767)

Environment

Program Version 3.1.4
compiled from packaging: 3.1.4-1 (Ubuntu hirsute/amd64)
Built Against SDL 2.0.14
Running With SDL 2.26.3
Using Qt 5.15.8
Using Event Handler: XTest

Anything else?

No response


Upvote & Fund

Fund with Polar

pktiuk commented 1 year ago

You use outdated version (over a year old)
Please update your app.
Ubuntu does not have updated version in repository.

visko83 commented 1 year ago

Hi @pktiuk, thank you for picking up the issue. Unfortunately upgrade didn't help, it's the same. Current version: Program Version 3.3.4 Compiled from packaging: GitHub Release Built Against SDL 2.0.20 Running With SDL 2.26.3 Using Qt 5.15.8 Using Event Handler: uinput Compositor type: wayland Host OS: ubuntu Version: 23.04 Architecture: x86_64

pktiuk commented 1 year ago

Cloud you collect some logs

visko83 commented 1 year ago

Hi Pawel, please find the log attached. Also let me note that there is a typo in the wiki page mentioned (log file name: amtimicrox > antimicrox) amtimicrox.log

pktiuk commented 11 months ago

DPad Down as Axis 1 DPad Right as Axis 2

Does it mean, that Right and Down button presses are not detected at all?
Are they detected in the window Options->Properties?
How are DPad button presses detected in that window?

visko-sc commented 10 months ago

The button presses are detected because in Controller Mapping there's a clear difference when I press e.g. DPad Left/Right (Axis 1: -32768/32767). But in Options->Properties there's no indication for DPad Left/DPad Up button presses - only DPad Right / Down are detected (it aligns with the bug's description).

visko-sc commented 10 months ago

I was curios if anything is different on Windows 11 and yes: Controller Properties does recognize all DPad buttons (12 - Up, 13 - Down, 14 - Left, 15 - Right). But Controller Mapping is still the same, the axes are slightly different (Axis 4 for horizontal, Axis 5 for vertical axis). But It is still not possible to map DPad left / DPad up (Axis 4: -32768 / Axis 5: -32768), it is only possible to assign DPad right / down (Axis 4: 32767, Axis 5: 32767).

pktiuk commented 10 months ago

I was curios if anything is different on Windows 11 and yes: Controller Properties does recognize all DPad buttons (12 - Up, 13 - Down, 14 - Left, 15 - Right).

Different detection on Win 11 and other systems may be caused by bug/another implementation in underlying SDL library which is uded by AntiMicroX.