A DualShock 4 or DualSense touchpad click opens the menu as F1 #1846
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1846
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/touchpad-menu"
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?
Clicking the touchpad on a DualShock 4 or DualSense did nothing, so a PlayStation pad could only open the menu with Home or Select and Start together. The touchpad is a button no Switch controller has, and its click is the natural menu key on those pads: it now does what F1 does.
What changed
host/pad_sdl.creads SDL's touchpad button (button 20 in both SDL2'sSDL_CONTROLLER_BUTTON_TOUCHPADand SDL3'sSDL_GAMEPAD_BUTTON_TOUCHPAD) and sets a newHOS_PAD_TOUCHPADbit (gpu/vk/vk_api.h). The bit is pastHOS_PAD_N, so it is not one of the inputs the Controls page can bind to a Switch button.gpu/vk/vk_menu.cpppresses F1's slot (press[6]) on that bit: a click opens the menu while playing, and closes it again, exactly as F1 does. A click while the Controls page is listening for a new binding is ignored.readme.mddocuments it under In-game menu.Testing
tests/test_touchpad_menu.pycompiles the poll's button block fromhost/pad_sdl.cover a stand-in SDL and checks that only the touchpad click setsHOS_PAD_TOUCHPAD, that an ordinary button still sets its own bit, and that the bit is outside the bindable positions. It then checksvk_menu.cppmaps it to F1 (press[6]), not Insert/confirm/back, and masks it from the binding listener.python -I -B tests/run_all.pylocally: the new check and the menu and pad checks pass (test_touchpad_menu,test_menu_keys,test_stick_rest,test_bound_keys,test_rumble_*,test_hd_rumble,test_input_background). The full run's 11 failures on this PC are environment-only: noclangon PATH, no privilege to create symlinks (WinError 1314), and Python 3.14's\\?\paths. CI on Linux with the tools installed is the real check.Build
Rebased onto
main(51de681) and built a complete game folder from the user's.nupwithnx2/make_game.py: the compile, thehookshot.exeandhookshot_vk.dlllinks, and shader preparation all succeeded.mainitself does not link right now: #1720's merge left out thevk_replay.cpphalf ofpresent ahead, somkwvk::present_commitandmkwvk::present_defer_intoare undefined. Open PR #1858 is the pending fix. I applied that one commit to the working tree for this build only; it is not part of this PR, and the red Vulkan job here is that same main breakage.Not tested
No issue links: there is no open issue for it in the repository.
I wonder if it shouldn't be the "PS" button in that case, rather than the touchpad click? Would be more "natural" as the guide button I think
One problem with this idea is that PCs often override the home button with other menus, whether it be Steam Big Picture or Xbox Game Bar. On Playstation controllers, the touchpad is the only button that isn't required for Switch inputs.
I've tested this myself, and I can confirm that it works.
Looks good. The touchpad click (bit 31) reaches
menu_tickthroughhos_pad_rawand never reaches the Switch button mapping, sincepad_bindonly covers 0..HOS_PAD_N-1. The binding listener masks it too, andpress[6]lines up with F1, so it opens the menu the same way the key does.CI:
test_touchpad_menupasses on both Python jobs. The other failures (thepresent_commit/present_defer_intolink error,test_present_ahead,test_present_semaphores,test_draw_parameters,test_nup_out_of_space,test_wayland_libdecor_hint) aren't from this diff. As the description says, the link error and present tests come from main's breakage after #1720.