Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9e532a1
ci: retain exact host and controller sources for desktop qualification
jmonster Sep 18, 2026
5d2463c
Enable the existing native BlueZ backend in Linux Dolphin builds
jmonster Sep 18, 2026
1412032
Compile controller mapping on non-Apple hosts and remove prose-pin ch…
jmonster Sep 18, 2026
0546995
Build and package native Switch2Kit on Windows x64
jmonster Sep 18, 2026
6f1ec6c
Use the Visual Studio 2026 runner required by upstream Dolphin
jmonster Sep 18, 2026
3c559ab
Fix Windows Switch2Kit toolchain compatibility with Visual Studio 2026
jmonster Sep 18, 2026
4924dd5
Fix the Windows SDL adapter capacity conversion and regress its ABI w…
jmonster Sep 18, 2026
4ca2766
Fix Windows Switch2Kit CI compiler mismatch (#6)
jmonster Sep 19, 2026
9932e2a
Pin the native Windows runtime repair validated in Switch2Kit PR 75
jmonster Sep 19, 2026
e8f8e38
Package Dolphin's actual Swift runtime and qualify extracted desktop …
jmonster Sep 19, 2026
3a5adad
Remove format-only controller CI and build the disabled application w…
jmonster Sep 19, 2026
e700798
Align the SDK pin with the tested extracted-GUI readiness repair
jmonster Sep 19, 2026
f55ff6d
Isolate the headless disabled-build probe and pin the Windows GUI pro…
jmonster Sep 19, 2026
5d8c59f
Preserve the maintained Linux matrix and apply only the isolated Qt p…
jmonster Sep 19, 2026
041a158
Pin the reviewed Windows continuous-discovery reconnect repair
jmonster Sep 19, 2026
ae632e5
Merge master into Switch2Kit desktop branch and resolve controller UI…
jmonster Sep 19, 2026
ae7f587
Merge master README updates after direct local Switch2Kit verification
jmonster Sep 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/native-switch2kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Check controller UI formatting
- name: Check exact-width SDL adapter capacity
run: |
python3 -m venv "$RUNNER_TEMP/formatter"
"$RUNNER_TEMP/formatter/bin/pip" install 'clang-format==21.1.8'
"$RUNNER_TEMP/formatter/bin/clang-format" --dry-run --Werror \
Source/Core/DolphinQt/Config/ControllersPane.cpp \
Source/Core/DolphinQt/Config/GamecubeControllersWidget.cpp \
Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp \
Source/Core/DolphinQt/Config/Mapping/Switch2KitMapping.cpp
git submodule update --init Externals/Switch2Kit Externals/SDL/SDL
CXX=clang++ python3 Tools/test_switch2kit_capacity.py
CXX=g++ python3 Tools/test_switch2kit_capacity.py
- run: python3 Tools/test_switch2kit.py
- run: python3 Tools/test_switch2kit_autoconnect.py
- run: python3 Tools/test_switch2kit_mapping.py --sanitize
Expand Down Expand Up @@ -77,7 +73,7 @@ jobs:
run: brew install cmake ninja nasm automake libtool qt@6
- name: Check source pin and integration
run: |
test "$(git -C Externals/Switch2Kit rev-parse HEAD)" = a9d43b1f63d94f8844755a510bf6ecc876bc8c51
test "$(git -C Externals/Switch2Kit rev-parse HEAD)" = "$(git ls-tree HEAD Externals/Switch2Kit | awk '{print $3}')"
python3 Tools/test_switch2kit.py
python3 Tools/test_switch2kit_autoconnect.py
python3 Tools/test_switch2kit_host.py --sanitize
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/switch2kit-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Switch2Kit desktop platforms
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: switch2kit-desktop-${{ github.ref }}
cancel-in-progress: true
jobs:
source:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Initialize the pinned controller SDK and SDL
run: git submodule update --init Externals/Switch2Kit Externals/SDL/SDL
- name: Archive the exact sources used by the controller integration
run: |
mkdir -p "$RUNNER_TEMP/switch2kit-source"
git archive HEAD -o "$RUNNER_TEMP/switch2kit-source/host.zip"
git -C Externals/Switch2Kit archive HEAD -o "$RUNNER_TEMP/switch2kit-source/sdk.zip"
git -C Externals/SDL/SDL archive HEAD -o "$RUNNER_TEMP/switch2kit-source/sdl.zip"
{
git rev-parse HEAD
git submodule status Externals/Switch2Kit Externals/SDL/SDL
} > "$RUNNER_TEMP/switch2kit-source/revisions.txt"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Switch2Kit-desktop-source
path: ${{ runner.temp }}/switch2kit-source
retention-days: 7
if-no-files-found: error
118 changes: 118 additions & 0 deletions .github/workflows/switch2kit-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Switch2Kit Linux application
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: switch2kit-linux-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-24.04
container: swift:6.2.1-noble
timeout-minutes: 90
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
submodules: recursive
- name: Install native dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential cmake ninja-build python3 pkg-config qt6-base-dev qt6-base-private-dev qt6-svg-dev libbluetooth-dev libevdev-dev libudev-dev libusb-1.0-0-dev libasound2-dev libpulse-dev libx11-dev libxi-dev libxrandr-dev libegl1-mesa-dev libgl1-mesa-dev libsystemd0 dbus xvfb xauth openbox wmctrl x11-utils
git config --global --add safe.directory "$PWD"
- name: Build and install the controller-enabled application
shell: bash
run: |
set -o pipefail
bash Tools/build-switch2kit-linux.sh 2>&1 | tee linux-build.log
- name: Execute controller policies
run: |
python3 Tools/test_switch2kit_mapping.py --sanitize
python3 Tools/test_switch2kit_host.py --sanitize
python3 Tools/test_switch2kit_autoconnect.py
python3 Tools/test_switch2kit_runtime.py
- name: Relocate, resolve native dependencies and launch the installed binary
shell: bash
run: |
set -euo pipefail
mv build-switch2kit/install "$RUNNER_TEMP/Dolphin-Switch2Kit-linux-x86_64"
app="$RUNNER_TEMP/Dolphin-Switch2Kit-linux-x86_64"
mv build-switch2kit "$RUNNER_TEMP/disabled-build-tree"
test -n "$(find "$app" -name libSwitch2KitC.so -print -quit)"
ldd "$app/bin/dolphin-emu" | tee linux-dependencies.log
! grep -q 'not found' linux-dependencies.log
grep -F "$app" linux-dependencies.log | grep libSwitch2KitC
tar -C "$RUNNER_TEMP" -czf Dolphin-Switch2Kit-linux-x86_64.tar.gz Dolphin-Switch2Kit-linux-x86_64
mv "$app" "$RUNNER_TEMP/unavailable-staged-application"
dbus-run-session -- xvfb-run -a python3 Externals/Switch2Kit/tests/emulator-launch/linux.py dolphin \
"$PWD/Dolphin-Switch2Kit-linux-x86_64.tar.gz" --report "$PWD/linux-launch.json" \
--forbidden-root "$PWD" --forbidden-root "$RUNNER_TEMP/disabled-build-tree" \
--forbidden-root "$RUNNER_TEMP/unavailable-staged-application"
- name: Controller-enabled development build
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Dolphin-Switch2Kit-linux-x86_64
path: Dolphin-Switch2Kit-linux-x86_64.tar.gz
retention-days: 14
if-no-files-found: error
- name: Native diagnostics
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Dolphin-Switch2Kit-linux-diagnostics
path: |
linux-*.log
linux-launch.json
retention-days: 7

disabled:
# A complete ordinary application build in an image without Swift. This is
# not a controller-enabled artifact and does not use the SDK build helper.
runs-on: ubuntu-24.04
container: ubuntu:24.04
timeout-minutes: 90
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install ordinary native dependencies without Swift
run: |
apt-get update
apt-get install -y --no-install-recommends git ca-certificates build-essential cmake ninja-build python3 pkg-config qt6-base-dev qt6-base-private-dev qt6-svg-dev libbluetooth-dev libevdev-dev libudev-dev libusb-1.0-0-dev libasound2-dev libpulse-dev libx11-dev libxi-dev libxrandr-dev libegl1-mesa-dev libgl1-mesa-dev libsystemd0 dbus
if command -v swift || command -v swiftc; then
echo 'The backend-disabled qualification image must not contain Swift.' >&2
exit 1
fi
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
submodules: recursive
- name: Build the complete application with Switch2Kit disabled
shell: bash
run: |
set -euo pipefail
git config --global --add safe.directory "$PWD"
cmake -S . -B build-disabled -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DENABLE_SWITCH2KIT=OFF -DENABLE_SDL=ON -DENABLE_QT=ON \
-DUSE_SYSTEM_SDL3=OFF -DENABLE_TESTS=OFF -DENABLE_VULKAN=OFF \
-DENABLE_AUTOUPDATE=OFF 2>&1 | tee disabled-configure.log
cmake --build build-disabled --target dolphin-emu --parallel 3 2>&1 | tee disabled-build.log
ldd build-disabled/Binaries/dolphin-emu | tee disabled-dependencies.log
! grep -q 'not found' disabled-dependencies.log
! grep -Ei 'Switch2Kit|libswift|libFoundation|libdispatch|libBlocksRuntime' disabled-dependencies.log
# Qt initializes for --version too. Keep this disabled-backend smoke
# probe isolated; the enabled archive still requires a real GUI below.
profile=$(mktemp -d)
trap 'rm -rf "$profile"' EXIT
HOME="$profile" XDG_CONFIG_HOME="$profile/config" XDG_CACHE_HOME="$profile/cache" \
QT_QPA_PLATFORM=offscreen build-disabled/Binaries/dolphin-emu --user "$profile/user" --version
- name: Backend-disabled build diagnostics
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Dolphin-without-Switch2Kit-linux-diagnostics
path: disabled-*.log
retention-days: 7
66 changes: 66 additions & 0 deletions .github/workflows/switch2kit-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Switch2Kit Windows application
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: switch2kit-windows-${{ github.ref }}
cancel-in-progress: true
jobs:
windows:
runs-on: windows-2025-vs2026
timeout-minutes: 120
env:
VCPKG_MAX_CONCURRENCY: 3
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
submodules: recursive
- uses: compnerd/gha-setup-swift@397094e75494a93fa8d81db0268dbc8f5d6cf7c6
with:
# Swift 6.2 ships Clang 19, which the VS 2026 STL rejects.
swift-version: swift-6.3.3-release
swift-build: 6.3.3-RELEASE
- name: Build the complete controller-enabled application
shell: pwsh
run: |
& ./Tools/build-switch2kit-windows.ps1 2>&1 | Tee-Object windows-build.log
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Stage and launch the application away from the build tree
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$stage = Join-Path $env:RUNNER_TEMP 'Dolphin-Switch2Kit-windows-x86_64'
New-Item -ItemType Directory -Path $stage | Out-Null
# Robocopy follows directory junctions and copies linked resources.
robocopy 'build-switch2kit-windows/Binaries' $stage /E /NFL /NDL /NJH /NJS
if ($LASTEXITCODE -ge 8) { throw 'Application staging failed.' }
$global:LASTEXITCODE = 0
# Never distribute a developer/test profile. The supervisor seeds only
# its private extracted copy, after the distributable archive is made.
foreach ($profile in @('User', 'user', 'portable', 'portable.txt', 'settings.xml')) {
if (Test-Path (Join-Path $stage $profile)) { throw "Unexpected profile in application staging: $profile" }
}
Move-Item build-switch2kit-windows "$env:RUNNER_TEMP/disabled-build-tree"
Compress-Archive -Path $stage -DestinationPath 'Dolphin-Switch2Kit-windows-x86_64.zip'
Move-Item $stage "$env:RUNNER_TEMP/unavailable-staged-application"
& ./Tools/test_switch2kit_windows_launch.ps1 -Archive 'Dolphin-Switch2Kit-windows-x86_64.zip' -ForbiddenRoot "$PWD"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Controller-enabled development application
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Dolphin-Switch2Kit-windows-x86_64
path: Dolphin-Switch2Kit-windows-x86_64.zip
retention-days: 14
if-no-files-found: error
- name: Native diagnostics
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: Dolphin-Switch2Kit-windows-diagnostics
path: |
windows-*.log
windows-launch.json
retention-days: 7
13 changes: 8 additions & 5 deletions CMake/DolphinSwitch2Kit.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Optional host input only. Disabled builds do not require Swift or change deployment targets.
option(ENABLE_SWITCH2KIT "Enable native Switch 2 controllers on macOS 15+" OFF)
option(ENABLE_SWITCH2KIT "Enable native Switch 2 controllers" OFF)
if(NOT ENABLE_SWITCH2KIT)
return()
endif()
if(NOT APPLE OR NOT ENABLE_SDL OR NOT ENABLE_QT)
message(FATAL_ERROR "Switch2Kit requires macOS and the SDL and Qt backends")
if(NOT (APPLE OR WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
message(FATAL_ERROR "Switch2Kit requires a macOS, Windows or Linux desktop host")
endif()
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 15.0)
message(FATAL_ERROR "Switch2Kit requires -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 or newer")
if(NOT ENABLE_SDL OR NOT ENABLE_QT)
message(FATAL_ERROR "Switch2Kit requires the SDL and Qt backends")
endif()
if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 15.0))
message(FATAL_ERROR "Switch2Kit requires -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 or newer on macOS")
endif()
set(_switch2kit_source "${PROJECT_SOURCE_DIR}/Externals/Switch2Kit")
if(NOT EXISTS "${_switch2kit_source}/Integrations/SDL3/CMakeLists.txt")
Expand Down
Loading
Loading