Add SDL3 support alongside SDL2

Add optional SDL3 support while keeping SDL2 as the default. SDL3 builds
must be selected explicitly with the SYSTEM3_SDL_VERSION CMake option.

Centralize most SDL2/SDL3 API differences behind compatibility interfaces.
Audio playback uses a dedicated SDL3 backend based on SDL3 audio streams,
implemented separately in mako_sdl3.cpp.

Android and Nintendo Switch remain on SDL2 for now.
This commit is contained in:
kichikuou
2026-09-16 08:44:23 +09:00
parent 647a5aa326
commit 3e32da1d37
40 changed files with 1475 additions and 266 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
name: Nintendo Switch SDL2
steps:
- uses: actions/checkout@v6
@@ -15,7 +16,8 @@ jobs:
run: |
mkdir -p out/switch
cd out/switch
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -DCMAKE_BUILD_TYPE=Release ../../
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake \
-DCMAKE_BUILD_TYPE=Release -DSYSTEM3_SDL_VERSION=2 ../../
make -j4
mkdir system3
mv system3.* system3/