Skip to content

Fix Linux controller input#46

Merged
lindestad merged 2 commits into
mainfrom
fix-linux-gamecontroller
May 10, 2026
Merged

Fix Linux controller input#46
lindestad merged 2 commits into
mainfrom
fix-linux-gamecontroller

Conversation

@lindestad
Copy link
Copy Markdown
Collaborator

Fixes #27.

The controller path was using raw pygame joystick indices, which differ for PS4 controllers on Linux. This switches recognized devices to SDL's GameController mapping, keeps raw joystick fallback support, and exposes backend controller button state so the dashboard visualizer still works when the browser Gamepad API is unreliable.

Validated with:

  • env UV_CACHE_DIR=/tmp/uv-cache uv run --frozen --group dev pytest
  • env UV_CACHE_DIR=/tmp/uv-cache uv run --frozen --group lint ruff check .
  • node --check static/js/controller.js
  • git diff --check

@lindestad lindestad marked this pull request as ready for review May 6, 2026 16:45
@lindestad lindestad requested a review from mringsby May 6, 2026 17:05
@lindestad
Copy link
Copy Markdown
Collaborator Author

Windows path is now guarded from 0d26dd0 which makes the changes only applied when Topside is ran on a Linux machine.

@lindestad lindestad merged commit 17a8da7 into main May 10, 2026
1 check passed
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.

Gamecontroller does not work on Linux

1 participant