Repository navigation
A DualShock 4 or DualSense touchpad click opens the menu as F1 - #1846
Merged
Merged
Conversation
|
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 |
Contributor
Author
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. |
…as F1 The touchpad is a button no controller on the Switch has, so the menu could only be opened from a PlayStation pad with Home or Select and Start together. Clicking it now does what F1 does: it opens the menu and closes it again. SDL numbers the touchpad click 20 in both SDL2 (SDL_CONTROLLER_BUTTON_TOUCHPAD) and SDL3 (SDL_GAMEPAD_BUTTON_TOUCHPAD), past the buttons pad_sdl.c reads for the game. The poll sets HOS_PAD_TOUCHPAD from it, a bit past HOS_PAD_N so the Controls page does not offer it as an input for a Switch button, and menu_tick presses F1's press[6] with it. A click while a binding listens is ignored. Tested with the new tests/test_touchpad_menu.py, which compiles the poll's button block over a stand-in SDL and checks the menu's use, and with the rest of tests/run_all.py. Not tested in the game: no DualShock 4 or DualSense and no dump here. Assisted-by: DeepSeek V4.1 Flash (opencode)
nicholasgower
force-pushed
the
feat/touchpad-menu
branch
from
November 10, 2026 18:31
688032c to
8790b8f
Compare
Contributor
Author
|
I've tested this myself, and I can confirm that it works. |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.