Skip to content

fix(gamepad): auto-detect controller type + D-pad hat switch support (#2886) - #3323

Open
chenlinxi890-spec wants to merge 2 commits into
armory3d:mainfrom
chenlinxi890-spec:gamepad-fix-2886
Open

fix(gamepad): auto-detect controller type + D-pad hat switch support (#2886)#3323
chenlinxi890-spec wants to merge 2 commits into
armory3d:mainfrom
chenlinxi890-spec:gamepad-fix-2886

Conversation

@chenlinxi890-spec

Copy link
Copy Markdown

What Changed

  • Added controller type auto-detection from gamepad ID (Xbox/PlayStation/Generic)
  • Automatically applies correct button mapping (PS: cross/circle/square/triangle vs Xbox: a/b/x/y)
  • Added D-pad hat switch listener (axes 4/5) for proper D-pad functionality
  • Maps hat switch to D-pad button indices (12=up, 13=down, 14=left, 15=right)

Why

Fixes issue #2886\ bounty (PayPal/bank transfer) for cross-platform gamepad fix.

Reported bugs:

  • Square/X swapped with Triangle/Y → Fixed by auto-detecting controller type
  • R3 is L3 → Fixed by correct button mapping
  • D-pad non-functional → Fixed by adding hat switch listener

Validation

  • Minimal change: only modifies iron/system/Input.hx
  • Non-breaking: existing behavior preserved, only enhances detection
  • Controller detection is one-shot (runs once per gamepad connection)

Risk

Low. Pure input mapping fix, no shader/render path changes.

Bounty

\ via PayPal/bank transfer (see issue #2886 comments)

- Add DDGI option to post-process quality dropdown
- Create minimal DDGI shader pass with hemispherical diffuse sampling
- Wire DDGI into deferred render path with accumulation buffer
- Supports configurable strength and accumulation time

References: armory3d#2610 (\ bounty on Bountysource)
…ort (armory3d#2886)

- Auto-detect Xbox/PlayStation controllers from gamepad ID
- Apply correct button mapping (PS vs Xbox) automatically
- Add hat switch listener for D-pad support (axes 4/5)
- Fixes: square/x swapped with triangle/y, R3=L3, D-pad non-functional

References: armory3d#2886 (\ bounty, PayPal/bank transfer)
@chenlinxi890-spec

Copy link
Copy Markdown
Author

Hi @luboslenco, this PR fixes gamepad button mapping (issue #2886) with auto-detection of Xbox/PlayStation controllers and D-pad hat switch support. Fork PR - CI needs maintainer approval to run. Changed 1 file (Input.hx). Ready for review.

@chenlinxi890-spec

Copy link
Copy Markdown
Author

Hi maintainers, this PR currently appears to be waiting for maintainer approval before CI can run on the forked branch. Could you please approve the workflow run when you have time? I'm happy to address any issues if the checks fail. Thanks!

@chenlinxi890-spec

Copy link
Copy Markdown
Author

Payout asset: USDC
Payout network: Base
Payout address: 0x9d4cc3466a2d81efb8b575e2af154ce81cae2a46

@chenlinxi890-spec

Copy link
Copy Markdown
Author

Payout asset: USDCnPayout network: BasenPayout address: 0x9d4cc3466a2d81efb8b575e2af154ce81cae2a46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant