Skip to content

Switch: one sideways Joy-Con per player, with its own tilt and shake - #22

Merged
dorPXP merged 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-sideways-joycons
Nov 5, 2026
Merged

dorPXP merged 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-sideways-joycons

Conversation

@TomasUribe

@TomasUribe TomasUribe commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

On Switch, a single Joy-Con held sideways can't be used as its own player, so split screen with one Joy-Con each (as in Mario Kart 8, or the Wii Remote held sideways in the original game) doesn't work.

This adds that, all in aurora-main/lib/switch/input_switch.cpp:

  • Pairing: the Joy-Con hold type is set to horizontal at attach and before the controller screen opens, so the controller screen offers "press SL and SR" and each Joy-Con joins as its own player. (enable_single_mode is left off on purpose: in libnx it means a single player and would cap the screen at one.)
  • Buttons and stick: HID reports a single Joy-Con's buttons and stick as if it were upright, so they are turned here. The face-button order is the one devkitPro's SDL2 Switch port uses (SDL_sysjoystick.c): left Joy-Con A/B/X/Y = Down/Left/Right/Up, right Joy-Con = X/A/Y/B. SL/SR become ZL/ZR, so they reach the game's L (item) and R (drift) like on Mario Kart 8. The stick click is D-pad Up (trick/wheelie), and the Joy-Con's +/- is Start. The stick is rotated a quarter turn each way to match.
  • Tilt and shake: the sensors of the single Joy-Con styles are started too, and their acceleration is turned into the player's frame (the long axis becomes left/right). The existing tilt steering and shake-to-trick then work per Joy-Con, rotated like a wheel.

Pairs, Pro Controllers and handheld are unchanged: the single-Joy-Con path is only taken when the pad's style is JoyLeft/JoyRight with no JoyDual/FullKey/Handheld.

Tested on my Switch (Atmosphère, firmware 23.0.1, build from source): split screen with one sideways Joy-Con per player, including tilt steering.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dorPXP

dorPXP commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

the button mapping is really good, and motion controls work as expected i tested it on my switch in a grand prix with the sideways left joycon, and one issue, i cant open DriftDroid settings with a sideways joycon, clicking both sticks does not open the settings menu.

i was thinking we could make holding plus, or minus on the joycons open the quick settings menu(which can be used to access the full settings menu), but one quick tap is just pause like normal. / infact, i am going to try that right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants