Skip to content

Automate gamepad mapping generation via Github Action - #2887

Open
crocdialer wants to merge 2 commits into
glfw:masterfrom
crocdialer:fabian_automate_gamepad_mapping_generation
Open

crocdialer wants to merge 2 commits into
glfw:masterfrom
crocdialer:fabian_automate_gamepad_mapping_generation

Conversation

@crocdialer

Copy link
Copy Markdown

src/mappings.h is generated, but regeneration is manual — update_mappings only runs when
someone remembers. The last commit that actually changed the data is afa78b4 (2021-08-01).
The practical result is that devices needing no new code, only a newer database, report
glfwJoystickIsGamepad() == false: master carries 885 unique GUIDs against ~1765 upstream
entries the parser can consume.

This adds a scheduled workflow that runs the existing update_mappings command and opens a
PR when the regenerated file differs. Nothing about the current design changes: no network
access during a normal build, mappings.h stays committed, and every update is still a
reviewed PR. Only the trigger becomes automatic.

  • monthly, plus workflow_dispatch
  • no third-party actions; permissions scoped to contents: write + pull-requests: write
  • pushes a fixed branch, so repeated runs update one PR instead of stacking new ones
  • closing the PR skips that upstream state; the next run reopens if the data changes again

- SDL_GameControllerDB was transferred from gabomdq/ to mdqinc/
- the old path resolves only through github's transfer redirect, which
  stops working if a repo is ever created at the old location
@crocdialer
crocdialer requested a review from elmindreda as a code owner August 4, 2026 09:40
@crocdialer crocdialer mentioned this pull request Aug 4, 2026
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