Skip to content

Switch2Kit: streamline documentation and Qt build wiring for upstream review - #8

Merged
jmonster merged 1 commit into
masterfrom
cleanup/switch2kit-upstream-review
Sep 20, 2026
Merged

jmonster merged 1 commit into
masterfrom
cleanup/switch2kit-upstream-review

Conversation

@jmonster

Copy link
Copy Markdown
Owner

Purpose

Prepare the merged Switch2Kit integration for a smaller, clearer upstream review without changing controller behavior or removing validation. This is a cleanup PR into the fork, not a claim that Dolphin's maintainers have approved the feature or dependency.

Based on master at def69c64a7c55be4961317d8c9b7dc9221eeddf8, after desktop-support PR #5 merged.

Changes

  • Restore Readme.md to the exact upstream merge-base version. The eventual upstream feature diff no longer includes a project rename, personal screenshot, duplicate platform instructions, or fork-specific download promotion.
  • Consolidate setup, builds, package prerequisites and limitations in Docs/Switch2Kit.md. Remove obsolete “while this PR is unmerged” / feature-branch directions. Refer to this repository's workflows using relative paths. Preserve the mapping/backup safeguards, opt-in connection policy, platform prerequisites and distinction between automated checks and hardware acceptance.
  • Declare the three optional mapping source/header files once in the owning Qt target, under ENABLE_SWITCH2KIT, on every platform. Remove the separate non-Apple source list from the parent and the duplicate list from the Apple packaging block. The two CMake files together change by 8 additions and 10 deletions.

Only four files change. No controller C++, profiles, SDK revision, discovery/identity policy, polling, rumble, runtime deployment, signing order, tests or workflows change. No intended functionality or performance change; no performance benchmark is claimed.

Submodule decision

Keep Externals/Switch2Kit pinned to 3d3ce3a605733c47db061af687168ad5914cbf0c.

Dolphin already uses pinned submodules for external dependencies, including SDL and mGBA. Replacing the gitlink with copied SDK sources or a protocol rewrite would add maintenance/review burden without establishing that upstream wants it. This precedent supports the packaging mechanism, not approval of Switch2Kit itself. Maintainers still need to assess the additional Swift toolchain/runtime, dependency maintenance and code/license provenance. This cleanup does not constitute a full dependency or licensing audit.

Validation

Passed against the edited files in a local partial source snapshot:

python Tools/test_switch2kit.py \
  Switch2KitIntegrationTests.test_disabled_build_has_no_dependency \
  Switch2KitIntegrationTests.test_platform_and_backend_configuration
git diff --check

The unchanged test file was verified against its repository blob. The two tests execute real CMake; the platform/backend test covers eight accepted/rejected configurations using a fixture dependency.

An additional local CMake probe evaluated the actual Qt source-definition prefix with placeholder Qt/source files for Linux, Windows and Darwin platform branches, each with the feature ON and OFF. All six cases select each mapping file exactly once when enabled and not at all when disabled. This checks CMake source selection, not native OS compatibility. The existing macOS embed/postprocess/signing and Windows/Linux deployment blocks were also checked to be byte-for-byte unchanged.

Not performed: a complete Dolphin build, the full regression/SDK suites, native application launch, Bluetooth/controller hardware tests or performance measurements. Existing CI must pass for this exact PR head; prior-revision results are not substituted.

Before submitting upstream

The human submitter should review and understand the complete feature, obtain exact-head native build/launch results and record hardware results for the claimed platforms. Resolve dependency/maintenance expectations with upstream rather than treating submodule precedent as acceptance. Refresh against upstream before submission; the reviewed fork base was two commits behind.

AI assistance disclosure: this PR's documentation rewrite and CMake source-list refactor were prepared with AI assistance and require human review. No emulated-console behavior was changed. Dolphin's contribution policy requires human ownership and disclosure of non-trivial generated portions; the eventual upstream submission should disclose the relevant portions of the complete contribution, not just this cleanup.

Restore the upstream README and keep controller setup in Docs/Switch2Kit.md,
without stale feature-branch instructions or fork-specific download URLs.
Declare optional mapping sources once in the Qt target on every platform.

Keep the Switch2Kit pin, feature defaults, runtime code, deployment steps,
and regression suites unchanged. Prepared with AI assistance; human review
and native application/hardware validation remain required.
@jmonster
jmonster merged commit 7fe6e16 into master Sep 20, 2026
8 checks passed
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