Skip to content

Mac: split a Joy-Con pair into two sideways controllers (#740) - #745

Merged
LNPANDY merged 1 commit into
mainfrom
feat/joycon-split
Nov 5, 2026
Merged

LNPANDY merged 1 commit into
mainfrom
feat/joycon-split

Conversation

@LNPANDY

@LNPANDY LNPANDY commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #740
Forwarded upstream: seedds/nxnative#1322

Summary

  • Add DM_JOYCON_SPLIT=1 so macOS skips GameController's combined Joy-Con input and reads Joy-Con (L) (0x057e:0x2006) and Joy-Con (R) (0x057e:0x2007) directly over IOHIDManager 0x30 reports as Player 1 and Player 2 sideways controllers.
  • Map each half with a 90-degree sideways stick rotation (CCW on Left, CW on Right), rail SL/SR mapped to L/R, sideways 6-axis IMU motion (correcting the Right Joy-Con's inverted raw Y/Z sensor axes before the 90-degree rotation), and per-handle Core Haptics rumble (GCHapticsLocalityLeftHandle for Player 1 and GCHapticsLocalityRightHandle for Player 2).
  • Keep the toggle inside the Controllers sheet (shared by Console Mode and Desktop Mode Settings -> Controls -> Controllers -> Open...) and localize the label (Split Joy-Con into two controllers / 将 Joy-Con 拆分为两个手柄) across all 6 languages (zh, en, de, fr, it, sv).

Screenshots

Controllers Sheet (Split Off - Paired) Controllers Sheet (Split On - Chinese) Controllers Sheet (Split On - English)
Off On ZH On EN

Verification

  • dm/host/tests/t_pad_hid: 52 checks passed (including Left/Right Joy-Con 0x30 button/stick and 6-axis sideways IMU rotation tests).
  • dm/host/tests/t_haptics_apple: passed (including split GCHapticsLocalityLeftHandle and GCHapticsLocalityRightHandle routing across Player 1 and Player 2).
  • python3 dm/ios/tests/compile_check.py: 265 files, 0 failed.
  • python3 tools/engine.py check: 42 patches apply cleanly.
  • swift test --filter "ConsoleLiveTests|ConsolePadTests|LocalizationTests": 57 tests passed.

@LNPANDY LNPANDY added this to the v1.1.2 milestone Nov 5, 2026
@LNPANDY LNPANDY added launcher The NX2Apple launcher app mac Mac labels Nov 5, 2026
@github-actions github-actions Bot added windows Windows (the Qt front end) patch-queue Changes the patch queue or the upstream pin labels Nov 5, 2026
@LNPANDY LNPANDY modified the milestones: v1.1.2, v1.1.1 Nov 5, 2026

@v0lumehi v0lumehi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the whole diff, including the engine patch. This is good work and I would merge it after the points below.

What I like:

  • The switch is opt-in and off by default, so nothing changes for anyone who does not turn it on.
  • The decoder checks the report id and the length, reads only up to byte 11 and stays inside the 128 byte buffer. The stick is calibrated once and then scaled with a dead zone and clamped.
  • The new checks in t_pad_hid.c use real samples captured on macOS, and the Swift tests cover the driver and the environment variable.
  • All CI checks are green, the before and after screenshots are there and the patch is forwarded as seedds/nxnative#1322.

Before it merges:

  1. The patch header says Upstream-Status: pending. It should say forwarded seedds/nxnative#1322 (patches/README.md).
  2. #740 and this PR are in v1.1.1, but rc1 is tagged and @LNPANDY is still testing it. Please move both to v1.1.2.
  3. Please try it once with two real Joy-Cons on a Mac and report the result here. I mean connect and disconnect, the player order, and Home on the right half. The samples are real, but I did not see a game played with the split pair.

Smaller points, none of them blocks the merge:

  • IOHIDManagerOpen needs the Input Monitoring permission on macOS. The description of the switch should say so.
  • A split Joy-Con has no rumble, no motion and no battery level in the launcher, because it does not go through GameController. Please write that in the docs.
  • A single Joy-Con half now counts as a gamepad and not as a pair, also without the switch. That looks right to me, but it is a behaviour change.
  • The Qt front end has no switch. This is fine, there is no macOS HID on Windows.

@v0lumehi v0lumehi modified the milestones: v1.1.1, v1.1.2 Nov 5, 2026
Add DM_JOYCON_SPLIT=1 so macOS skips GameController's combined Joy-Con input and reads Joy-Con (L) (0x057e:0x2006) and Joy-Con (R) (0x057e:0x2007) directly over IOHIDManager 0x30 reports as Player 1 and Player 2 sideways controllers with a 90-degree stick and 6-axis IMU rotation, SL/SR mapped to L/R, and per-handle Core Haptics rumble (GCHapticsLocalityLeftHandle and GCHapticsLocalityRightHandle).

Keep the setting in the Controllers sheet (shared by Console Mode and Desktop Mode Settings -> Controls -> Controllers -> Open...) and localize its label across all 6 languages.
@LNPANDY LNPANDY modified the milestones: v1.1.2, v1.1.1 Nov 5, 2026
@LNPANDY
LNPANDY changed the base branch from main to v0lumehi/experimental-builder November 5, 2026 13:18
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 5, 2026
@LNPANDY
LNPANDY changed the base branch from v0lumehi/experimental-builder to main November 5, 2026 14:19
@LNPANDY
LNPANDY merged commit 2058704 into main Nov 5, 2026
18 checks passed
@LNPANDY
LNPANDY deleted the feat/joycon-split branch November 5, 2026 14:19
@wklhtcone

Copy link
Copy Markdown

Additional details and reproduction results

I tested the split Joy-Con functionality with two physical Joy-Con controllers in Super Mario Party Jamboree.

Here are the issues I observed:

  1. Independent connection

When only one Joy-Con is connected (either Left or Right), NX2Apple does not recognize it independently. Both controllers seem to be required for detection.

  1. Controller identification and vibration

When I click the identify button for either the Left or Right Joy-Con in the controller identification interface, both Joy-Cons vibrate simultaneously.

I would expect only the selected Joy-Con to vibrate.

  1. Single Joy-Con recognition in games

With split Joy-Con mode enabled:

  • The Left Joy-Con is correctly assigned to Player 1.
  • The Right Joy-Con is correctly assigned to Player 2.
  • Both controllers can independently control their respective players.
  • Directional inputs and ABXY buttons all work correctly.

However, when entering motion-controlled minigames in Super Mario Party Jamboree, the game displays a prompt asking me to switch to a single Joy-Con controller.

This suggests that although basic input handling is successfully separated, the game may still not recognize each controller as an independent single Joy-Con, particularly regarding controller type and motion-sensing capabilities.

Could you please investigate whether the split controllers are being exposed with the correct device identity, controller type, and motion-sensing capabilities?

Also, could the independent connection and vibration behavior be checked?

Thanks for your work on this feature!

@wklhtcone

Copy link
Copy Markdown

Additional details and reproduction results

I tested the split Joy-Con functionality with two physical Joy-Con controllers in Super Mario Party Jamboree.

Here are the issues I observed:

  1. Independent connection

When only one Joy-Con is connected (either Left or Right), NX2Apple does not recognize it independently. Both controllers seem to be required for detection.

  1. Controller identification and vibration

When I click the identify button for either the Left or Right Joy-Con in the controller identification interface, both Joy-Cons vibrate simultaneously.

I would expect only the selected Joy-Con to vibrate.

  1. Single Joy-Con recognition in games

With split Joy-Con mode enabled:

  • The Left Joy-Con is correctly assigned to Player 1.
  • The Right Joy-Con is correctly assigned to Player 2.
  • Both controllers can independently control their respective players.
  • Directional inputs and ABXY buttons all work correctly.

However, when entering motion-controlled minigames in Super Mario Party Jamboree, the game displays a prompt asking me to switch to a single Joy-Con controller.

This suggests that although basic input handling is successfully separated, the game may still not recognize each controller as an independent single Joy-Con, particularly regarding controller type and motion-sensing capabilities.

Could you please investigate whether the split controllers are being exposed with the correct device identity, controller type, and motion-sensing capabilities?

Also, could the independent connection and vibration behavior be checked?

Thanks for your work on this feature!

Version: 1.2.2

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

Labels

documentation Improvements or additions to documentation launcher The NX2Apple launcher app mac Mac patch-queue Changes the patch queue or the upstream pin windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mac: split a paired Joy-Con into two sideways controllers

3 participants