input(macos): DualShock 4 touchpad as View, prefer the controller used last #113
No reviewers
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!113
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-113"
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?
@mimaslifetree on GitHub · 2026-11-26 16:50 UTC · original
mimaslifetree:ps4-controller→main· +243 −72 · 5 files · 2 commits · merged 2026-11-26 17:16 UTCThe Game Controller path from #10 already reads a DualShock 4, because
GCDualShockGamepadis an extended gamepad. This PR fills in the PlayStation-specific parts and makes the read path testable without hardware.Changes
touchpadButton, so Xbox and MFi pads are unchanged.GCController.current(the one used last) drives the pad. If it has no extended gamepad, the first connected one that has drives it.controller: drives the pad, withvendor,category(e.g.DualShock 4) andtouchpad. Testers can then confirm their pad was recognised.poll_controlleris split intoactive_controllerandsnapshot_of.keys_feed_the_keyboard_and_the_stand_in_padnow takesLIVE_TEST_LOCKon macOS. There the stand-in pad includesLIVE_PAD, which the live-controller test sets in parallel; it failed about 1 run in 4. CI runs on Windows, so it doesn't see this.docs/native-host.md.Tests
window::tests::snapshot_reads_a_software_extended_gamepadreads a software gamepad made with+[GCController controllerWithExtendedGamepad](elements set withsetValue:) through the real Objective-C path.gameinput::tests::playstation_touchpad_click_is_view.cargo test --target x86_64-apple-darwin -p victory -- window::passes 4/4.cargo test -p victory-hleunit tests pass 123/123; thegameinputtests pass 10 reruns in a row.cargo clippy --workspace --all-targets --target x86_64-pc-windows-gnullvm -- -D warningsis clean, andcargo xtask policypasses.Not tested: a physical DualShock 4 in the game's menus. The mapping is verified only against the software gamepad. A tester run with a real pad is welcome.
@LakshanSivakumar on GitHub · 2026-11-26 17:17 UTC · original
Merged in
182c14f. The touchpad click as View and the controller selection are tested without hardware, and the LIVE_TEST_LOCK change fixes a flaky test too. Thanks!