controller: use Back as the touchpad click on pads without a touchpad #1355
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1355
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1355/head"
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?
@KelvinSilvaDev on GitHub · 2026-10-10 04:55 UTC · original
KelvinSilvaDev:controller/touchpad-click-fallback→main· +13 −0 · 1 files · 2 commits · merged 2026-10-10 17:20 UTCFixes #1298
Gamepads without a touchpad (Switch, Xbox, 8BitDo, ...) cannot click it, so games that
require the touchpad can't be played with them. The keyboard already emulates it
(Backspace/Tab); gamepads had nothing.
For
SDL_GAMEPAD_BUTTON_BACKon a pad that reports no touchpads, this reportsPAD_BUTTON_TOUCH_PADplus a finger at the centre of the touchpad. Pads with a real touchpadare unchanged. The change is confined to
GameEventControllerinwindow.cpp.AI use
Claude (Anthropic) wrote the patch and helped with builds and log reading. I reviewed the
code and ran the tests below myself.
Testing
Windows 11, 8BitDo Ultimate 2C (XInput, no touchpad), Astro's Playroom, "TOUCH PAD" tutorial
screen:
mainwithout this change, pressing Select does nothing.releasing it turns it off. It doesn't light up on its own.
main(307fdcf).Also:
kyty_emulatorbuilds on Windows (clang-cl) and linked on Linux (clang) before the rebase.Not tested: DualSense or DualShock 4 (I don't have one).
No unit test: this is SDL event handling in the window loop, which no existing test covers.
Limitation
The touch is always at the centre, so screens that need a swipe aren't reachable with a
gamepad. The keyboard covers that today.
Questions
to the touchpad click instead?
code they should be: the fallback only runs when
SDL_GetNumGamepadTouchpads()is 0.@coderabbitai[bot] on GitHub · 2026-10-10 05:58 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
c5aa891c-506f-400d-883b-da4d3fd5ad37📥 Commits
Reviewing files that changed from the base of the PR and between
307fdcf7adand708b0caffd.📒 Files selected for processing (1)
src/graphics/presentation/window/window.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
When a gamepad without touchpads receives a Back button event, the handler sets the touchpad button state and sends touch finger 0 at the center. The handler does not use this fallback when the gamepad handle is unavailable or the gamepad has at least one touchpad.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Feature · Severity of issue fixed: Medium
Merge Risk: ⚪ Minimal · up to
708b0Back provides a centered touchpad click on controllers without touchpads, and the input clears on release. No actionable contract violation is established; the change is ready for normal checks.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#1298requests touchpad emulation for controllers without a touchpad. InGameEventController,SDL_GAMEPAD_BUTTON_BACKnow setsPAD_BUTTON_TOUCH_PADand a centered touch contact when `SDL_G…src/graphics/presentation/window/window.cpp. All changes handle the Issue#1298fallback for the Back/Select button on controllers without touchpads. The diff contains n…Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@Nmzik on GitHub · 2026-10-10 17:20 UTC · original
@KelvinSilvaDev Not ideal but let it BE for now :) Pushed bug fix for NON Dualsense controller. Thanks