Skip to content

DolphinQt: make Switch 2 settings a native controller section - #7

Merged
jmonster merged 1 commit into
masterfrom
ui/switch2-controller-section
Sep 19, 2026
Merged

jmonster merged 1 commit into
masterfrom
ui/switch2-controller-section

Conversation

@jmonster

Copy link
Copy Markdown
Owner

Design decision

Keep Standard Controller as the emulated GameCube controller type. The adjacent physical-device dropdown already selects a Switch 2 controller and applies its recommended mapping. Bluetooth pairing is a shared host-device operation, not another emulated console device type.

Renaming or adding a Switch 2 entry in the emulated-type dropdown would mix those concepts and require special handling for multiple ports, settings reloads, explicit disconnect, and devices also used for Wii mappings. This change instead makes the existing pairing flow visible and consistent without adding another discovery trigger.

Changes

  • Put Switch 2 controls in a native Switch 2 Controllers QGroupBox, between Wii Remotes and Common, using the existing controller sections' grid spacing rather than custom styling.
  • Use one compact row: Automatically connect, Find Controllers, Disconnect All. Keep connection status and short setup instructions inside the group; retain detailed tooltips and explicit accessible names.
  • Keep section construction in a small, feature-guarded helper. Construct Common after the Switch 2 section so keyboard traversal follows the visual order. Scope the existing status timer and signal connections to the group's lifetime.
  • Refresh the displayed backend state immediately after each explicit action, including saved-setting failures. Keep signal blocking so display updates never reapply connection policy.
  • Reuse Dolphin's non-default action buttons, so pairing/disconnection do not become dialog-default actions.
  • Update the README and controller guide to use the new names and explain the physical/emulated distinction. The upstream README reference section is unchanged.

No changes to console emulation, controller-type values, profiles, port assignment, Bluetooth transport, SDK pins, config format, or auto-connect defaults. Manual discovery, saved opt-in, explicit stop, and mapping protections continue through the existing backend APIs.

Validation

Passed locally against the changed files:

python Tools/test_switch2kit_autoconnect.py \
  AutomaticConnectionWiringTests.test_checkbox_updates_do_not_start_or_remap_controllers \
  AutomaticConnectionWiringTests.test_section_initialization_does_not_change_connection_policy \
  AutomaticConnectionWiringTests.test_user_actions_refresh_the_displayed_backend_state
python -m py_compile Tools/test_switch2kit_autoconnect.py
git diff --check

The two additional checks protect connection-policy and immediate-state-refresh behavior; they do not lock down label wording or layout coordinates.

The local environment has no Qt/macOS SDK, so a complete application build, native visual review, and physical Bluetooth pairing have not been performed locally. The existing Native Switch2Kit PR workflow supplies formatting, regression, SDK, and macOS application build checks; their outcome must be checked rather than assumed.

Suggested native review: confirm section alignment/wrapping and keyboard order; exercise Find, auto-connect enable/disable, explicit Disconnect All, Bluetooth off/denied access, and settings reopen; verify that an explicit stop remains stopped and saved mappings are unchanged.

Integration

This is a focused PR based on master at 064e7dd90e8f1e2aef039bae83d2affada2a0368. Draft cross-platform PR #5 is left untouched. If #5 lands first, rebase this UI change while retaining its platform-specific diagnostics and setup documentation.

AI assistance disclosure: the UI refactor, documentation edits, and added checks were prepared with AI assistance and require human review. No controller protocol or emulated-console behavior was changed.

Use a native Switch 2 Controllers group with compact actions and status,
keeping physical discovery separate from emulated GameCube port types.
Refresh state immediately after explicit actions and preserve saved
connection policy, mapping behavior, and backend-disabled builds.

Update setup instructions and add connection-policy/UI refresh guards.
Prepared with AI assistance; no console emulation or transport changes.

Copy link
Copy Markdown
Owner Author

Validation update for 23d4e459449c9cad2d5470f615fd901afe7216d5 (PR merge test ref 1f8375bbbfcf555a32ae20862f1a2145927ec4f9):

The Native Switch2Kit wiring job has passed, including clang-format 21.1.8, all 8 integration/preset checks, all 6 automatic-connection/UI wiring checks, and the compiled mapping and host lifecycle/identity regression programs with sanitizers. I inspected the completed job log, not just the workflow configuration.

At this check, the SDK regression job and complete macOS arm64/x86_64 application jobs are still queued. Native visual review and real Bluetooth/controller acceptance remain unperformed; the passing source/host tests are not a claim that those checks have passed.

The published diff contains only the five intended UI/documentation/test files. GitHub currently reports this PR mergeable; no merge or changes to cross-platform PR #5 have been made.

@jmonster
jmonster merged commit c6527dc into master Sep 19, 2026
4 checks passed
@jmonster
jmonster deleted the ui/switch2-controller-section branch September 19, 2026 17:19
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.

1 participant