Real game controllers on macOS (Game Controller framework → GameInput) #10
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@LakshanSivakumar on GitHub · 2026-11-26 08:47 UTC · original
Follow-up to #1. The keyboard now drives the game's stand-in pad in the window (merged in
c96c82a). Physical controllers are the next piece.Goal: an Xbox, DualSense or other MFi controller connected to the Mac drives the game's gamepad through
GameInput, alongside the keyboard and the scriptedVICTORY_KEYS.Where things are
crates/victory-hle/src/modules/gameinput.rs: the stand-in pad, its button bits and the merge of live keys with scripted keys. Controller state should feed the same pad (buttons ORed; sticks and triggers as analog values, not just full deflection).apps/victory/src/window.rs: the AppKit event loop. Game Controller framework objects (GCController,GCExtendedGamepad) can be polled from here each frame, or observed throughvalueChangedHandler.Scope
GCControllerDidConnectNotification/DidDisconnect); use the first connected extended gamepad.Out of scope for now: rumble, adaptive triggers, more than one player.
@LakshanSivakumar on GitHub · 2026-11-26 08:47 UTC · original
@claytonblythe this one's yours if you want it (see the note on #9).
@claytonblythe on GitHub · 2026-11-26 08:50 UTC · original
Picking this up! I'll wire
GameController.framework(GCController/GCExtendedGamepad) intoapps/victory/src/window.rsand merge analog pad state intoGameInputincrates/victory-hle/src/modules/gameinput.rs, with unit tests for snapshot mapping, connect/disconnect, and focus-loss clearing.@claytonblythe on GitHub · 2026-11-26 08:54 UTC · original
Opened #11 implementing
GCController/GCExtendedGamepad->GameInputwith snapshot mapping, keyboard/scripted merge, focus-loss/disconnect clearing, and unit + liveGameController.frameworksmoke tests.