[pr-feature] Display PlayStation buttons when a PlayStation pad is connected automatically #24
Loading…
Reference in a new issue
No description provided.
Delete branch "xrobau/Darner:auto-controller-icons"
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?
This changes the default DARNER_PROMPTS to auto. Setting DARNER_PROMPTS=xbox
keeps the Xbox icons, whatever controller is connected and with mouse and
keyboard on.
Very small and simple patch.
Contributor role (optional)
What it changes
Instead of the (poorly documented) DARNER_PROMPTS param, try to figure out which controller is
connected to the machine, and display those buttons.
DARNER_PROMPTS=auto), a DualSense, DualSense Edge or DualShock 4 connected at the start gives PlayStation buttons, found the same wayautoalready did (Windows' HID device list, nothing opened); otherwise the Xbox pictures.DARNER_PROMPTS=playstationand CONTROLS DUALSENSE still force PlayStation buttons.DARNER_PROMPTS=xbox: main added it while this was open (3940e26d9: the Xbox pictures with mouse and keyboard on), and this branch had added it too (the Xbox pictures with a PlayStation pad connected). Here they are one switch that does both. main'sxbox_pictures_when_askedreadplaystation_selected_byas a bool, which no longer compiled once it returnsPadPrompts; it now expectsPadPrompts::Xbox. README anddocs/playstation-prompts.mdname both halves.How it was tested
6f16801e6(one commit on4a92569fb, today'smainon git.gtahub.st)cargo test --locked -p darner prompt: 4 passed (keys_only_when_keyboard_is_selected,playstation_buttons_with_dualsense_or_when_asked,the_connected_pad_decides_unless_xbox_is_asked, main'sxbox_pictures_when_asked)cargo clippy --locked -p darner -p darner-hle --all-targets -- -D warnings: passedDARNER_PROMPTS=xboxwith a DualSense, andDARNER_PROMPTS=xboxwith mouse and keyboard on.Checklist
main.docs/asset-policy.md.Checked for overlap
crates/darner-hle/src/modules/gameinput.rs(other parts; both merge with this branch without conflicts there), and #6 and #8 add aREADME.mdrow each in other sections. (This replaces CodeFloe PR #333, lost when the repository moved.)Change
With an attached PS controller, the icons are now what the end user would expect.
🤖 Generated with Claude Code
darner rig, F1 AUTO-DETECT row, per-start switches (DARNER_AUTO_SWITCHES, on by default, =0 turns it off) #25