Procházet zdrojové kódy

Merge branch 'main' into wip/angle-egl

Ryan C. Gordon před 2 roky
rodič
revize
dcd9e21966
100 změnil soubory, kde provedl 1225 přidání a 3001 odebrání
  1. 1 1
      .editorconfig
  2. 7 7
      .github/workflows/android.yml
  3. 10 4
      .github/workflows/emscripten.yml
  4. 16 16
      .github/workflows/main.yml
  5. 4 4
      .github/workflows/msvc.yml
  6. 2 2
      .github/workflows/n3ds.yml
  7. 6 6
      .github/workflows/ps2.yaml
  8. 6 6
      .github/workflows/psp.yaml
  9. 3 3
      .github/workflows/riscos.yml
  10. 6 6
      .github/workflows/vita.yaml
  11. 0 1
      .github/workflows/vmactions.yml
  12. 0 35
      .github/workflows/watcom.yml
  13. 1 10
      .gitignore
  14. 3 2
      .wikiheaders-options
  15. 5 5
      Android.mk
  16. 425 488
      CMakeLists.txt
  17. 30 30
      Makefile.in
  18. 2 2
      Makefile.minimal
  19. 0 296
      Makefile.os2
  20. 0 64
      Makefile.pandora
  21. 0 280
      Makefile.w32
  22. 1 1
      README.md
  23. 0 65
      SDL2Config.cmake.in
  24. 3 3
      SDL3.spec.in
  25. 65 0
      SDL3Config.cmake.in
  26. 3 3
      VisualC-GDK/SDL.sln
  27. 2 3
      VisualC-GDK/SDL/SDL.vcxproj
  28. 3 9
      VisualC-GDK/SDL/SDL.vcxproj.filters
  29. 2 2
      VisualC-GDK/SDLmain/SDLmain.vcxproj
  30. 2 2
      VisualC-GDK/SDLtest/SDLtest.vcxproj
  31. 4 4
      VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config
  32. 4 10
      VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config
  33. 4 4
      VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config
  34. 4 4
      VisualC-GDK/tests/testgdk/wingdk/MicrosoftGame.config
  35. 4 4
      VisualC-GDK/tests/testgdk/xboxone/MicrosoftGame.config
  36. 4 4
      VisualC-GDK/tests/testgdk/xboxseries/MicrosoftGame.config
  37. 4 4
      VisualC-GDK/tests/testsprite2/wingdk/MicrosoftGame.config
  38. 4 4
      VisualC-GDK/tests/testsprite2/xboxone/MicrosoftGame.config
  39. 4 4
      VisualC-GDK/tests/testsprite2/xboxseries/MicrosoftGame.config
  40. 1 1
      VisualC-WinRT/SDL-UWP.sln
  41. 10 10
      VisualC-WinRT/SDL-UWP.vcxproj
  42. 4 1
      VisualC-WinRT/SDL-UWP.vcxproj.filters
  43. 3 3
      VisualC/SDL.sln
  44. 2 3
      VisualC/SDL/SDL.vcxproj
  45. 3 9
      VisualC/SDL/SDL.vcxproj.filters
  46. 1 1
      VisualC/SDLmain/SDLmain.vcxproj
  47. 1 1
      VisualC/SDLtest/SDLtest.vcxproj
  48. 0 111
      VisualC/pkg-support/cmake/sdl2-config.cmake
  49. 3 3
      VisualC/pkg-support/cmake/sdl3-config-version.cmake
  50. 111 0
      VisualC/pkg-support/cmake/sdl3-config.cmake
  51. 0 217
      VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj
  52. 0 308
      VisualC/visualtest/visualtest_VS2012.vcxproj
  53. 32 1
      WhatsNew.txt
  54. 49 49
      Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
  55. 1 1
      Xcode-iOS/Demos/README
  56. 3 3
      Xcode-iOS/Demos/config.xcconfig
  57. 2 2
      Xcode-iOS/Demos/src/accelerometer.c
  58. 1 1
      Xcode-iOS/Demos/src/happy.c
  59. 1 1
      Xcode-iOS/Demos/src/keyboard.c
  60. 1 1
      Xcode-iOS/Demos/src/rectangles.c
  61. 1 1
      Xcode-iOS/Demos/src/touch.c
  62. 2 2
      Xcode/SDL/Info-Framework.plist
  63. 69 63
      Xcode/SDL/SDL.xcodeproj/project.pbxproj
  64. 2 2
      Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/Framework-iOS.xcscheme
  65. 2 2
      Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/xcFramework-iOS.xcscheme
  66. 0 0
      Xcode/SDL/SDL3/Info.plist
  67. 1 1
      Xcode/SDL/pkg-support/SDL.info
  68. 0 69
      Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
  69. 3 3
      Xcode/SDL/pkg-support/resources/CMake/sdl3-config-version.cmake
  70. 69 0
      Xcode/SDL/pkg-support/resources/CMake/sdl3-config.cmake
  71. 5 5
      Xcode/SDL/pkg-support/resources/ReadMe.txt
  72. binární
      Xcode/SDL/pkg-support/resources/SDL_DS_Store
  73. 33 33
      Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
  74. 3 3
      Xcode/SDLTest/config.xcconfig
  75. 0 173
      acinclude/esd.m4
  76. 1 1
      android-project-ant/jni/src/Android.mk
  77. 1 1
      android-project-ant/jni/src/Android_static.mk
  78. 1 1
      android-project/app/jni/src/Android.mk
  79. 2 2
      android-project/app/jni/src/CMakeLists.txt
  80. 9 9
      android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  81. 2 2
      build-scripts/android-prefab.sh
  82. 1 1
      build-scripts/androidbuildlibs.sh
  83. 3 3
      build-scripts/emscripten-buildbot.sh
  84. 10 41
      build-scripts/fnsince.pl
  85. 0 61
      build-scripts/nacl-buildbot.sh
  86. 0 105
      build-scripts/naclbuild.sh
  87. 7 7
      build-scripts/raspberrypi-buildbot.sh
  88. 2 2
      build-scripts/showrev.sh
  89. 21 22
      build-scripts/test-versioning.sh
  90. 4 8
      build-scripts/update-version.sh
  91. 1 1
      build-scripts/updaterev.sh
  92. 3 3
      build-scripts/windows-buildbot-zipper.bat
  93. 1 1
      cmake/macros.cmake
  94. 41 196
      cmake/sdlchecks.cmake
  95. 42 42
      cmake/test/CMakeLists.txt
  96. 3 3
      cmake/test/jni/Android.mk
  97. 1 1
      cmake/test/main_cli.c
  98. 2 2
      cmake/test/main_gui.c
  99. 1 1
      cmake/test/main_lib.c
  100. 3 3
      cmake/test/test_pkgconfig.sh

+ 1 - 1
.editorconfig

@@ -16,7 +16,7 @@ indent_style = space
 indent_size = 4
 indent_style = space
 
-[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
+[{CMakeLists.txt,sdl3-config*.cmake.in,cmake/*.cmake}]
 indent_size = 2
 indent_style = space
 

+ 7 - 7
.github/workflows/android.yml

@@ -50,7 +50,7 @@ jobs:
         if: ${{ matrix.platform.name == 'CMake' }}
         run: |
           cmake --install build --config Release
-          echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
+          echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
           ( cd prefix; find ) | LC_ALL=C sort -u
       - name: Verify CMake configuration files
         if: ${{ matrix.platform.name == 'CMake' }}
@@ -60,22 +60,22 @@ jobs:
             -DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
             -DANDROID_ABI=${{ matrix.platform.android_abi }} \
             -DCMAKE_BUILD_TYPE=Release \
-            -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
+            -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
           cmake --build cmake_config_build --verbose
-      - name: Verify sdl2-config
+      - name: Verify sdl3-config
         if: ${{ matrix.platform.name == 'CMake' }}
         run: |
           export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
-          export PATH=${{ env.SDL2_DIR }}/bin:$PATH
+          export PATH=${{ env.SDL3_DIR }}/bin:$PATH
           cmake/test/test_sdlconfig.sh
-      - name: Verify sdl2.pc
+      - name: Verify sdl3.pc
         if: ${{ matrix.platform.name == 'CMake' }}
         run: |
           export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
-          export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
+          export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
           cmake/test/test_pkgconfig.sh
       - name: Verify Android.mk
         if: ${{ matrix.platform.name == 'CMake' }}
         run: |
-          export NDK_MODULE_PATH=${{ env.SDL2_DIR }}/share/ndk-modules
+          export NDK_MODULE_PATH=${{ env.SDL3_DIR }}/share/ndk-modules
           ndk-build -C ${{ github.workspace }}/cmake/test APP_PLATFORM=android-${{ matrix.platform.android_platform }} APP_ABI=${{ matrix.platform.android_abi }} NDK_OUT=$PWD NDK_LIBS_OUT=$PWD V=1

+ 10 - 4
.github/workflows/emscripten.yml

@@ -10,6 +10,10 @@ jobs:
       - uses: mymindstorm/setup-emsdk@v10
         with:
           version: 2.0.32
+      - name: Install ninja
+        run: |
+          sudo apt-get -y update
+          sudo apt-get install -y ninja-build
       - name: Configure CMake
         run: |
           emcmake cmake -S . -B build \
@@ -17,17 +21,19 @@ jobs:
             -DSDL_TESTS=ON \
             -DSDL_INSTALL_TESTS=ON \
             -DCMAKE_BUILD_TYPE=Release \
-            -DCMAKE_INSTALL_PREFIX=prefix
+            -DCMAKE_INSTALL_PREFIX=prefix \
+            -GNinja
       - name: Build
         run: cmake --build build/ --verbose
       - name: Run build-time tests
         run: |
           set -eu
           export SDL_TESTS_QUICK=1
-          ctest -VV --test-dir build/
+          # FIXME: enable Emscripten build time tests
+          # ctest -VV --test-dir build/
       - name: Install
         run: |
-          echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
+          echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
           cmake --install build/
       - name: Verify CMake configuration files
         run: |
@@ -35,5 +41,5 @@ jobs:
             -DCMAKE_BUILD_TYPE=Release \
             -DSDL_VENDOR_INFO="Github Workflow" \
             -DTEST_SHARED=FALSE \
-            -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
+            -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
           cmake --build cmake_config_build --verbose

+ 16 - 16
.github/workflows/main.yml

@@ -88,15 +88,15 @@ jobs:
         ctest -VV --test-dir build/
         if test "${{ runner.os }}" = "Linux"; then
           # This should show us the SDL_REVISION
-          strings build/libSDL2-2.0.so.0 | grep SDL-
+          strings build/libSDL3-3.0.so.0 | grep SDL-
         fi
     - name: Install (CMake)
       if: "! matrix.platform.autotools"
       run: |
         set -eu
         cmake --install build/ --config Release
-        echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
-        ( cd cmake_prefix; find ) | LC_ALL=C sort -u
+        echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
+        ( cd cmake_prefix; find . ) | LC_ALL=C sort -u
     - name: Configure (Autotools)
       if: matrix.platform.autotools
       run: |
@@ -123,8 +123,8 @@ jobs:
               --x-libraries="/usr/lib/${multiarch}" \
               --prefix=${{ github.workspace }}/autotools_prefix \
               SDL_CFLAGS="-I${curdir}/include" \
-              SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
-              ac_cv_lib_SDL2_ttf_TTF_Init=no \
+              SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL3" \
+              ac_cv_lib_SDL3_ttf_TTF_Init=no \
               ${NULL+}
           )
         fi
@@ -147,7 +147,7 @@ jobs:
         make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
         if test "${{ runner.os }}" = "Linux"; then
           # This should show us the SDL_REVISION
-          strings "${curdir}/build-autotools/build/.libs/libSDL2-2.0.so.0" | grep SDL-
+          strings "${curdir}/build-autotools/build/.libs/libSDL3-3.0.so.0" | grep SDL-
         fi
     - name: Install (Autotools)
       if: matrix.platform.autotools
@@ -160,20 +160,20 @@ jobs:
           make -j"${parallel}" -C build-autotools/test install V=1
         fi
         ( cd autotools_prefix; find . ) | LC_ALL=C sort -u
-        echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
+        echo "SDL3_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
     - name: Verify CMake configuration files
       run: |
         cmake -S cmake/test -B cmake_config_build -G Ninja \
           -DCMAKE_BUILD_TYPE=Release \
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
         cmake --build cmake_config_build --verbose
-    - name: Verify sdl2-config
+    - name: Verify sdl3-config
       run: |
-        export PATH=${{ env.SDL2_DIR }}/bin:$PATH
+        export PATH=${{ env.SDL3_DIR }}/bin:$PATH
         cmake/test/test_sdlconfig.sh
-    - name: Verify sdl2.pc
+    - name: Verify sdl3.pc
       run: |
-        export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
+        export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
         cmake/test/test_pkgconfig.sh
     - name: Distcheck (Autotools)
       if: matrix.platform.autotools
@@ -184,9 +184,9 @@ jobs:
         # Similar to Automake `make distcheck`: check that the tarball
         # release is sufficient to do a new build
         mkdir distcheck
-        tar -C distcheck -zxf build-autotools/SDL2-*.tar.gz
-        ( cd distcheck/SDL2-* && ./configure )
-        make -j"${parallel}" -C distcheck/SDL2-*
+        tar -C distcheck -zxf build-autotools/SDL3-*.tar.gz
+        ( cd distcheck/SDL3-* && ./configure )
+        make -j"${parallel}" -C distcheck/SDL3-*
     - name: Run installed-tests (Autotools)
       if: "runner.os == 'Linux' && matrix.platform.autotools"
       run: |
@@ -203,4 +203,4 @@ jobs:
             LD_LIBRARY_PATH=/usr/local/lib \
             SDL_AUDIODRIVER=dummy \
             SDL_VIDEODRIVER=dummy \
-            ginsttest-runner --tap SDL2
+            ginsttest-runner --tap SDL3

+ 4 - 4
.github/workflows/msvc.yml

@@ -44,7 +44,7 @@ jobs:
         -DSDL_TESTS=ON `
         -DSDL_INSTALL_TESTS=ON `
         -DSDL_VENDOR_INFO="Github Workflow" `
-        -DSDL2_DISABLE_INSTALL=OFF `
+        -DSDL3_DISABLE_INSTALL=OFF `
         ${{ matrix.platform.flags }} `
         -DCMAKE_INSTALL_PREFIX=prefix
     - name: Build (CMake)
@@ -56,19 +56,19 @@ jobs:
         ctest -VV --test-dir build/ -C Release
     - name: Install (CMake)
       run: |
-        echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
+        echo "SDL3_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
         cmake --install build/
     - name: Verify CMake configuration files
       if: ${{ !contains(matrix.platform.name, 'UWP') }}  # FIXME: cmake/test/CMakeLists.txt should support UWP
       run: |
         cmake -S cmake/test -B cmake_config_build `
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} `
           ${{ matrix.platform.flags }}
         cmake --build cmake_config_build --config Release
 
     - name: Add msbuild to PATH
       if: ${{ matrix.platform.project != '' }}
-      uses: microsoft/setup-msbuild@v1.0.2
+      uses: microsoft/setup-msbuild@v1.1.3
     - name: Build msbuild
       if: ${{ matrix.platform.project != '' }}
       run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}

+ 2 - 2
.github/workflows/n3ds.yml

@@ -27,7 +27,7 @@ jobs:
         run: cmake --build build --verbose
       - name: Install CMake
         run: |
-          echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
+          echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
           cmake --install build/
           ( cd prefix; find ) | LC_ALL=C sort -u
       - name: Verify CMake configuration files
@@ -35,7 +35,7 @@ jobs:
           cmake -S cmake/test -B cmake_config_build -G Ninja \
             -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
             -DTEST_SHARED=FALSE \
-            -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+            -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
             -DCMAKE_BUILD_TYPE=Release
           cmake --build cmake_config_build --verbose
       # Not running test_pkgconfig.sh and test_sdlconfig.sh

+ 6 - 6
.github/workflows/ps2.yaml

@@ -36,7 +36,7 @@ jobs:
       run: |
         set -eu
         cmake --install build/ --config Release
-        echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
+        echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
         ( cd cmake_prefix; find ) | LC_ALL=C sort -u
 
     - name: Verify CMake configuration files
@@ -44,20 +44,20 @@ jobs:
         cmake -S cmake/test -B cmake_config_build -G Ninja \
           -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
           -DTEST_SHARED=FALSE \
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
           -DCMAKE_BUILD_TYPE=Release
         cmake --build cmake_config_build --verbose
-    - name: Verify sdl2-config
+    - name: Verify sdl3-config
       run: |
         export CC=mips64r5900el-ps2-elf-gcc
-        export PATH=${{ env.SDL2_DIR }}/bin:$PATH
+        export PATH=${{ env.SDL3_DIR }}/bin:$PATH
         export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
         cmake/test/test_sdlconfig.sh
-    - name: Verify sdl2.pc
+    - name: Verify sdl3.pc
       run: |
         export CC=mips64r5900el-ps2-elf-gcc
         export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
-        export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
+        export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
         cmake/test/test_pkgconfig.sh
     
     - name: Get short SHA

+ 6 - 6
.github/workflows/psp.yaml

@@ -25,26 +25,26 @@ jobs:
       run: cmake --build build --config Release
     - name: Install
       run: |
-        echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
+        echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
         cmake --install build --config Release
         ( cd prefix; find ) | LC_ALL=C sort -u
     - name: Verify CMake configuration files
       run: |
         cmake -S cmake/test -B cmake_config_build \
           -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
           -DTEST_SHARED=FALSE \
           -DCMAKE_BUILD_TYPE=Release
         cmake --build cmake_config_build --verbose
-    - name: Verify sdl2-config
+    - name: Verify sdl3-config
       run: |
         export CC=psp-gcc
-        export PATH=${{ env.SDL2_DIR }}/bin:$PATH
+        export PATH=${{ env.SDL3_DIR }}/bin:$PATH
         export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
         cmake/test/test_sdlconfig.sh
-    - name: Verify sdl2.pc
+    - name: Verify sdl3.pc
       run: |
         export CC=psp-gcc
-        export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
+        export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
         export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
         cmake/test/test_pkgconfig.sh

+ 3 - 3
.github/workflows/riscos.yml

@@ -34,7 +34,7 @@ jobs:
     - name: Install (autotools)
       if: ${{ contains(matrix.platform.name, 'autotools') }}
       run: |
-        echo "SDL2_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
+        echo "SDL3_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
         make -C build_autotools install
         ( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
     - name: Configure (CMake)
@@ -55,14 +55,14 @@ jobs:
     - name: Install (CMake)
       if: ${{ contains(matrix.platform.name, 'CMake') }}
       run: |
-        echo "SDL2_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
+        echo "SDL3_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
         cmake --install build/
         ( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
     - name: Verify CMake configuration files
       run: |
         cmake -S cmake/test -B cmake_config_build -G Ninja \
           -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
           -DCMAKE_BUILD_TYPE=Release \
           ${{ matrix.platform.test_args }}
         cmake --build cmake_config_build --verbose

+ 6 - 6
.github/workflows/vita.yaml

@@ -30,7 +30,7 @@ jobs:
       run: cmake --build build --verbose
     - name: Install CMake
       run: |
-        echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
+        echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
         cmake --install build/
         ( cd prefix; find ) | LC_ALL=C sort -u
     - name: Verify CMake configuration files
@@ -38,16 +38,16 @@ jobs:
         cmake -S cmake/test -B cmake_config_build -G Ninja \
           -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
           -DTEST_SHARED=FALSE \
-          -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
+          -DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
           -DCMAKE_BUILD_TYPE=Release
         cmake --build cmake_config_build --verbose
-    - name: Verify sdl2-config
+    - name: Verify sdl3-config
       run: |
         export CC=arm-vita-eabi-gcc
-        export PATH=${{ env.SDL2_DIR }}/bin:$PATH
+        export PATH=${{ env.SDL3_DIR }}/bin:$PATH
         cmake/test/test_sdlconfig.sh
-    - name: Verify sdl2.pc
+    - name: Verify sdl3.pc
       run: |
         export CC=arm-vita-eabi-gcc
-        export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
+        export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
         cmake/test/test_pkgconfig.sh

+ 0 - 1
.github/workflows/vmactions.yml

@@ -33,7 +33,6 @@ jobs:
               libinotify \
               alsa-lib \
               jackit \
-              nas \
               pipewire \
               pulseaudio \
               sndio \

+ 0 - 35
.github/workflows/watcom.yml

@@ -1,35 +0,0 @@
-name: Build (OpenWatcom)
-
-on: [push, pull_request]
-
-jobs:
-  os2:
-    name: ${{ matrix.platform.name }}
-    runs-on: windows-latest
-
-    strategy:
-      matrix:
-        platform:
-        - { name: Windows, makefile: Makefile.w32 }
-        - { name: OS/2,    makefile: Makefile.os2 }
-
-    steps:
-      - uses: actions/checkout@v3
-      - uses: open-watcom/setup-watcom@v0
-      - name: Build SDL2
-        run: |
-          wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
-      - name: Build tests
-        run: |
-          cd test && wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
-          cd ..
-      - name: Run tests
-        if: "matrix.platform.makefile == 'Makefile.w32'"
-        run: |
-          cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
-          cd ..
-      - name: distclean
-        run: |
-          wmake -f ${{ matrix.platform.makefile }} distclean
-          cd test && wmake -f ${{ matrix.platform.makefile }} distclean
-          cd ..

+ 1 - 10
.gitignore

@@ -15,7 +15,7 @@ build
 gen
 Build
 buildbot
-/VERSION
+/VERSION.txt
 
 *.so
 *.so.*
@@ -88,15 +88,6 @@ VisualC/tests/testscale/icon.bmp
 VisualC/tests/testscale/sample.bmp
 VisualC/tests/testsprite2/icon.bmp
 VisualC/tests/testyuv/testyuv.bmp
-VisualC/visualtest/icon.bmp
-VisualC/visualtest/testquit.actions
-VisualC/visualtest/testquit.config
-VisualC/visualtest/testquit.exe
-VisualC/visualtest/testquit.parameters
-VisualC/visualtest/testsprite2.exe
-VisualC/visualtest/testsprite2_sample.actions
-VisualC/visualtest/testsprite2_sample.config
-VisualC/visualtest/testsprite2_sample.parameters
 VisualC-GDK/**/Layout
 
 # for Android

+ 3 - 2
.wikiheaders-options

@@ -1,5 +1,5 @@
-projectfullname = SDL_mixer
-projectshortname = SDL_mixer
+projectfullname = SDL
+projectshortname = SDL
 incsubdir = include
 wikisubdir =
 apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
@@ -13,3 +13,4 @@ projecturl = https://libsdl.org/
 wikiurl = https://wiki.libsdl.org
 bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
 warn_about_missing = 0
+wikipreamble = (This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

+ 5 - 5
Android.mk

@@ -8,7 +8,7 @@ LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := SDL2
+LOCAL_MODULE := SDL3
 
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
 
@@ -97,9 +97,9 @@ include $(BUILD_SHARED_LIBRARY)
 #
 ###########################
 
-LOCAL_MODULE := SDL2_static
+LOCAL_MODULE := SDL3_static
 
-LOCAL_MODULE_FILENAME := libSDL2
+LOCAL_MODULE_FILENAME := libSDL3
 
 LOCAL_LDLIBS :=
 
@@ -120,9 +120,9 @@ include $(CLEAR_VARS)
 
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
 
-LOCAL_MODULE := SDL2_main
+LOCAL_MODULE := SDL3_main
 
-LOCAL_MODULE_FILENAME := libSDL2main
+LOCAL_MODULE_FILENAME := libSDL3main
 
 include $(BUILD_STATIC_LIBRARY)
 

+ 425 - 488
CMakeLists.txt

@@ -3,12 +3,12 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
 endif()
 
 cmake_minimum_required(VERSION 3.0.0)
-project(SDL2 C CXX)
+project(SDL3 C CXX)
 
 if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
-  set(SDL2_SUBPROJECT OFF)
+  set(SDL3_SUBPROJECT OFF)
 else()
-  set(SDL2_SUBPROJECT ON)
+  set(SDL3_SUBPROJECT ON)
 endif()
 
 if (HAIKU)
@@ -46,7 +46,7 @@ if(POLICY CMP0054)
 endif()
 
 # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
-# !!! FIXME:  for the SDL2 shared library (so you get an
+# !!! FIXME:  for the SDL shared library (so you get an
 # !!! FIXME:  install_name ("soname") of "@rpath/libSDL-whatever.dylib"
 # !!! FIXME:  instead of "/usr/local/lib/libSDL-whatever.dylib"), but I'm
 # !!! FIXME:  punting for now and leaving the existing behavior. Until this
@@ -67,13 +67,14 @@ include(CheckCXXCompilerFlag)
 include(CheckStructHasMember)
 include(CMakeDependentOption)
 include(CMakePushCheckState)
-include(FindPkgConfig)
 include(GNUInstallDirs)
 
-list(APPEND CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake")
-include(${SDL2_SOURCE_DIR}/cmake/macros.cmake)
-include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
-include(${SDL2_SOURCE_DIR}/cmake/CheckCPUArchitecture.cmake)
+find_package(PkgConfig)
+
+list(APPEND CMAKE_MODULE_PATH "${SDL3_SOURCE_DIR}/cmake")
+include(${SDL3_SOURCE_DIR}/cmake/macros.cmake)
+include(${SDL3_SOURCE_DIR}/cmake/sdlchecks.cmake)
+include(${SDL3_SOURCE_DIR}/cmake/CheckCPUArchitecture.cmake)
 
 # Enable large file support on 32-bit glibc, so that we can access files
 # with large inode numbers
@@ -83,8 +84,8 @@ if (LIBC_IS_GLIBC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
 endif()
 
 # See docs/release_checklist.md
-set(SDL_MAJOR_VERSION 2)
-set(SDL_MINOR_VERSION 25)
+set(SDL_MAJOR_VERSION 3)
+set(SDL_MINOR_VERSION 0)
 set(SDL_MICRO_VERSION 0)
 set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
 
@@ -97,15 +98,15 @@ mark_as_advanced(CMAKE_IMPORT_LIBRARY_SUFFIX SDL_CMAKE_DEBUG_POSTFIX)
 # Calculate a libtool-like version number
 math(EXPR SDL_BINARY_AGE "${SDL_MINOR_VERSION} * 100 + ${SDL_MICRO_VERSION}")
 if(SDL_MINOR_VERSION MATCHES "[02468]$")
-    # Stable branch, 2.24.1 -> libSDL2-2.0.so.0.2400.1
+    # Stable branch, 3.24.1 -> libSDL3-3.0.so.0.2400.1
     set(SDL_INTERFACE_AGE ${SDL_MICRO_VERSION})
 else()
-    # Development branch, 2.23.1 -> libSDL2-2.0.so.0.2301.0
+    # Development branch, 3.23.1 -> libSDL3-3.0.so.0.2301.0
     set(SDL_INTERFACE_AGE 0)
 endif()
 
 # Increment this if there is an incompatible change - but if that happens,
-# we should rename the library from SDL2 to SDL3, at which point this would
+# we should rename the library from SDL3 to SDL4, at which point this would
 # reset to 0 anyway.
 set(LT_MAJOR "0")
 
@@ -113,10 +114,10 @@ math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
 math(EXPR LT_CURRENT "${LT_MAJOR} + ${LT_AGE}")
 set(LT_REVISION "${SDL_INTERFACE_AGE}")
 # For historical reasons, the library name redundantly includes the major
-# version twice: libSDL2-2.0.so.0.
+# version twice: libSDL3-3.0.so.0.
 # TODO: in SDL 3, set the OUTPUT_NAME to plain SDL3, which will simplify
 # it to libSDL3.so.0
-set(LT_RELEASE "2.0")
+set(LT_RELEASE "3.0")
 set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
 
 # The following should match the versions in the Xcode project file.
@@ -145,7 +146,7 @@ else()
   set(ARCH_64 FALSE)
   set(PROCESSOR_ARCH "x86")
 endif()
-set(LIBNAME SDL2)
+set(LIBNAME SDL3)
 if(NOT LIBTYPE)
   set(LIBTYPE SHARED)
 endif()
@@ -324,9 +325,9 @@ if(MSVC)
   endif()
 endif()
 
-# Those are used for pkg-config and friends, so that the sdl2.pc, sdl2-config,
+# Those are used for pkg-config and friends, so that the sdl3.pc, sdl3-config,
 # etc. are created correctly.
-set(SDL_LIBS "-lSDL2")
+set(SDL_LIBS "-lSDL3")
 set(SDL_CFLAGS )
 
 # When building shared lib for Windows with MinGW,
@@ -357,13 +358,13 @@ endif()
 
 # General includes
 target_compile_definitions(sdl-build-options INTERFACE "-DUSING_GENERATED_CONFIG_H")
-target_include_directories(sdl-build-options BEFORE INTERFACE "${SDL2_BINARY_DIR}/include" "${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>")
+target_include_directories(sdl-build-options BEFORE INTERFACE "${SDL3_BINARY_DIR}/include" "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>")
 # Note: The clang toolset for Visual Studio does not support the '-idirafter' option.
 if(USE_GCC OR (USE_CLANG AND NOT MSVC_CLANG))
   # !!! FIXME: do we _need_ to mess with CMAKE_C_FLAGS here?
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter \"${SDL2_SOURCE_DIR}/src/video/khronos\"")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter \"${SDL3_SOURCE_DIR}/src/video/khronos\"")
 else()
-  target_include_directories(sdl-build-options INTERFACE "${SDL2_SOURCE_DIR}/src/video/khronos")
+  target_include_directories(sdl-build-options INTERFACE "${SDL3_SOURCE_DIR}/src/video/khronos")
 endif()
 
 # All these ENABLED_BY_DEFAULT vars will default to ON if not specified, so
@@ -382,7 +383,6 @@ if(EMSCRIPTEN)
   set(SDL_ATOMIC_ENABLED_BY_DEFAULT OFF)
   set(SDL_LOADSO_ENABLED_BY_DEFAULT OFF)
   set(SDL_CPUINFO_ENABLED_BY_DEFAULT OFF)
-  set(SDL_TEST_ENABLED_BY_DEFAULT OFF)
 endif()
 
 if(VITA OR PSP OR PS2 OR N3DS)
@@ -427,9 +427,9 @@ foreach(_SUB ${SDL_SUBSYSTEMS})
 endforeach()
 
 # Allow some projects to be built conditionally.
-set_option(SDL2_DISABLE_SDL2MAIN   "Disable building/installation of SDL2main" OFF)
-set_option(SDL2_DISABLE_INSTALL    "Disable installation of SDL2" ${SDL2_SUBPROJECT})
-set_option(SDL2_DISABLE_UNINSTALL  "Disable uninstallation of SDL2" OFF)
+set_option(SDL3_DISABLE_SDL3MAIN   "Disable building/installation of SDL3main" OFF)
+set_option(SDL3_DISABLE_INSTALL    "Disable installation of SDL3" ${SDL3_SUBPROJECT})
+set_option(SDL3_DISABLE_UNINSTALL  "Disable uninstallation of SDL3" OFF)
 
 option_string(SDL_ASSERTIONS "Enable internal sanity checks (auto/disabled/release/enabled/paranoid)" "auto")
 #set_option(SDL_DEPENDENCY_TRACKING "Use gcc -MMD -MT dependency tracking" ON)
@@ -448,8 +448,6 @@ set_option(SDL_ARMNEON             "use NEON assembly blitters on ARM" OFF)
 dep_option(SDL_DBUS                "Enable D-Bus support" ON ${UNIX_SYS} OFF)
 set_option(SDL_DISKAUDIO           "Support the disk writer audio driver" ON)
 set_option(SDL_DUMMYAUDIO          "Support the dummy audio driver" ON)
-set_option(SDL_DIRECTFB            "Use DirectFB video driver" OFF)
-dep_option(SDL_DIRECTFB_SHARED     "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF)
 set_option(SDL_DUMMYVIDEO          "Use dummy video driver" ON)
 dep_option(SDL_IBUS                "Enable IBus support" ON ${UNIX_SYS} OFF)
 set_option(SDL_SYSTEM_ICONV        "Use iconv() from system-installed libraries" ON)
@@ -462,20 +460,12 @@ set_option(SDL_ALSA                "Support the ALSA audio API" ${UNIX_SYS})
 dep_option(SDL_ALSA_SHARED         "Dynamically load ALSA audio support" ON "SDL_ALSA" OFF)
 set_option(SDL_JACK                "Support the JACK audio API" ${UNIX_SYS})
 dep_option(SDL_JACK_SHARED         "Dynamically load JACK audio support" ON "SDL_JACK" OFF)
-set_option(SDL_ESD                 "Support the Enlightened Sound Daemon" ${UNIX_SYS})
-dep_option(SDL_ESD_SHARED          "Dynamically load ESD audio support" ON "SDL_ESD" OFF)
 set_option(SDL_PIPEWIRE            "Use Pipewire audio" ${UNIX_SYS})
 dep_option(SDL_PIPEWIRE_SHARED     "Dynamically load Pipewire support" ON "SDL_PIPEWIRE" OFF)
 set_option(SDL_PULSEAUDIO          "Use PulseAudio" ${UNIX_SYS})
 dep_option(SDL_PULSEAUDIO_SHARED   "Dynamically load PulseAudio support" ON "SDL_PULSEAUDIO" OFF)
-set_option(SDL_ARTS                "Support the Analog Real Time Synthesizer" ${UNIX_SYS})
-dep_option(SDL_ARTS_SHARED         "Dynamically load aRts audio support" ON "SDL_ARTS" OFF)
-set_option(SDL_NAS                 "Support the NAS audio API" ${UNIX_SYS})
-dep_option(SDL_NAS_SHARED          "Dynamically load NAS audio support" ON "SDL_NAS" OFF)
 set_option(SDL_SNDIO               "Support the sndio audio API" ${UNIX_SYS})
 dep_option(SDL_SNDIO_SHARED        "Dynamically load the sndio audio API" ON "SDL_SNDIO" OFF)
-set_option(SDL_FUSIONSOUND         "Use FusionSound audio driver" OFF)
-dep_option(SDL_FUSIONSOUND_SHARED  "Dynamically load fusionsound audio support" ON "SDL_FUSIONSOUND" OFF)
 set_option(SDL_LIBSAMPLERATE       "Use libsamplerate for audio rate conversion" ${UNIX_SYS})
 dep_option(SDL_LIBSAMPLERATE_SHARED "Dynamically load libsamplerate" ON "SDL_LIBSAMPLERATE" OFF)
 set_option(SDL_RPATH               "Use an rpath when linking SDL" ${UNIX_SYS})
@@ -513,12 +503,13 @@ dep_option(SDL_HIDAPI_JOYSTICK     "Use HIDAPI for low level joystick drivers" O
 dep_option(SDL_VIRTUAL_JOYSTICK    "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
 set_option(SDL_ASAN                "Use AddressSanitizer to detect memory errors" OFF)
 option_string(SDL_VENDOR_INFO      "Vendor name and/or version to add to SDL_REVISION" "")
+set_option(SDL_CCACHE              "Use Ccache to speed up build" ON)
 
 option(SDL_WERROR "Enable -Werror" OFF)
 
 option(SDL_SHARED "Build a shared version of the library" ${SDL_SHARED_ENABLED_BY_DEFAULT})
 option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_ENABLED_BY_DEFAULT})
-option(SDL_TEST   "Build the SDL2_test library" ${SDL_TEST_ENABLED_BY_DEFAULT})
+option(SDL_TEST   "Build the SDL3_test library" ${SDL_TEST_ENABLED_BY_DEFAULT})
 
 dep_option(SDL_STATIC_PIC      "Static version of the library should be built with Position Independent Code" "${CMAKE_POSITION_INDEPENDENT_CODE}" "SDL_STATIC" OFF)
 dep_option(SDL_TESTS           "Build the test directory" OFF SDL_TEST OFF)
@@ -561,28 +552,28 @@ endif()
 
 # General source files
 file(GLOB SOURCE_FILES
-  ${SDL2_SOURCE_DIR}/src/*.c
-  ${SDL2_SOURCE_DIR}/src/atomic/*.c
-  ${SDL2_SOURCE_DIR}/src/audio/*.c
-  ${SDL2_SOURCE_DIR}/src/cpuinfo/*.c
-  ${SDL2_SOURCE_DIR}/src/dynapi/*.c
-  ${SDL2_SOURCE_DIR}/src/events/*.c
-  ${SDL2_SOURCE_DIR}/src/file/*.c
-  ${SDL2_SOURCE_DIR}/src/joystick/*.c
-  ${SDL2_SOURCE_DIR}/src/haptic/*.c
-  ${SDL2_SOURCE_DIR}/src/hidapi/*.c
-  ${SDL2_SOURCE_DIR}/src/libm/*.c
-  ${SDL2_SOURCE_DIR}/src/locale/*.c
-  ${SDL2_SOURCE_DIR}/src/misc/*.c
-  ${SDL2_SOURCE_DIR}/src/power/*.c
-  ${SDL2_SOURCE_DIR}/src/render/*.c
-  ${SDL2_SOURCE_DIR}/src/render/*/*.c
-  ${SDL2_SOURCE_DIR}/src/sensor/*.c
-  ${SDL2_SOURCE_DIR}/src/stdlib/*.c
-  ${SDL2_SOURCE_DIR}/src/thread/*.c
-  ${SDL2_SOURCE_DIR}/src/timer/*.c
-  ${SDL2_SOURCE_DIR}/src/video/*.c
-  ${SDL2_SOURCE_DIR}/src/video/yuv2rgb/*.c)
+  ${SDL3_SOURCE_DIR}/src/*.c
+  ${SDL3_SOURCE_DIR}/src/atomic/*.c
+  ${SDL3_SOURCE_DIR}/src/audio/*.c
+  ${SDL3_SOURCE_DIR}/src/cpuinfo/*.c
+  ${SDL3_SOURCE_DIR}/src/dynapi/*.c
+  ${SDL3_SOURCE_DIR}/src/events/*.c
+  ${SDL3_SOURCE_DIR}/src/file/*.c
+  ${SDL3_SOURCE_DIR}/src/joystick/*.c
+  ${SDL3_SOURCE_DIR}/src/haptic/*.c
+  ${SDL3_SOURCE_DIR}/src/hidapi/*.c
+  ${SDL3_SOURCE_DIR}/src/libm/*.c
+  ${SDL3_SOURCE_DIR}/src/locale/*.c
+  ${SDL3_SOURCE_DIR}/src/misc/*.c
+  ${SDL3_SOURCE_DIR}/src/power/*.c
+  ${SDL3_SOURCE_DIR}/src/render/*.c
+  ${SDL3_SOURCE_DIR}/src/render/*/*.c
+  ${SDL3_SOURCE_DIR}/src/sensor/*.c
+  ${SDL3_SOURCE_DIR}/src/stdlib/*.c
+  ${SDL3_SOURCE_DIR}/src/thread/*.c
+  ${SDL3_SOURCE_DIR}/src/timer/*.c
+  ${SDL3_SOURCE_DIR}/src/video/*.c
+  ${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.c)
 
 
 set(SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED 1)
@@ -923,7 +914,7 @@ if(SDL_ASSEMBLY)
       if(ARMSIMD_FOUND)
         set(HAVE_ARMSIMD TRUE)
         set(SDL_ARM_SIMD_BLITTERS 1)
-        file(GLOB ARMSIMD_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
+        file(GLOB ARMSIMD_SOURCES ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
         list(APPEND SOURCE_FILES ${ARMSIMD_SOURCES})
         set(WARN_ABOUT_ARM_SIMD_ASM_MIT TRUE)
       endif()
@@ -951,7 +942,7 @@ if(SDL_ASSEMBLY)
       if(ARMNEON_FOUND)
         set(HAVE_ARMNEON TRUE)
         set(SDL_ARM_NEON_BLITTERS 1)
-        file(GLOB ARMNEON_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
+        file(GLOB ARMNEON_SOURCES ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
         list(APPEND SOURCE_FILES ${ARMNEON_SOURCES})
         set(WARN_ABOUT_ARM_NEON_ASM_MIT TRUE)
       endif()
@@ -998,18 +989,38 @@ if(SDL_LIBC)
     endforeach()
     set(HAVE_ALLOCA 1)
     check_symbol_exists(M_PI math.h HAVE_M_PI)
-    target_compile_definitions(sdl-build-options INTERFACE "-D_USE_MATH_DEFINES") # needed for M_PI
     set(STDC_HEADERS 1)
   else()
     set(HAVE_LIBC TRUE)
-    check_include_file(sys/types.h HAVE_SYS_TYPES_H)
-    foreach(_HEADER
-            stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h limits.h float.h
-            strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h libunwind.h)
+    set(headers_to_check
+        ctype.h
+        float.h
+        iconv.h
+        inttypes.h
+        limits.h
+        malloc.h
+        math.h
+        memory.h
+        signal.h
+        stdarg.h
+        stddef.h
+        stdint.h
+        stdio.h
+        stdlib.h
+        string.h
+        strings.h
+        sys/types.h
+        wchar.h
+    )
+    if(NOT EMSCRIPTEN)
+      list(APPEND headers_to_check libunwind.h)
+    endif()
+    foreach(_HEADER ${headers_to_check})
       string(TOUPPER "HAVE_${_HEADER}" _UPPER)
-      string(REPLACE "." "_" _HAVE_H ${_UPPER})
+      string(REGEX REPLACE "[./]" "_" _HAVE_H ${_UPPER})
       check_include_file("${_HEADER}" ${_HAVE_H})
     endforeach()
+    check_include_file(linux/input.h HAVE_LINUX_INPUT_H)
 
     set(STDC_HEADER_NAMES "stddef.h;stdarg.h;stdlib.h;string.h;stdio.h;wchar.h;float.h")
     check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
@@ -1023,7 +1034,7 @@ if(SDL_LIBC)
             bsearch qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
             _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r
             itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
-            atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
+            atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr
             wcscmp _wcsdup wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
             wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp
             sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 _Exit
@@ -1119,14 +1130,14 @@ if(SDL_AUDIO)
   # CheckDummyAudio/CheckDiskAudio - valid for all platforms
   if(SDL_DUMMYAUDIO)
     set(SDL_AUDIO_DRIVER_DUMMY 1)
-    file(GLOB DUMMYAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dummy/*.c)
+    file(GLOB DUMMYAUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/dummy/*.c)
     list(APPEND SOURCE_FILES ${DUMMYAUDIO_SOURCES})
     set(HAVE_DUMMYAUDIO TRUE)
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_DISKAUDIO)
     set(SDL_AUDIO_DRIVER_DISK 1)
-    file(GLOB DISKAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/disk/*.c)
+    file(GLOB DISKAUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/disk/*.c)
     list(APPEND SOURCE_FILES ${DISKAUDIO_SOURCES})
     set(HAVE_DISKAUDIO TRUE)
     set(HAVE_SDL_AUDIO TRUE)
@@ -1139,7 +1150,7 @@ if(UNIX OR APPLE)
   CheckDLOPEN()
   if(SDL_LOADSO AND HAVE_DLOPEN)
     set(SDL_LOADSO_DLOPEN 1)
-    file(GLOB DLOPEN_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dlopen/*.c)
+    file(GLOB DLOPEN_SOURCES ${SDL3_SOURCE_DIR}/src/loadso/dlopen/*.c)
     list(APPEND SOURCE_FILES ${DLOPEN_SOURCES})
     set(HAVE_SDL_LOADSO TRUE)
   endif()
@@ -1153,7 +1164,7 @@ if(SDL_JOYSTICK)
   if(SDL_VIRTUAL_JOYSTICK)
     set(HAVE_VIRTUAL_JOYSTICK TRUE)
     set(SDL_JOYSTICK_VIRTUAL 1)
-    file(GLOB JOYSTICK_VIRTUAL_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/virtual/*.c)
+    file(GLOB JOYSTICK_VIRTUAL_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/virtual/*.c)
     list(APPEND SOURCE_FILES ${JOYSTICK_VIRTUAL_SOURCES})
   endif()
 endif()
@@ -1161,28 +1172,21 @@ endif()
 if(SDL_VIDEO)
   if(SDL_DUMMYVIDEO)
     set(SDL_VIDEO_DRIVER_DUMMY 1)
-    file(GLOB VIDEO_DUMMY_SOURCES ${SDL2_SOURCE_DIR}/src/video/dummy/*.c)
+    file(GLOB VIDEO_DUMMY_SOURCES ${SDL3_SOURCE_DIR}/src/video/dummy/*.c)
     list(APPEND SOURCE_FILES ${VIDEO_DUMMY_SOURCES})
     set(HAVE_DUMMYVIDEO TRUE)
     set(HAVE_SDL_VIDEO TRUE)
   endif()
-  if(SDL_OFFSCREEN)
-    set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
-    file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL2_SOURCE_DIR}/src/video/offscreen/*.c)
-    list(APPEND SOURCE_FILES ${VIDEO_OFFSCREEN_SOURCES})
-    set(HAVE_OFFSCREEN TRUE)
-    set(HAVE_SDL_VIDEO TRUE)
-  endif()
 endif()
 
 # Platform-specific options and settings
 if(ANDROID)
-  file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
+  file(GLOB ANDROID_CORE_SOURCES ${SDL3_SOURCE_DIR}/src/core/android/*.c)
   list(APPEND SOURCE_FILES ${ANDROID_CORE_SOURCES} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
   set_property(SOURCE "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-declaration-after-statement")
 
   if(SDL_MISC)
-    file(GLOB ANDROID_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/android/*.c)
+    file(GLOB ANDROID_MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
@@ -1195,39 +1199,39 @@ if(ANDROID)
   set(CMAKE_REQUIRED_FLAGS "-Werror=unused-command-line-argument")
   check_c_compiler_flag(-marm HAVE_ARM_MODE)
   if(HAVE_ARM_MODE)
-    set_property(SOURCE "${SDL2_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
+    set_property(SOURCE "${SDL3_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
   endif()
   cmake_pop_check_state()
 
-  file(GLOB ANDROID_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/android/*.c)
+  file(GLOB ANDROID_MAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/android/*.c)
   list(APPEND SDLMAIN_SOURCES ${ANDROID_MAIN_SOURCES})
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_ANDROID 1)
-    file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
+    file(GLOB ANDROID_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_AUDIO_SOURCES})
 
     set(SDL_AUDIO_DRIVER_OPENSLES 1)
-    file(GLOB OPENSLES_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/openslES/*.c)
+    file(GLOB OPENSLES_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/openslES/*.c)
     list(APPEND SOURCE_FILES ${OPENSLES_AUDIO_SOURCES})
 
     list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} OpenSLES)
 
     set(SDL_AUDIO_DRIVER_AAUDIO 1)
-    file(GLOB AAUDIO_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/aaudio/*.c)
+    file(GLOB AAUDIO_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/aaudio/*.c)
     list(APPEND SOURCE_FILES ${AAUDIO_AUDIO_SOURCES})
 
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_ANDROID 1)
-    file(GLOB ANDROID_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/android/*.c)
+    file(GLOB ANDROID_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
   if(SDL_HAPTIC)
     set(SDL_HAPTIC_ANDROID 1)
-    file(GLOB ANDROID_HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/android/*.c)
+    file(GLOB ANDROID_HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_HAPTIC_SOURCES})
     set(HAVE_SDL_HAPTIC TRUE)
   endif()
@@ -1236,42 +1240,42 @@ if(ANDROID)
   endif()
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_ANDROID 1)
-    file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
+    file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/android/*.c ${SDL3_SOURCE_DIR}/src/joystick/steam/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
   if(SDL_LOADSO)
     set(SDL_LOADSO_DLOPEN 1)
-    file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dlopen/*.c)
+    file(GLOB LOADSO_SOURCES ${SDL3_SOURCE_DIR}/src/loadso/dlopen/*.c)
     list(APPEND SOURCE_FILES ${LOADSO_SOURCES})
     set(HAVE_SDL_LOADSO TRUE)
   endif()
   if(SDL_POWER)
     set(SDL_POWER_ANDROID 1)
-    file(GLOB ANDROID_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/android/*.c)
+    file(GLOB ANDROID_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
   if(SDL_LOCALE)
-    file(GLOB ANDROID_LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/android/*.c)
+    file(GLOB ANDROID_LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
   if(SDL_TIMERS)
     set(SDL_TIMER_UNIX 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/unix/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
   if(SDL_SENSOR)
     set(SDL_SENSOR_ANDROID 1)
     set(HAVE_SDL_SENSORS TRUE)
-    file(GLOB ANDROID_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/android/*.c)
+    file(GLOB ANDROID_SENSOR_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_SENSOR_SOURCES})
   endif()
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_ANDROID 1)
-    file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
+    file(GLOB ANDROID_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/android/*.c)
     list(APPEND SOURCE_FILES ${ANDROID_VIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
 
@@ -1318,42 +1322,42 @@ elseif(EMSCRIPTEN)
   target_compile_options(sdl-build-options INTERFACE "-Wno-warn-absolute-paths")
 
   if(SDL_MISC)
-    file(GLOB EMSRIPTEN_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/emscripten/*.c)
+    file(GLOB EMSRIPTEN_MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EMSRIPTEN_MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_EMSCRIPTEN 1)
-    file(GLOB EM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/emscripten/*.c)
+    file(GLOB EM_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EM_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_EMSCRIPTEN 1)
-    file(GLOB EM_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/emscripten/*.c)
+    file(GLOB EM_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EM_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_EMSCRIPTEN 1)
-    file(GLOB EM_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/emscripten/*.c)
+    file(GLOB EM_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EM_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
   if(SDL_POWER)
     set(SDL_POWER_EMSCRIPTEN 1)
-    file(GLOB EM_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/emscripten/*.c)
+    file(GLOB EM_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EM_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/emscripten/*.c)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/emscripten/*.c)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
   if(SDL_TIMERS)
     set(SDL_TIMER_UNIX 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/unix/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
 
@@ -1363,7 +1367,7 @@ elseif(EMSCRIPTEN)
   endif()
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
-    file(GLOB EM_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/emscripten/*.c)
+    file(GLOB EM_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/emscripten/*.c)
     list(APPEND SOURCE_FILES ${EM_VIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
 
@@ -1378,41 +1382,30 @@ elseif(EMSCRIPTEN)
 
   CheckPTHREAD()
 
+  if(HAVE_LIBUNWIND_H)
+    list(APPEND EXTRA_TEST_LIBS unwind)
+  endif()
+
 elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
   if(SDL_AUDIO)
-    if(SYSV5 OR SOLARIS OR HPUX)
-        set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
-        file(GLOB SUN_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sun/*.c)
-        list(APPEND SOURCE_FILES ${SUN_AUDIO_SOURCES})
-        set(HAVE_SDL_AUDIO TRUE)
-    elseif(NETBSD)
+    if(NETBSD)
         set(SDL_AUDIO_DRIVER_NETBSD 1)
-        file(GLOB NETBSD_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/netbsd/*.c)
+        file(GLOB NETBSD_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/netbsd/*.c)
         list(APPEND SOURCE_FILES ${NETBSD_AUDIO_SOURCES})
         set(HAVE_SDL_AUDIO TRUE)
-    elseif(AIX)
-        set(SDL_AUDIO_DRIVER_PAUDIO 1)
-        file(GLOB AIX_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/paudio/*.c)
-        list(APPEND SOURCE_FILES ${AIX_AUDIO_SOURCES})
-        set(HAVE_SDL_AUDIO TRUE)
     endif()
     CheckOSS()
     CheckALSA()
     CheckJACK()
     CheckPipewire()
     CheckPulseAudio()
-    CheckESD()
-    CheckARTS()
-    CheckNAS()
     CheckSNDIO()
-    CheckFusionSound()
   endif()
 
   if(SDL_VIDEO)
     # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
     CheckRPI()
     CheckX11()
-    CheckDirectFB()
     # Need to check for EGL first because KMSDRM and Wayland depends on it.
     CheckEGL()
     CheckKMSDRM()
@@ -1429,7 +1422,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
   endif()
 
   if(UNIX)
-    file(GLOB CORE_UNIX_SOURCES ${SDL2_SOURCE_DIR}/src/core/unix/*.c)
+    file(GLOB CORE_UNIX_SOURCES ${SDL3_SOURCE_DIR}/src/core/unix/*.c)
     list(APPEND SOURCE_FILES ${CORE_UNIX_SOURCES})
 
     check_c_source_compiles("
@@ -1467,7 +1460,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
 
     if(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
       set(SDL_HAPTIC_LINUX 1)
-      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/linux/*.c)
+      file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/linux/*.c)
       list(APPEND SOURCE_FILES ${HAPTIC_SOURCES})
       set(HAVE_SDL_HAPTIC TRUE)
     endif()
@@ -1535,38 +1528,38 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
     endif()
 
     if(HAVE_DBUS_DBUS_H)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
     endif()
 
     if(SDL_USE_IME)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ime.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_ime.c")
     endif()
 
     if(HAVE_IBUS_IBUS_H)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ibus.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_ibus.c")
     endif()
 
     if(HAVE_FCITX)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_fcitx.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_fcitx.c")
     endif()
 
     if(HAVE_LIBUDEV_H)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_udev.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_udev.c")
     endif()
 
     if(HAVE_INPUT_EVENTS)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
     endif()
 
     if(HAVE_INPUT_KBIO)
-      list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/freebsd/SDL_evdev_kbd_freebsd.c")
+      list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/freebsd/SDL_evdev_kbd_freebsd.c")
     endif()
 
     # Always compiled for Linux, unconditionally:
-    list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
-    list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
-    list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_sandbox.c")
+    list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
+    list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
+    list(APPEND SOURCE_FILES "${SDL3_SOURCE_DIR}/src/core/linux/SDL_sandbox.c")
 
     # src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.
   endif()
@@ -1579,9 +1572,9 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
     if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
       CheckUSBHID()
     endif()
-    if(LINUX AND NOT ANDROID)
+    if(LINUX AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
       set(SDL_JOYSTICK_LINUX 1)
-      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
+      file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/linux/*.c ${SDL3_SOURCE_DIR}/src/joystick/steam/*.c)
       list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})
       set(HAVE_SDL_JOYSTICK TRUE)
     endif()
@@ -1608,7 +1601,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
   endif()
 
   if(SDL_MISC)
-    file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/unix/*.c)
+    file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/unix/*.c)
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
@@ -1616,28 +1609,28 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
   if(SDL_POWER)
     if(LINUX)
       set(SDL_POWER_LINUX 1)
-      file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/linux/*.c)
+      file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/linux/*.c)
       list(APPEND SOURCE_FILES ${POWER_SOURCES})
       set(HAVE_SDL_POWER TRUE)
     endif()
   endif()
 
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/unix/*.c)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/unix/*.c)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
 
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_UNIX 1)
-    file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/unix/*.c)
+    file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/unix/*.c)
     list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
 
   if(SDL_TIMERS)
     set(SDL_TIMER_UNIX 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/unix/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
@@ -1667,11 +1660,11 @@ elseif(WINDOWS)
     #include <windows.h>
     int main(int argc, char **argv) { return 0; }" HAVE_WIN32_CC)
 
-  file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
+  file(GLOB CORE_SOURCES ${SDL3_SOURCE_DIR}/src/core/windows/*.c)
   list(APPEND SOURCE_FILES ${CORE_SOURCES})
 
   if(WINDOWS_STORE)
-    file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp)
+    file(GLOB WINRT_SOURCE_FILES ${SDL3_SOURCE_DIR}/src/core/winrt/*.c ${SDL3_SOURCE_DIR}/src/core/winrt/*.cpp)
     list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES})
   endif()
 
@@ -1685,9 +1678,9 @@ elseif(WINDOWS)
 
   if(SDL_MISC)
     if(WINDOWS_STORE)
-      file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
+      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/winrt/*.cpp)
     else()
-      file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/windows/*.c)
+      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/windows/*.c)
     endif()
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
@@ -1765,16 +1758,9 @@ elseif(WINDOWS)
   check_include_file(shellscalingapi.h HAVE_SHELLSCALINGAPI_H)
 
   if(SDL_AUDIO)
-    if(NOT WINDOWS_STORE)
-      set(SDL_AUDIO_DRIVER_WINMM 1)
-      file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
-      list(APPEND SOURCE_FILES ${WINMM_AUDIO_SOURCES})
-      set(HAVE_SDL_AUDIO TRUE)
-    endif()
-
     if(HAVE_DSOUND_H AND NOT WINDOWS_STORE)
       set(SDL_AUDIO_DRIVER_DSOUND 1)
-      file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
+      file(GLOB DSOUND_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/directsound/*.c)
       list(APPEND SOURCE_FILES ${DSOUND_AUDIO_SOURCES})
       set(HAVE_SDL_AUDIO TRUE)
     endif()
@@ -1782,9 +1768,9 @@ elseif(WINDOWS)
     if(SDL_WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
       set(SDL_AUDIO_DRIVER_WASAPI 1)
       set(HAVE_WASAPI TRUE)
-      file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
+      file(GLOB WASAPI_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/wasapi/*.c)
       if(WINDOWS_STORE)
-        list(APPEND WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/SDL_wasapi_winrt.cpp)
+        list(APPEND WASAPI_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/wasapi/SDL_wasapi_winrt.cpp)
       endif()
       list(APPEND SOURCE_FILES ${WASAPI_AUDIO_SOURCES})
       set(HAVE_SDL_AUDIO TRUE)
@@ -1799,13 +1785,13 @@ elseif(WINDOWS)
     if(WINDOWS_STORE)
       set(SDL_VIDEO_DRIVER_WINRT 1)
       file(GLOB WIN_VIDEO_SOURCES
-        ${SDL2_SOURCE_DIR}/src/video/winrt/*.c
-        ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp
-        ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp
+        ${SDL3_SOURCE_DIR}/src/video/winrt/*.c
+        ${SDL3_SOURCE_DIR}/src/video/winrt/*.cpp
+        ${SDL3_SOURCE_DIR}/src/render/direct3d11/*.cpp
         )
     else()
       set(SDL_VIDEO_DRIVER_WINDOWS 1)
-      file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
+      file(GLOB WIN_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/windows/*.c)
     endif()
     list(APPEND SOURCE_FILES ${WIN_VIDEO_SOURCES})
 
@@ -1828,38 +1814,38 @@ elseif(WINDOWS)
     set(SDL_THREAD_GENERIC_COND_SUFFIX 1)
     set(SDL_THREAD_WINDOWS 1)
     list(APPEND SOURCE_FILES
-      ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
-      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_syscond_cv.c
-      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_sysmutex.c
-      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_syssem.c
-      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_systhread.c
-      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_systls.c)
+      ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
+      ${SDL3_SOURCE_DIR}/src/thread/windows/SDL_syscond_cv.c
+      ${SDL3_SOURCE_DIR}/src/thread/windows/SDL_sysmutex.c
+      ${SDL3_SOURCE_DIR}/src/thread/windows/SDL_syssem.c
+      ${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systhread.c
+      ${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systls.c)
     set(HAVE_SDL_THREADS TRUE)
   endif()
 
   if(SDL_SENSOR AND HAVE_SENSORSAPI_H AND NOT WINDOWS_STORE)
     set(SDL_SENSOR_WINDOWS 1)
     set(HAVE_SDL_SENSORS TRUE)
-    file(GLOB WINDOWS_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/windows/*.c)
+    file(GLOB WINDOWS_SENSOR_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/windows/*.c)
     list(APPEND SOURCE_FILES ${WINDOWS_SENSOR_SOURCES})
   endif()
 
   if(SDL_POWER)
     if(WINDOWS_STORE)
       set(SDL_POWER_WINRT 1)
-      list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp)
+      list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp)
     else()
       set(SDL_POWER_WINDOWS 1)
-      list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
+      list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
       set(HAVE_SDL_POWER TRUE)
     endif()
   endif()
 
   if(SDL_LOCALE)
     if(WINDOWS_STORE)
-      file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/winrt/*.c)
+      file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/winrt/*.c)
     else()
-      file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/windows/*.c)
+      file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/windows/*.c)
     endif()
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
@@ -1868,9 +1854,9 @@ elseif(WINDOWS)
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_WINDOWS 1)
     if(WINDOWS_STORE)
-      file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp)
+      file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/winrt/*.cpp)
     else()
-      file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
+      file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/windows/*.c)
     endif()
     list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
@@ -1892,19 +1878,19 @@ elseif(WINDOWS)
 
   if(SDL_TIMERS)
     set(SDL_TIMER_WINDOWS 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/windows/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/windows/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
 
   if(SDL_LOADSO)
     set(SDL_LOADSO_WINDOWS 1)
-    file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/windows/*.c)
+    file(GLOB LOADSO_SOURCES ${SDL3_SOURCE_DIR}/src/loadso/windows/*.c)
     list(APPEND SOURCE_FILES ${LOADSO_SOURCES})
     set(HAVE_SDL_LOADSO TRUE)
   endif()
 
-  file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
+  file(GLOB CORE_SOURCES ${SDL3_SOURCE_DIR}/src/core/windows/*.c)
   list(APPEND SOURCE_FILES ${CORE_SOURCES})
 
   if(SDL_VIDEO)
@@ -1933,7 +1919,7 @@ elseif(WINDOWS)
   endif()
 
   if(SDL_JOYSTICK)
-    file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
+    file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/windows/*.c)
     list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})
 
     if(NOT WINDOWS_STORE)
@@ -1956,7 +1942,7 @@ elseif(WINDOWS)
 
     if(SDL_HAPTIC)
       if((HAVE_DINPUT_H OR HAVE_XINPUT_H) AND NOT WINDOWS_STORE)
-        file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/windows/*.c)
+        file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/windows/*.c)
         if(HAVE_DINPUT_H)
           set(SDL_HAPTIC_DINPUT 1)
         endif()
@@ -1964,7 +1950,7 @@ elseif(WINDOWS)
           set(SDL_HAPTIC_XINPUT 1)
         endif()
       else()
-        file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
+        file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/dummy/*.c)
         set(SDL_HAPTIC_DUMMY 1)
       endif()
       list(APPEND SOURCE_FILES ${HAPTIC_SOURCES})
@@ -1972,13 +1958,13 @@ elseif(WINDOWS)
     endif()
   endif()
 
-  file(GLOB VERSION_SOURCES ${SDL2_SOURCE_DIR}/src/main/windows/*.rc)
-  file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/windows/*.c)
+  file(GLOB VERSION_SOURCES ${SDL3_SOURCE_DIR}/src/main/windows/*.rc)
+  file(GLOB SDLMAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/windows/*.c)
   if(MINGW OR CYGWIN)
-    if(NOT SDL2_DISABLE_SDL2MAIN)
+    if(NOT SDL3_DISABLE_SDL3MAIN)
       list(APPEND SDL_CFLAGS "-Dmain=SDL_main")
-      list(INSERT SDL_LIBS 0 "-lSDL2main")
-    endif(NOT SDL2_DISABLE_SDL2MAIN)
+      list(INSERT SDL_LIBS 0 "-lSDL3main")
+    endif(NOT SDL3_DISABLE_SDL3MAIN)
     list(INSERT SDL_LIBS 0 "-lmingw32" "-mwindows")
   endif()
 
@@ -1998,20 +1984,20 @@ elseif(APPLE)
 
   # Requires the darwin file implementation
   if(SDL_FILE)
-    file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
+    file(GLOB EXTRA_SOURCES ${SDL3_SOURCE_DIR}/src/file/cocoa/*.m)
     list(APPEND SOURCE_FILES ${EXTRA_SOURCES})
     set(HAVE_SDL_FILE TRUE)
   endif()
 
   if(IOS OR TVOS)
-    file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/uikit/*.c)
+    file(GLOB SDLMAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/uikit/*.c)
   endif()
 
   if(SDL_MISC)
     if(IOS OR TVOS)
-      file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m)
+      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/ios/*.m)
     else()
-      file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m)
+      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/macosx/*.m)
     endif()
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
@@ -2019,7 +2005,7 @@ elseif(APPLE)
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_COREAUDIO 1)
-    file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
+    file(GLOB AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/coreaudio/*.m)
     list(APPEND SOURCE_FILES ${AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
     set(SDL_FRAMEWORK_COREAUDIO 1)
@@ -2032,9 +2018,9 @@ elseif(APPLE)
   endif()
 
   if(SDL_JOYSTICK)
-    file(GLOB MFI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m)
+    file(GLOB MFI_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/iphoneos/*.m)
     if(IOS OR TVOS)
-      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
+      file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/steam/*.c)
       set(SDL_JOYSTICK_MFI 1)
       if(IOS)
         set(SDL_FRAMEWORK_COREMOTION 1)
@@ -2042,7 +2028,7 @@ elseif(APPLE)
       set(SDL_FRAMEWORK_GAMECONTROLLER 1)
       set(SDL_FRAMEWORK_COREHAPTICS 1)
     else()
-      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
+      file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/darwin/*.c)
       set_property(SOURCE ${MFI_JOYSTICK_SOURCES} APPEND_STRING PROPERTY COMPILE_FLAGS " -fobjc-weak")
       check_objc_source_compiles("
           #include <AvailabilityMacros.h>
@@ -2078,10 +2064,10 @@ elseif(APPLE)
 
   if(SDL_HAPTIC)
     if (IOS OR TVOS)
-      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
+      file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/dummy/*.c)
       set(SDL_HAPTIC_DUMMY 1)
     else()
-      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/darwin/*.c)
+      file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/darwin/*.c)
       set(SDL_HAPTIC_IOKIT 1)
       set(SDL_FRAMEWORK_IOKIT 1)
       set(SDL_FRAMEWORK_FF 1)
@@ -2092,10 +2078,10 @@ elseif(APPLE)
 
   if(SDL_POWER)
     if (IOS OR TVOS)
-      file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
+      file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/uikit/*.m)
       set(SDL_POWER_UIKIT 1)
     else()
-      file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c)
+      file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/macosx/*.c)
       set(SDL_POWER_MACOSX 1)
       set(SDL_FRAMEWORK_IOKIT 1)
     endif()
@@ -2104,21 +2090,21 @@ elseif(APPLE)
   endif()
 
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/macosx/*.m)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/macosx/*.m)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
 
   if(SDL_TIMERS)
     set(SDL_TIMER_UNIX 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/unix/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif(SDL_TIMERS)
 
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_COCOA 1)
-    file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m)
+    file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/cocoa/*.m)
     list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
@@ -2127,7 +2113,7 @@ elseif(APPLE)
     if(IOS)
       set(SDL_SENSOR_COREMOTION 1)
       set(HAVE_SDL_SENSORS TRUE)
-      file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/coremotion/*.m)
+      file(GLOB SENSOR_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/coremotion/*.m)
       list(APPEND SOURCE_FILES ${SENSOR_SOURCES})
     endif()
   endif()
@@ -2141,7 +2127,7 @@ elseif(APPLE)
       set(SDL_FRAMEWORK_UIKIT 1)
       set(SDL_IPHONE_KEYBOARD 1)
       set(SDL_IPHONE_LAUNCHSCREEN 1)
-      file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
+      file(GLOB UIKITVIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/uikit/*.m)
       list(APPEND SOURCE_FILES ${UIKITVIDEO_SOURCES})
       set(HAVE_SDL_VIDEO TRUE)
     else()
@@ -2189,7 +2175,7 @@ elseif(APPLE)
           set(HAVE_METAL TRUE)
         endif()
         if(SDL_RENDER_METAL)
-          file(GLOB RENDER_METAL_SOURCES ${SDL2_SOURCE_DIR}/src/render/metal/*.m)
+          file(GLOB RENDER_METAL_SOURCES ${SDL3_SOURCE_DIR}/src/render/metal/*.m)
           list(APPEND SOURCE_FILES ${RENDER_METAL_SOURCES})
           set(SDL_VIDEO_RENDER_METAL 1)
           set(HAVE_RENDER_METAL TRUE)
@@ -2273,27 +2259,27 @@ elseif(APPLE)
 elseif(HAIKU)
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_HAIKU 1)
-    file(GLOB HAIKU_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/haiku/*.cc)
+    file(GLOB HAIKU_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/haiku/*.cc)
     list(APPEND SOURCE_FILES ${HAIKU_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
 
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_HAIKU 1)
-    file(GLOB HAIKU_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/haiku/*.cc)
+    file(GLOB HAIKU_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/haiku/*.cc)
     list(APPEND SOURCE_FILES ${HAIKU_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
 
   if(SDL_MISC)
-    file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/haiku/*.cc)
+    file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/haiku/*.cc)
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
 
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_HAIKU 1)
-    file(GLOB HAIKUVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/haiku/*.cc)
+    file(GLOB HAIKUVIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/haiku/*.cc)
     list(APPEND SOURCE_FILES ${HAIKUVIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
 
@@ -2309,32 +2295,32 @@ elseif(HAIKU)
 
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_HAIKU 1)
-    file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
+    file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/haiku/*.cc)
     list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
 
   if(SDL_TIMERS)
     set(SDL_TIMER_HAIKU 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/haiku/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
 
   if(SDL_POWER)
     set(SDL_POWER_HAIKU 1)
-    file(GLOB HAIKU_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/haiku/*.c)
+    file(GLOB HAIKU_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/haiku/*.c)
     list(APPEND SOURCE_FILES ${HAIKU_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
 
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/haiku/*.cc)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/haiku/*.cc)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
 
-  file(GLOB MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/haiku/*.cc)
+  file(GLOB MAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/haiku/*.cc)
   list(APPEND SOURCE_FILES ${MAIN_SOURCES})
 
   CheckPTHREAD()
@@ -2342,28 +2328,28 @@ elseif(HAIKU)
 
 elseif(RISCOS)
   if(SDL_MISC)
-    file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/riscos/*.c)
+    file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/riscos/*.c)
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
 
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_RISCOS 1)
-    file(GLOB RISCOSVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/riscos/*.c)
+    file(GLOB RISCOSVIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/riscos/*.c)
     list(APPEND SOURCE_FILES ${RISCOSVIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
   endif()
 
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_RISCOS 1)
-    file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/riscos/*.c)
+    file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/riscos/*.c)
     list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
 
   if(SDL_TIMERS)
     set(SDL_TIMER_UNIX 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/unix/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
 
@@ -2384,70 +2370,70 @@ elseif(VITA)
   set(CMAKE_REQUIRED_FLAGS "-Werror=unused-command-line-argument")
   check_c_compiler_flag(-marm HAVE_ARM_MODE)
   if(HAVE_ARM_MODE)
-    set_property(SOURCE "${SDL2_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
+    set_property(SOURCE "${SDL3_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
   endif()
   cmake_pop_check_state()
 
   if(SDL_MISC)
-    file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/vita/*.c)
+    file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/vita/*.c)
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
   endif()
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_VITA 1)
-    file(GLOB VITA_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/vita/*.c)
+    file(GLOB VITA_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_VITA 1)
-    file(GLOB VITA_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/vita/*.c)
+    file(GLOB VITA_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_VITA 1)
-    file(GLOB VITA_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/vita/*.c)
+    file(GLOB VITA_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
   if(SDL_POWER)
     set(SDL_POWER_VITA 1)
-    file(GLOB VITA_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/vita/*.c)
+    file(GLOB VITA_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
   if(SDL_THREADS)
     set(SDL_THREAD_VITA 1)
     list(APPEND SOURCE_FILES
-      ${SDL2_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c
-      ${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syssem.c
-      ${SDL2_SOURCE_DIR}/src/thread/vita/SDL_systhread.c
-      ${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syscond.c
-      ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
+      ${SDL3_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c
+      ${SDL3_SOURCE_DIR}/src/thread/vita/SDL_syssem.c
+      ${SDL3_SOURCE_DIR}/src/thread/vita/SDL_systhread.c
+      ${SDL3_SOURCE_DIR}/src/thread/vita/SDL_syscond.c
+      ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
     set(HAVE_SDL_THREADS TRUE)
   endif()
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/vita/*.c)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/vita/*.c)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
   if(SDL_TIMERS)
     set(SDL_TIMER_VITA 1)
-    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/vita/*.c)
+    file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/vita/*.c)
     list(APPEND SOURCE_FILES ${TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
   if(SDL_SENSOR)
     set(SDL_SENSOR_VITA 1)
     set(HAVE_SDL_SENSORS TRUE)
-    file(GLOB VITA_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/vita/*.c)
+    file(GLOB VITA_SENSOR_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_SENSOR_SOURCES})
   endif()
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_VITA 1)
-    file(GLOB VITA_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/vita/*.c)
+    file(GLOB VITA_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/vita/*.c)
     list(APPEND SOURCE_FILES ${VITA_VIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
 
@@ -2538,65 +2524,65 @@ elseif(VITA)
 
   set(HAVE_ARMSIMD TRUE)
 #  set(SDL_ARM_SIMD_BLITTERS 1)
-#  file(GLOB ARMSIMD_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
+#  file(GLOB ARMSIMD_SOURCES ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
 #  list(APPEND SOURCE_FILES ${ARMSIMD_SOURCES})
 
   set(HAVE_ARMNEON TRUE)
 #  set(SDL_ARM_NEON_BLITTERS 1)
-#  file(GLOB ARMNEON_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
+#  file(GLOB ARMNEON_SOURCES ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
 #  list(APPEND SOURCE_FILES ${ARMNEON_SOURCES})
 
-#  set_property(SOURCE ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd-asm.S PROPERTY LANGUAGE C)
-#  set_property(SOURCE ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon-asm.S PROPERTY LANGUAGE C)
+#  set_property(SOURCE ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-simd-asm.S PROPERTY LANGUAGE C)
+#  set_property(SOURCE ${SDL3_SOURCE_DIR}/src/video/arm/pixman-arm-neon-asm.S PROPERTY LANGUAGE C)
 
   target_compile_definitions(sdl-build-options INTERFACE "-D__VITA__")
 
 #  CheckPTHREAD()
 
 elseif(PSP)
- file(GLOB PSP_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/psp/*.c)
+ file(GLOB PSP_MAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/psp/*.c)
  list(APPEND SDLMAIN_SOURCES ${PSP_MAIN_SOURCES})
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_PSP 1)
-    file(GLOB PSP_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/psp/*.c)
+    file(GLOB PSP_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_PSP 1)
-    file(GLOB PSP_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/psp/*.c)
+    file(GLOB PSP_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_PSP 1)
-    file(GLOB PSP_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/psp/*.c)
+    file(GLOB PSP_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
   if(SDL_POWER)
     set(SDL_POWER_PSP 1)
-    file(GLOB PSP_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/psp/*.c)
+    file(GLOB PSP_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
   if(SDL_THREADS)
     set(SDL_THREAD_PSP 1)
-    file(GLOB PSP_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
+    file(GLOB PSP_THREAD_SOURCES ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL3_SOURCE_DIR}/src/thread/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_THREAD_SOURCES})
     set(HAVE_SDL_THREADS TRUE)
   endif()
   if(SDL_TIMERS)
     set(SDL_TIMER_PSP 1)
-    file(GLOB PSP_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/psp/*.c)
+    file(GLOB PSP_TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_PSP 1)
     set(SDL_VIDEO_RENDER_PSP 1)
-    file(GLOB PSP_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/psp/*.c)
+    file(GLOB PSP_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/psp/*.c)
     list(APPEND SOURCE_FILES ${PSP_VIDEO_SOURCES})
     set(SDL_VIDEO_OPENGL 1)
     set(HAVE_SDL_VIDEO TRUE)
@@ -2614,50 +2600,50 @@ elseif(PSP)
       pspctrl
       psppower
   )
-  if(NOT SDL2_DISABLE_SDL2MAIN)
-    list(INSERT SDL_LIBS 0 "-lSDL2main")
-  endif(NOT SDL2_DISABLE_SDL2MAIN)
+  if(NOT SDL3_DISABLE_SDL3MAIN)
+    list(INSERT SDL_LIBS 0 "-lSDL3main")
+  endif(NOT SDL3_DISABLE_SDL3MAIN)
 
 elseif(PS2)
   list(APPEND EXTRA_CFLAGS "-DPS2" "-D__PS2__" "-I$ENV{PS2SDK}/ports/include" "-I$ENV{PS2DEV}/gsKit/include")
 
-  file(GLOB PS2_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/ps2/*.c)
+  file(GLOB PS2_MAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/ps2/*.c)
   set(SDLMAIN_SOURCES ${SDLMAIN_SOURCES} ${PS2_MAIN_SOURCES})
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_PS2 1)
-    file(GLOB PS2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/ps2/*.c)
+    file(GLOB PS2_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/ps2/*.c)
     set(SOURCE_FILES ${SOURCE_FILES} ${PS2_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_PS2 1)
-    file(GLOB PS2_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/ps2/*.c)
+    file(GLOB PS2_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/ps2/*.c)
     list(APPEND SOURCE_FILES ${PS2_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_PS2 1)
-    file(GLOB PS2_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/ps2/*.c)
+    file(GLOB PS2_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/ps2/*.c)
     list(APPEND SOURCE_FILES ${PS2_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
   if(SDL_THREADS)
     set(SDL_THREAD_PS2 1)
-    file(GLOB PS2_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c ${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
+    file(GLOB PS2_THREAD_SOURCES ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c ${SDL3_SOURCE_DIR}/src/thread/ps2/*.c)
     list(APPEND SOURCE_FILES ${PS2_THREAD_SOURCES})
     set(HAVE_SDL_THREADS TRUE)
   endif()
   if(SDL_TIMERS)
     set(SDL_TIMER_PS2 1)
-    file(GLOB PS2_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/ps2/*.c)
+    file(GLOB PS2_TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/ps2/*.c)
     list(APPEND SOURCE_FILES ${PS2_TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_PS2 1)
     set(SDL_VIDEO_RENDER_PS2 1)
-    file(GLOB PS2_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/ps2/*.c ${SDL2_SOURCE_DIR}/src/render/ps2/*.c)
+    file(GLOB PS2_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/ps2/*.c ${SDL3_SOURCE_DIR}/src/render/ps2/*.c)
     list(APPEND SOURCE_FILES ${PS2_VIDEO_SOURCES})
     set(SDL_VIDEO_OPENGL 0)
     set(HAVE_SDL_VIDEO TRUE)
@@ -2670,145 +2656,75 @@ elseif(PS2)
     ps2_drivers
   )
 
-elseif(OS2)
-  list(APPEND EXTRA_CFLAGS "-DOS2EMX_PLAIN_CHAR")
-
-  file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/os2/*.c)
-  list(APPEND SOURCE_FILES ${CORE_SOURCES})
-  if(NOT (HAVE_ICONV AND HAVE_ICONV_H))
-    file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/os2/geniconv/*.c)
-    list(APPEND SOURCE_FILES ${CORE_SOURCES})
-  endif()
-
-  if(SDL_THREADS)
-    set(SDL_THREAD_OS2 1)
-    file(GLOB OS2_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_THREAD_SOURCES})
-    set(HAVE_SDL_THREADS TRUE)
-  endif()
-
-  if(SDL_TIMERS)
-    set(SDL_TIMER_UNIX 1)
-    file(GLOB OS2_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_TIMER_SOURCES})
-    set(HAVE_SDL_TIMERS TRUE)
-  endif()
-
-  if(SDL_LOADSO)
-    set(SDL_LOADSO_OS2 1)
-    file(GLOB OS2_LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_LOADSO_SOURCES})
-    set(HAVE_SDL_LOADSO TRUE)
-  endif()
-
-  if(SDL_FILESYSTEM)
-    set(SDL_FILESYSTEM_OS2 1)
-    file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/os2/*.c)
-    list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
-    set(HAVE_SDL_FILESYSTEM TRUE)
-  endif()
-
-  if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/unix/*.c)
-    list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
-    set(HAVE_SDL_LOCALE TRUE)
-  endif()
-
-  if(SDL_VIDEO)
-    set(SDL_VIDEO_DRIVER_OS2 1)
-    file(GLOB OS2_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_VIDEO_SOURCES})
-    set(HAVE_SDL_VIDEO TRUE)
-  endif()
-
-  if(SDL_AUDIO)
-    set(SDL_AUDIO_DRIVER_OS2 1)
-    file(GLOB OS2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_AUDIO_SOURCES})
-    set(HAVE_SDL_AUDIO TRUE)
-    list(APPEND EXTRA_LIBS mmpm2)
-  endif()
-
-  if(SDL_JOYSTICK)
-    set(SDL_JOYSTICK_OS2 1)
-    file(GLOB OS2_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/os2/*.c)
-    list(APPEND SOURCE_FILES ${OS2_JOYSTICK_SOURCES})
-    set(HAVE_SDL_JOYSTICK TRUE)
-  endif()
-
-  if(SDL_HIDAPI)
-    CheckHIDAPI()
-  endif()
-
 elseif(N3DS)
-  file(GLOB N3DS_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/n3ds/*.c)
+  file(GLOB N3DS_MAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/n3ds/*.c)
   set(SDLMAIN_SOURCES ${SDLMAIN_SOURCES} ${N3DS_MAIN_SOURCES})
 
   if(SDL_AUDIO)
     set(SDL_AUDIO_DRIVER_N3DS 1)
-    file(GLOB N3DS_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/n3ds/*.c)
+    file(GLOB N3DS_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
   endif()
 
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_N3DS 1)
-    file(GLOB N3DS_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/n3ds/*.c)
+    file(GLOB N3DS_FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
 
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_N3DS 1)
-    file(GLOB N3DS_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/n3ds/*.c)
+    file(GLOB N3DS_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
 
   if(SDL_POWER)
     set(SDL_POWER_N3DS 1)
-    file(GLOB N3DS_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/n3ds/*.c)
+    file(GLOB N3DS_POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_POWER_SOURCES})
     set(HAVE_SDL_POWER TRUE)
   endif()
 
   if(SDL_THREADS)
     set(SDL_THREAD_N3DS 1)
-    file(GLOB N3DS_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/n3ds/*.c)
-    list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES} ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
+    file(GLOB N3DS_THREAD_SOURCES ${SDL3_SOURCE_DIR}/src/thread/n3ds/*.c)
+    list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES} ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
     set(HAVE_SDL_THREADS TRUE)
   endif()
 
   if(SDL_TIMERS)
     set(SDL_TIMER_N3DS 1)
-    file(GLOB N3DS_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/n3ds/*.c)
+    file(GLOB N3DS_TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_TIMER_SOURCES})
     set(HAVE_SDL_TIMERS TRUE)
   endif()
 
   if(SDL_SENSOR)
     set(SDL_SENSOR_N3DS 1)
-    file(GLOB N3DS_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/n3ds/*.c)
+    file(GLOB N3DS_SENSOR_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_SENSOR_SOURCES})
     set(HAVE_SDL_SENSORS TRUE)
   endif()
 
   if(SDL_VIDEO)
     set(SDL_VIDEO_DRIVER_N3DS 1)
-    file(GLOB N3DS_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/n3ds/*.c)
+    file(GLOB N3DS_VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_VIDEO_SOURCES})
     set(HAVE_SDL_VIDEO TRUE)
   endif()
 
   if(SDL_LOCALE)
-    file(GLOB N3DS_LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/n3ds/*.c)
+    file(GLOB N3DS_LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
 
   # Requires the n3ds file implementation
   if(SDL_FILE)
-    file(GLOB N3DS_FILE_SOURCES ${SDL2_SOURCE_DIR}/src/file/n3ds/*.c)
+    file(GLOB N3DS_FILE_SOURCES ${SDL3_SOURCE_DIR}/src/file/n3ds/*.c)
     list(APPEND SOURCE_FILES ${N3DS_FILE_SOURCES})
     set(HAVE_SDL_FILE TRUE)
   else()
@@ -2825,6 +2741,16 @@ endif()
 # Platform-independent options
 CheckLibSampleRate()
 
+if(SDL_VIDEO)
+  if(SDL_OFFSCREEN AND SDL_VIDEO_OPENGL_EGL)
+    set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
+    file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL3_SOURCE_DIR}/src/video/offscreen/*.c)
+    list(APPEND SOURCE_FILES ${VIDEO_OFFSCREEN_SOURCES})
+    set(HAVE_OFFSCREEN TRUE)
+    set(HAVE_SDL_VIDEO TRUE)
+  endif()
+endif()
+
 # Dummies
 # configure.ac does it differently:
 # if not have X
@@ -2835,47 +2761,47 @@ CheckLibSampleRate()
 # src/X/*.c does not get included.
 if(NOT HAVE_SDL_AUDIO)
   set(SDL_AUDIO_DRIVER_DUMMY 1)
-  file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dummy/*.c)
+  file(GLOB AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/dummy/*.c)
   list(APPEND SOURCE_FILES ${AUDIO_SOURCES})
 endif()
 if(NOT HAVE_SDL_VIDEO)
   set(SDL_VIDEO_DRIVER_DUMMY 1)
-  file(GLOB VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/dummy/*.c)
+  file(GLOB VIDEO_SOURCES ${SDL3_SOURCE_DIR}/src/video/dummy/*.c)
   list(APPEND SOURCE_FILES ${VIDEO_SOURCES})
 endif()
 if(NOT HAVE_SDL_JOYSTICK)
   set(SDL_JOYSTICK_DUMMY 1)
-  file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c)
+  file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/dummy/*.c)
   list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})
 endif()
 if(NOT HAVE_SDL_HAPTIC)
   set(SDL_HAPTIC_DUMMY 1)
-  file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
+  file(GLOB HAPTIC_SOURCES ${SDL3_SOURCE_DIR}/src/haptic/dummy/*.c)
   list(APPEND SOURCE_FILES ${HAPTIC_SOURCES})
 endif()
 if(NOT HAVE_SDL_SENSORS)
   set(SDL_SENSOR_DUMMY 1)
-  file(GLOB SENSORS_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/dummy/*.c)
+  file(GLOB SENSORS_SOURCES ${SDL3_SOURCE_DIR}/src/sensor/dummy/*.c)
   list(APPEND SOURCE_FILES ${SENSORS_SOURCES})
 endif()
 if(NOT HAVE_SDL_LOADSO)
   set(SDL_LOADSO_DUMMY 1)
-  file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dummy/*.c)
+  file(GLOB LOADSO_SOURCES ${SDL3_SOURCE_DIR}/src/loadso/dummy/*.c)
   list(APPEND SOURCE_FILES ${LOADSO_SOURCES})
 endif()
 if(NOT HAVE_SDL_FILESYSTEM)
   set(SDL_FILESYSTEM_DUMMY 1)
-  file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/dummy/*.c)
+  file(GLOB FILESYSTEM_SOURCES ${SDL3_SOURCE_DIR}/src/filesystem/dummy/*.c)
   list(APPEND SOURCE_FILES ${FILESYSTEM_SOURCES})
 endif()
 if(NOT HAVE_SDL_LOCALE)
   set(SDL_LOCALE_DUMMY 1)
-  file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/dummy/*.c)
+  file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/dummy/*.c)
   list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
 endif()
 if(NOT HAVE_SDL_MISC)
   set(SDL_MISC_DUMMY 1)
-  file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/dummy/*.c)
+  file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/dummy/*.c)
   list(APPEND SOURCE_FILES ${MISC_SOURCES})
 endif()
 
@@ -2884,7 +2810,7 @@ if(NOT HAVE_SDL_THREADS)
   # The emscripten platform has been carefully vetted to work without threads
   if (EMSCRIPTEN)
     set(SDL_THREADS_DISABLED 1)
-    file(GLOB THREADS_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/*.c)
+    file(GLOB THREADS_SOURCES ${SDL3_SOURCE_DIR}/src/thread/generic/*.c)
     list(APPEND SOURCE_FILES ${THREADS_SOURCES})
   else()
     message_error("Threads are needed by many SDL subsystems and may not be disabled")
@@ -2892,12 +2818,12 @@ if(NOT HAVE_SDL_THREADS)
 endif()
 if(NOT HAVE_SDL_TIMERS)
   set(SDL_TIMER_DUMMY 1)
-  file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/dummy/*.c)
+  file(GLOB TIMER_SOURCES ${SDL3_SOURCE_DIR}/src/timer/dummy/*.c)
   list(APPEND SOURCE_FILES ${TIMER_SOURCES})
 endif()
 
 if(NOT SDLMAIN_SOURCES)
-  file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/dummy/*.c)
+  file(GLOB SDLMAIN_SOURCES ${SDL3_SOURCE_DIR}/src/main/dummy/*.c)
 endif()
 
 # Append the -MMD -MT flags
@@ -2909,15 +2835,15 @@ endif()
 
 # config variables may contain generator expression, so we need to generate SDL_config.h in 2 steps:
 # 1. replace all `#cmakedefine`'s and `@abc@`
-configure_file("${SDL2_SOURCE_DIR}/include/SDL_config.h.cmake"
-  "${SDL2_BINARY_DIR}/SDL_config.h.intermediate")
+configure_file("${SDL3_SOURCE_DIR}/include/SDL_config.h.cmake"
+  "${SDL3_BINARY_DIR}/SDL_config.h.intermediate")
 # 2. Create the "include-config-${CMAKE_BUILD_TYPE}" folder (fails on older CMake versions when it does not exist)
 string(TOLOWER "${CMAKE_BUILD_TYPE}" lower_build_type)
 execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include-config-${lower_build_type}")
 # 3. generate SDL_config in an build_type-dependent folder (which should be first in the include search path)
 file(GENERATE
-    OUTPUT "${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
-    INPUT "${SDL2_BINARY_DIR}/SDL_config.h.intermediate")
+    OUTPUT "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
+    INPUT "${SDL3_BINARY_DIR}/SDL_config.h.intermediate")
 
 # Prepare the flags and remove duplicates
 if(EXTRA_LDFLAGS)
@@ -2934,8 +2860,9 @@ set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
 
 # Compat helpers for the configuration files
 
-if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION")
-  file(READ "${PROJECT_SOURCE_DIR}/VERSION" SDL_SOURCE_VERSION)
+if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION.txt")
+  file(READ "${PROJECT_SOURCE_DIR}/VERSION.txt" SDL_SOURCE_VERSION)
+  string(STRIP "${SDL_SOURCE_VERSION}" SDL_SOURCE_VERSION)
 endif()
 
 find_package(Git)
@@ -2965,32 +2892,32 @@ else()
   set(SDL_REVISION "SDL-${SDL_VERSION}-no-vcs")
 endif()
 
-configure_file("${SDL2_SOURCE_DIR}/include/SDL_revision.h.cmake"
-  "${SDL2_BINARY_DIR}/include/SDL_revision.h")
+configure_file("${SDL3_SOURCE_DIR}/include/SDL_revision.h.cmake"
+  "${SDL3_BINARY_DIR}/include/SDL_revision.h")
 
-# Copy all non-generated headers to "${SDL2_BINARY_DIR}/include"
+# Copy all non-generated headers to "${SDL3_BINARY_DIR}/include"
 # This is done to avoid the inclusion of a pre-generated SDL_config.h
-file(GLOB SDL2_INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/*.h)
-set(SDL2_COPIED_INCLUDE_FILES)
-foreach(_hdr IN LISTS SDL2_INCLUDE_FILES)
+file(GLOB SDL3_INCLUDE_FILES ${SDL3_SOURCE_DIR}/include/*.h)
+set(SDL3_COPIED_INCLUDE_FILES)
+foreach(_hdr IN LISTS SDL3_INCLUDE_FILES)
   if(_hdr MATCHES ".*(SDL_config|SDL_revision).*")
-    list(REMOVE_ITEM SDL2_INCLUDE_FILES "${_hdr}")
+    list(REMOVE_ITEM SDL3_INCLUDE_FILES "${_hdr}")
   else()
     get_filename_component(_name "${_hdr}" NAME)
-    set(_bin_hdr "${SDL2_BINARY_DIR}/include/${_name}")
-    list(APPEND SDL2_COPIED_INCLUDE_FILES "${_bin_hdr}")
+    set(_bin_hdr "${SDL3_BINARY_DIR}/include/${_name}")
+    list(APPEND SDL3_COPIED_INCLUDE_FILES "${_bin_hdr}")
     add_custom_command(OUTPUT "${_bin_hdr}"
         COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_hdr}" "${_bin_hdr}"
         DEPENDS "${_hdr}")
   endif()
 endforeach()
-list(APPEND SDL_GENERATED_HEADERS ${SDL2_COPIED_INCLUDE_FILES})
+list(APPEND SDL_GENERATED_HEADERS ${SDL3_COPIED_INCLUDE_FILES})
 
 if(CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "" AND CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL ".lib")
   # Avoid conflict between the dll import library and the static library
-  set(sdl_static_libname "SDL2-static")
+  set(sdl_static_libname "SDL3-static")
 else()
-  set(sdl_static_libname "SDL2")
+  set(sdl_static_libname "SDL3")
 endif()
 
 set(prefix ${CMAKE_INSTALL_PREFIX})
@@ -3028,24 +2955,24 @@ listtostr(SDL_LIBS _SDL_LIBS)
 set(SDL_LIBS ${_SDL_LIBS})
 listtostr(SDL_CFLAGS _SDL_CFLAGS "")
 set(SDL_CFLAGS ${_SDL_CFLAGS})
-string(REGEX REPLACE "-lSDL2( |$)" "-l${sdl_static_libname} " SDL_STATIC_LIBS "${SDL_STATIC_LIBS}")
+string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_STATIC_LIBS "${SDL_STATIC_LIBS}")
 if(NOT SDL_SHARED)
-  string(REGEX REPLACE "-lSDL2( |$)" "-l${sdl_static_libname} " SDL_LIBS "${SDL_LIBS}")
+  string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_LIBS "${SDL_LIBS}")
 endif()
 
-if(SDL_STATIC AND SDL_SHARED AND NOT sdl_static_libname STREQUAL "SDL2")
-  message(STATUS "\"pkg-config --static --libs sdl2\" will return invalid information")
+if(SDL_STATIC AND SDL_SHARED AND NOT sdl_static_libname STREQUAL "SDL3")
+  message(STATUS "\"pkg-config --static --libs sdl3\" will return invalid information")
 endif()
 
 # MESSAGE(STATUS "SDL_LIBS: ${SDL_LIBS}")
 # MESSAGE(STATUS "SDL_STATIC_LIBS: ${SDL_STATIC_LIBS}")
 
-configure_file("${SDL2_SOURCE_DIR}/sdl2.pc.in"
-  "${SDL2_BINARY_DIR}/sdl2.pc" @ONLY)
-configure_file("${SDL2_SOURCE_DIR}/sdl2-config.in"
-  "${SDL2_BINARY_DIR}/sdl2-config" @ONLY)
-configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in"
-  "${SDL2_BINARY_DIR}/SDL2.spec" @ONLY)
+configure_file("${SDL3_SOURCE_DIR}/sdl3.pc.in"
+  "${SDL3_BINARY_DIR}/sdl3.pc" @ONLY)
+configure_file("${SDL3_SOURCE_DIR}/sdl3-config.in"
+  "${SDL3_BINARY_DIR}/sdl3-config" @ONLY)
+configure_file("${SDL3_SOURCE_DIR}/SDL3.spec.in"
+  "${SDL3_BINARY_DIR}/SDL3.spec" @ONLY)
 
 macro(check_add_debug_flag FLAG SUFFIX)
     check_c_compiler_flag(${FLAG} HAS_C_FLAG_${SUFFIX})
@@ -3112,6 +3039,19 @@ if (SDL_ASAN)
   endif()
 endif()
 
+if(SDL_CCACHE)
+  cmake_minimum_required(VERSION 3.4)
+  find_program(CCACHE_BINARY ccache)
+  if(CCACHE_BINARY)
+    set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY})
+    set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_BINARY})
+    set(CMAKE_OBJC_COMPILER_LAUNCHER ${CCACHE_BINARY})
+    set(HAVE_CCACHE ON)
+  else()
+    set(HAVE_CCACHE OFF)
+  endif()
+endif()
+
 if(SDL_TESTS)
   set(HAVE_TESTS ON)
 endif()
@@ -3122,7 +3062,7 @@ add_custom_target(sdl_headers_copy
 
 ##### Info output #####
 message(STATUS "")
-message(STATUS "SDL2 was configured with the following options:")
+message(STATUS "SDL3 was configured with the following options:")
 message(STATUS "")
 message(STATUS "Platform: ${CMAKE_SYSTEM}")
 message(STATUS "64-bit:   ${ARCH_64}")
@@ -3189,27 +3129,27 @@ endif()
 # Ensure that the extra cflags are used at compile time
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${EXTRA_CFLAGS_BUILD}")
 
-if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
+if(NOT WINDOWS_STORE AND NOT SDL3_DISABLE_SDL3MAIN)
   # Build SDLmain
-  add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
-  add_dependencies(SDL2main sdl_headers_copy)
+  add_library(SDL3main STATIC ${SDLMAIN_SOURCES})
+  add_dependencies(SDL3main sdl_headers_copy)
   # alias target for in-tree builds
-  add_library(SDL2::SDL2main ALIAS SDL2main)
-  target_include_directories(SDL2main BEFORE PRIVATE "${SDL2_BINARY_DIR}/include" PRIVATE "${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>")
-  target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>" $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>)
+  add_library(SDL3::SDL3main ALIAS SDL3main)
+  target_include_directories(SDL3main BEFORE PRIVATE "${SDL3_BINARY_DIR}/include" PRIVATE "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>")
+  target_include_directories(SDL3main PUBLIC "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>" $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>)
   if (WIN32)
-    target_link_libraries(SDL2main PRIVATE shell32)
+    target_link_libraries(SDL3main PRIVATE shell32)
   endif()
   if(MINGW OR CYGWIN)
     cmake_minimum_required(VERSION 3.13)
     if(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      target_link_options(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=_WinMain@16>")
+      target_link_options(SDL3main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=_WinMain@16>")
     else()
-      target_link_options(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=WinMain>")
+      target_link_options(SDL3main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=WinMain>")
     endif()
   endif()
   if (NOT ANDROID)
-    set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
+    set_target_properties(SDL3main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
   endif()
 endif()
 
@@ -3235,98 +3175,95 @@ if(APPLE)
 endif()
 
 if(SDL_SHARED)
-  add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
-  add_dependencies(SDL2 sdl_headers_copy)
+  add_library(SDL3 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
+  add_dependencies(SDL3 sdl_headers_copy)
   # alias target for in-tree builds
-  add_library(SDL2::SDL2 ALIAS SDL2)
-  set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+  add_library(SDL3::SDL3 ALIAS SDL3)
+  set_target_properties(SDL3 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
   if(NOT SDL_LIBC)
     check_cpu_architecture(x86 HAS_X86)
     if(HAS_X86)
       # FIXME: should be added for all architectures (missing symbols for ARM)
-      target_link_libraries(SDL2 PRIVATE "-nodefaultlib:MSVCRT")
+      target_link_libraries(SDL3 PRIVATE "-nodefaultlib:MSVCRT")
     endif()
   endif()
   if(APPLE)
     # FIXME: Remove SOVERSION in SDL3
-    set_target_properties(SDL2 PROPERTIES
+    set_target_properties(SDL3 PROPERTIES
       MACOSX_RPATH 1
       SOVERSION 0
-      OUTPUT_NAME "SDL2-${LT_RELEASE}")
+      OUTPUT_NAME "SDL3-${LT_RELEASE}")
   elseif(UNIX AND NOT ANDROID)
-    set_target_properties(SDL2 PROPERTIES
+    set_target_properties(SDL3 PROPERTIES
       VERSION ${LT_VERSION}
       SOVERSION ${LT_MAJOR}
-      OUTPUT_NAME "SDL2-${LT_RELEASE}")
+      OUTPUT_NAME "SDL3-${LT_RELEASE}")
   else()
     if(WINDOWS OR CYGWIN)
-      set_target_properties(SDL2 PROPERTIES
+      set_target_properties(SDL3 PROPERTIES
         DEFINE_SYMBOL DLL_EXPORT)
-    elseif(OS2)
-      set_target_properties(SDL2 PROPERTIES
-        DEFINE_SYMBOL BUILD_SDL)
     endif()
-    set_target_properties(SDL2 PROPERTIES
+    set_target_properties(SDL3 PROPERTIES
       VERSION ${SDL_VERSION}
       SOVERSION ${LT_REVISION}
-      OUTPUT_NAME "SDL2")
+      OUTPUT_NAME "SDL3")
   endif()
   # Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
   if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
     # Don't try to link with the default set of libraries.
     if(NOT WINDOWS_STORE)
-      set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
-      set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
+      set_target_properties(SDL3 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
+      set_target_properties(SDL3 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
     endif()
-    set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
+    set_target_properties(SDL3 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
   endif()
   # FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS
-  target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD})
-  target_include_directories(SDL2 PUBLIC
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>"
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
+  target_link_libraries(SDL3 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD})
+  target_include_directories(SDL3 PUBLIC
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>"
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
       "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>")
+      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>")
   # This picks up all the compiler options and such we've accumulated up to here.
-  target_link_libraries(SDL2 PRIVATE $<BUILD_INTERFACE:sdl-build-options>)
+  target_link_libraries(SDL3 PRIVATE $<BUILD_INTERFACE:sdl-build-options>)
   if(MINGW OR CYGWIN)
     if(NOT CMAKE_VERSION VERSION_LESS "3.13")
-      target_link_options(SDL2 PRIVATE -static-libgcc)
+      target_link_options(SDL3 PRIVATE -static-libgcc)
     endif()
   endif()
   if(NOT ANDROID)
-    set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
+    set_target_properties(SDL3 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
   endif()
   # Use `Compatible Interface Properties` to allow consumers to enforce a shared/static library
-  set_property(TARGET SDL2 PROPERTY INTERFACE_SDL2_SHARED TRUE)
-  set_property(TARGET SDL2 APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL2_SHARED)
+  set_property(TARGET SDL3 PROPERTY INTERFACE_SDL3_SHARED TRUE)
+  set_property(TARGET SDL3 APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL3_SHARED)
 endif()
 
 if(SDL_STATIC)
-  add_library(SDL2-static STATIC ${SOURCE_FILES})
-  add_dependencies(SDL2-static sdl_headers_copy)
+  add_library(SDL3-static STATIC ${SOURCE_FILES})
+  add_dependencies(SDL3-static sdl_headers_copy)
   # alias target for in-tree builds
-  add_library(SDL2::SDL2-static ALIAS SDL2-static)
-  set_target_properties(SDL2-static PROPERTIES
+  add_library(SDL3::SDL3-static ALIAS SDL3-static)
+  set_target_properties(SDL3-static PROPERTIES
     OUTPUT_NAME "${sdl_static_libname}"
     POSITION_INDEPENDENT_CODE "${SDL_STATIC_PIC}")
-  target_compile_definitions(SDL2-static PRIVATE SDL_STATIC_LIB)
+  target_compile_definitions(SDL3-static PRIVATE SDL_STATIC_LIB)
   # TODO: Win32 platforms keep the same suffix .lib for import and static
   # libraries - do we need to consider this?
-  target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
-  target_include_directories(SDL2-static PUBLIC
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>"
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
+  target_link_libraries(SDL3-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
+  target_include_directories(SDL3-static PUBLIC
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>"
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
       "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>")
+      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>")
   # This picks up all the compiler options and such we've accumulated up to here.
-  target_link_libraries(SDL2-static PRIVATE $<BUILD_INTERFACE:sdl-build-options>)
+  target_link_libraries(SDL3-static PRIVATE $<BUILD_INTERFACE:sdl-build-options>)
   if(NOT ANDROID)
-    set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
+    set_target_properties(SDL3-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
   endif()
   # Use `Compatible Interface Properties` to allow consumers to enforce a shared/static library
-  set_property(TARGET SDL2-static PROPERTY INTERFACE_SDL2_SHARED FALSE)
-  set_property(TARGET SDL2-static APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL2_SHARED)
+  set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL3_SHARED FALSE)
+  set_property(TARGET SDL3-static APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL3_SHARED)
 endif()
 
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSDL_BUILD_MAJOR_VERSION=${SDL_MAJOR_VERSION}")
@@ -3336,45 +3273,45 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSDL_BUILD_MICRO_VERSION=${SDL_MICRO_VERSIO
 ##### Tests #####
 
 if(SDL_TEST)
-  file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
-  add_library(SDL2_test STATIC ${TEST_SOURCES})
-  add_dependencies(SDL2_test sdl_headers_copy)
-  add_library(SDL2::SDL2test ALIAS SDL2_test)
-  set_target_properties(SDL2_test PROPERTIES
-      EXPORT_NAME SDL2test)
-  target_include_directories(SDL2_test PUBLIC
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>"
-      "$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
+  file(GLOB TEST_SOURCES ${SDL3_SOURCE_DIR}/src/test/*.c)
+  add_library(SDL3_test STATIC ${TEST_SOURCES})
+  add_dependencies(SDL3_test sdl_headers_copy)
+  add_library(SDL3::SDL3test ALIAS SDL3_test)
+  set_target_properties(SDL3_test PROPERTIES
+      EXPORT_NAME SDL3test)
+  target_include_directories(SDL3_test PUBLIC
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>"
+      "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>>"
       "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>")
-  target_link_libraries(SDL2_test PRIVATE ${EXTRA_TEST_LIBS})
+      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>")
+  target_link_libraries(SDL3_test PRIVATE ${EXTRA_TEST_LIBS})
 endif()
 
 ##### Installation targets #####
-if(NOT SDL2_DISABLE_INSTALL)
+if(NOT SDL3_DISABLE_INSTALL)
   if(SDL_SHARED)
-    install(TARGETS SDL2 EXPORT SDL2Targets
+    install(TARGETS SDL3 EXPORT SDL3Targets
       LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
   endif()
 
-  if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
-    install(TARGETS SDL2main EXPORT SDL2mainTargets
+  if(NOT WINDOWS_STORE AND NOT SDL3_DISABLE_SDL3MAIN)
+    install(TARGETS SDL3main EXPORT SDL3mainTargets
       LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
   endif()
 
   if(SDL_STATIC)
-    install(TARGETS SDL2-static EXPORT SDL2staticTargets
+    install(TARGETS SDL3-static EXPORT SDL3staticTargets
       LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
   endif()
 
   if(SDL_TEST)
-    install(TARGETS SDL2_test EXPORT SDL2testTargets
+    install(TARGETS SDL3_test EXPORT SDL3testTargets
       LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
@@ -3383,85 +3320,85 @@ if(NOT SDL2_DISABLE_INSTALL)
   ##### Export files #####
   if (WINDOWS AND NOT MINGW)
     set(SDL_INSTALL_CMAKEDIR_DEFAULT "cmake")
-    set(LICENSES_PREFIX "licenses/SDL2")
+    set(LICENSES_PREFIX "licenses/SDL3")
   else ()
-    set(SDL_INSTALL_CMAKEDIR_DEFAULT "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2")
+    set(SDL_INSTALL_CMAKEDIR_DEFAULT "${CMAKE_INSTALL_LIBDIR}/cmake/SDL3")
     set(LICENSES_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/licenses/${PROJECT_NAME}")
   endif ()
-  set(SDL_INSTALL_CMAKEDIR "${SDL_INSTALL_CMAKEDIR_DEFAULT}" CACHE STRING "Location where to install SDL2Config.cmake")
+  set(SDL_INSTALL_CMAKEDIR "${SDL_INSTALL_CMAKEDIR_DEFAULT}" CACHE STRING "Location where to install SDL3Config.cmake")
 
   include(CMakePackageConfigHelpers)
-  configure_package_config_file(SDL2Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/SDL2Config.cmake"
+  configure_package_config_file(SDL3Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/SDL3Config.cmake"
     PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_INSTALL_FULL_BINDIR CMAKE_INSTALL_FULL_INCLUDEDIR CMAKE_INSTALL_FULL_LIBDIR
     INSTALL_DESTINATION "${SDL_INSTALL_CMAKEDIR}"
   )
-  write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/SDL2ConfigVersion.cmake"
+  write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/SDL3ConfigVersion.cmake"
     VERSION ${SDL_VERSION}
     COMPATIBILITY AnyNewerVersion
   )
 
   if(SDL_SHARED)
-    install(EXPORT SDL2Targets
-      FILE SDL2Targets.cmake
-      NAMESPACE SDL2::
+    install(EXPORT SDL3Targets
+      FILE SDL3Targets.cmake
+      NAMESPACE SDL3::
       DESTINATION "${SDL_INSTALL_CMAKEDIR}"
     )
     if(ANDROID AND NOT CMAKE_VERSION VERSION_LESS 3.7)
-      install(EXPORT_ANDROID_MK SDL2Targets
-        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL2")
+      install(EXPORT_ANDROID_MK SDL3Targets
+        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL3")
     endif()
   endif()
 
-  if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
-    install(EXPORT SDL2mainTargets
-      FILE SDL2mainTargets.cmake
-      NAMESPACE SDL2::
+  if(NOT WINDOWS_STORE AND NOT SDL3_DISABLE_SDL3MAIN)
+    install(EXPORT SDL3mainTargets
+      FILE SDL3mainTargets.cmake
+      NAMESPACE SDL3::
       DESTINATION "${SDL_INSTALL_CMAKEDIR}"
     )
     if(ANDROID AND NOT CMAKE_VERSION VERSION_LESS 3.7)
-      install(EXPORT_ANDROID_MK SDL2mainTargets
-        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL2main")
+      install(EXPORT_ANDROID_MK SDL3mainTargets
+        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL3main")
     endif()
   endif()
 
   if(SDL_STATIC)
-    install(EXPORT SDL2staticTargets
-      FILE SDL2staticTargets.cmake
-      NAMESPACE SDL2::
+    install(EXPORT SDL3staticTargets
+      FILE SDL3staticTargets.cmake
+      NAMESPACE SDL3::
       DESTINATION "${SDL_INSTALL_CMAKEDIR}"
     )
     if(ANDROID AND NOT CMAKE_VERSION VERSION_LESS 3.7)
-      install(EXPORT_ANDROID_MK SDL2staticTargets
-        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL2-static")
+      install(EXPORT_ANDROID_MK SDL3staticTargets
+        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL3-static")
     endif()
   endif()
 
   if(SDL_TEST)
-    install(EXPORT SDL2testTargets
-      FILE SDL2testTargets.cmake
-      NAMESPACE SDL2::
+    install(EXPORT SDL3testTargets
+      FILE SDL3testTargets.cmake
+      NAMESPACE SDL3::
       DESTINATION "${SDL_INSTALL_CMAKEDIR}"
     )
     if(ANDROID AND NOT CMAKE_VERSION VERSION_LESS 3.7)
-      install(EXPORT_ANDROID_MK SDL2testTargets
-        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL2test")
+      install(EXPORT_ANDROID_MK SDL3testTargets
+        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/ndk-modules/SDL3test")
     endif()
   endif()
 
   install(
     FILES
-      ${CMAKE_CURRENT_BINARY_DIR}/SDL2Config.cmake
-      ${CMAKE_CURRENT_BINARY_DIR}/SDL2ConfigVersion.cmake
+      ${CMAKE_CURRENT_BINARY_DIR}/SDL3Config.cmake
+      ${CMAKE_CURRENT_BINARY_DIR}/SDL3ConfigVersion.cmake
     DESTINATION "${SDL_INSTALL_CMAKEDIR}"
     COMPONENT Devel
   )
 
   install(
     FILES
-      ${SDL2_INCLUDE_FILES}
-      "${SDL2_BINARY_DIR}/include/SDL_revision.h"
-      "${SDL2_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL2)
+      ${SDL3_INCLUDE_FILES}
+      "${SDL3_BINARY_DIR}/include/SDL_revision.h"
+      "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL3)
 
   string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
   if (UPPER_BUILD_TYPE MATCHES DEBUG)
@@ -3473,32 +3410,32 @@ if(NOT SDL2_DISABLE_INSTALL)
   install(FILES "LICENSE.txt" DESTINATION "${LICENSES_PREFIX}")
   if(FREEBSD)
     # FreeBSD uses ${PREFIX}/libdata/pkgconfig
-    install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "libdata/pkgconfig")
+    install(FILES ${SDL3_BINARY_DIR}/sdl3.pc DESTINATION "libdata/pkgconfig")
   else()
-    install(FILES ${SDL2_BINARY_DIR}/sdl2.pc
+    install(FILES ${SDL3_BINARY_DIR}/sdl3.pc
             DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
   endif()
   if(NOT (WINDOWS OR CYGWIN) OR MINGW)
     if(SDL_SHARED)
       set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
-      get_target_property(SONAME SDL2 OUTPUT_NAME)
-      if(NOT ANDROID AND NOT MINGW AND NOT OS2)
+      get_target_property(SONAME SDL3 OUTPUT_NAME)
+      if(NOT ANDROID AND NOT MINGW)
           install(CODE "
             execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
-              \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
-              WORKING_DIRECTORY \"${SDL2_BINARY_DIR}\")")
-          install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+              \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL3${SOPOSTFIX}${SOEXT}\"
+              WORKING_DIRECTORY \"${SDL3_BINARY_DIR}\")")
+          install(FILES ${SDL3_BINARY_DIR}/libSDL3${SOPOSTFIX}${SOEXT} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
       endif()
     endif()
-    install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION "${CMAKE_INSTALL_BINDIR}")
+    install(PROGRAMS ${SDL3_BINARY_DIR}/sdl3-config DESTINATION "${CMAKE_INSTALL_BINDIR}")
     # TODO: what about the .spec file? Is it only needed for RPM creation?
-    install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/aclocal")
+    install(FILES "${SDL3_SOURCE_DIR}/sdl3.m4" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/aclocal")
   endif()
 endif()
 
 ##### Uninstall target #####
 
-if(NOT SDL2_DISABLE_UNINSTALL)
+if(NOT SDL3_DISABLE_UNINSTALL)
   if(NOT TARGET uninstall)
     configure_file(
         "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
@@ -3521,7 +3458,7 @@ endif()
 ##### Fix Objective C builds #####
 set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${CMAKE_C_FLAGS}")
 
-# Make sure SDL2::SDL2 always exists
-if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
-  add_library(SDL2::SDL2 ALIAS SDL2-static)
+# Make sure SDL3::SDL3 always exists
+if(TARGET SDL3::SDL3-static AND NOT TARGET SDL3::SDL3)
+  add_library(SDL3::SDL3 ALIAS SDL3-static)
 endif()

+ 30 - 30
Makefile.in

@@ -13,7 +13,7 @@ datarootdir = @datarootdir@
 datadir	= @datadir@
 auxdir	= @ac_aux_dir@
 distpath = $(srcdir)/..
-distdir = SDL2-@SDL_VERSION@
+distdir = SDL3-@SDL_VERSION@
 distfile = $(distdir).tar.gz
 
 @SET_MAKE@
@@ -34,25 +34,25 @@ LINKER = @LINKER@
 LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
 SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
 
-TARGET  = libSDL2.la
+TARGET  = libSDL3.la
 OBJECTS = @OBJECTS@
 GEN_HEADERS = @GEN_HEADERS@
 GEN_OBJECTS = @GEN_OBJECTS@
 VERSION_OBJECTS = @VERSION_OBJECTS@
 
-SDLMAIN_TARGET = libSDL2main.la
+SDLMAIN_TARGET = libSDL3main.la
 SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
 
-SDLTEST_TARGET = libSDL2_test.la
+SDLTEST_TARGET = libSDL3_test.la
 SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
 
 WAYLAND_SCANNER = @WAYLAND_SCANNER@
 WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
 
-INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
+INSTALL_SDL3_CONFIG = @INSTALL_SDL3_CONFIG@
 
-SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
-GEN_DIST = SDL2.spec
+SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl3-config.cmake.in sdl3-config-version.cmake.in sdl3-config.in sdl3.m4 sdl3.pc.in SDL3.spec.in SDL3Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
+GEN_DIST = SDL3.spec
 
 ifneq ($V,1)
 RUN_CMD_AR     = @echo "  AR    " $@;
@@ -168,21 +168,21 @@ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
 
 install: all install-bin install-hdrs install-lib install-data
 install-bin:
-ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
+ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
-	$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
+	$(INSTALL) -m 755 sdl3-config $(DESTDIR)$(bindir)/sdl3-config
 endif
 
 install-hdrs: update-revision
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
+	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL3
 	for file in $(HDRS) $(SDLTEST_HDRS); do \
-	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
+	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL3/$$file; \
 	done
-	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
+	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL3/SDL_config.h
 	if test -f include/SDL_revision.h; then \
-	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
+	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
 	else \
-	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
+	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
 	fi
 
 install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
@@ -192,34 +192,34 @@ install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLT
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
 install-data:
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
-	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
+	$(INSTALL) -m 644 $(srcdir)/sdl3.m4 $(DESTDIR)$(datadir)/aclocal/sdl3.m4
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
-	$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
-ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
-	$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
-	$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
+	$(INSTALL) -m 644 sdl3.pc $(DESTDIR)$(libdir)/pkgconfig
+ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
+	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL3
+	$(INSTALL) -m 644 sdl3-config.cmake $(DESTDIR)$(libdir)/cmake/SDL3
+	$(INSTALL) -m 644 sdl3-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL3
 endif
 
 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
 uninstall-bin:
-	rm -f $(DESTDIR)$(bindir)/sdl2-config
+	rm -f $(DESTDIR)$(bindir)/sdl3-config
 uninstall-hdrs:
 	for file in $(HDRS) $(SDLTEST_HDRS); do \
-	    rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
+	    rm -f $(DESTDIR)$(includedir)/SDL3/$$file; \
 	done
-	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
-	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
-	-rmdir $(DESTDIR)$(includedir)/SDL2
+	rm -f $(DESTDIR)$(includedir)/SDL3/SDL_config.h
+	rm -f $(DESTDIR)$(includedir)/SDL3/SDL_revision.h
+	-rmdir $(DESTDIR)$(includedir)/SDL3
 uninstall-lib:
 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
 	rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
 uninstall-data:
-	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
-	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
-	rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
-	rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
+	rm -f $(DESTDIR)$(datadir)/aclocal/sdl3.m4
+	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl3.pc
+	rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config.cmake
+	rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config-version.cmake
 
 clean:
 	rm -rf $(objects)
@@ -227,7 +227,7 @@ clean:
 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
 
 distclean: clean
-	rm -f Makefile Makefile.rules sdl2-config
+	rm -f Makefile Makefile.rules sdl3-config
 	rm -f config.status config.cache config.log libtool
 	rm -rf $(srcdir)/autom4te*
 	find $(srcdir) \( \

+ 2 - 2
Makefile.minimal

@@ -5,8 +5,8 @@ CFLAGS  = -g -O2 $(INCLUDE)
 AR	= ar
 RANLIB	= ranlib
 
-TARGET  = libSDL2.a
-TESTTARGET = libSDL2_test.a
+TARGET  = libSDL3.a
+TESTTARGET = libSDL3_test.a
 
 SOURCES = \
 	src/*.c \

+ 0 - 296
Makefile.os2

@@ -1,296 +0,0 @@
-# Open Watcom makefile to build SDL2.dll for OS/2
-# wmake -f Makefile.os2
-#
-# If you have GNU libiconv installed (iconv2.dll), you
-# can compile against it by specifying LIBICONV=1, e.g.:
-# wmake -f Makefile.os2 LIBICONV=1
-#
-# If you have libusb-1.0 installed (usb100.dll, libusb.h), you
-# can compile hidapi joystick support against it (experimental)
-# by specifying HIDAPI=1, e.g.:
-# wmake -f Makefile.os2 HIDAPI=1
-#
-# To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
-
-LIBNAME = SDL2
-MAJOR_VERSION = 2
-MINOR_VERSION = 25
-MICRO_VERSION = 0
-VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
-DESCRIPTION = Simple DirectMedia Layer 2
-
-LIBICONV=0
-ICONVLIB=$(LIBICONV_LIB)
-
-LIBHOME = .
-DLLFILE = $(LIBHOME)/$(LIBNAME).dll
-LIBFILE = $(LIBHOME)/$(LIBNAME).lib
-LNKFILE = $(LIBNAME).lnk
-
-INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
-INCPATH+= -Iinclude
-
-LIBM = SDL2libm.lib
-TLIB = SDL2test.lib
-LIBS = mmpm2.lib $(LIBM)
-CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
-# Debug options:
-# - debug messages from OS/2 related code to stdout:
-#CFLAGS+= -DOS2DEBUG
-# - debug messages from OS/2 code via SDL_LogDebug():
-#CFLAGS+= -DOS2DEBUG=2
-
-# max warnings:
-CFLAGS+= -wx
-!ifeq ENABLE_WERROR 1
-CFLAGS+= -we
-!endif
-# newer OpenWatcom versions enable W303 by default
-CFLAGS+= -wcd=303
-# the include paths :
-CFLAGS+= $(INCPATH)
-CFLAGS_STATIC=$(CFLAGS)
-# building dll:
-CFLAGS_DLL =$(CFLAGS)
-CFLAGS_DLL+= -bd
-# iconv:
-LIBICONV_LIB=iconv2.lib
-!ifeq LIBICONV 1
-CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
-LIBS+= $(ICONVLIB)
-!else
-LIBS+= libuls.lib libconv.lib
-!endif
-# hidapi (libusb):
-!ifeq HIDAPI 1
-CFLAGS_DLL+= -DHAVE_LIBUSB_H=1
-!endif
-# building SDL itself (for DECLSPEC):
-CFLAGS_DLL+= -DBUILD_SDL
-
-CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
-CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
-CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
-
-SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
-SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
-SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
-SRCS+= SDL_rwops.c SDL_power.c
-SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
-SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
-       SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
-       SDL_sensor.c SDL_touch.c
-SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
-SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
-       SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
-       SDL_render_sw.c SDL_rotate.c SDL_triangle.c
-SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
-       SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
-       SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
-       SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
-
-SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
-SRCS+= SDL_systimer.c
-SRCS+= SDL_sysloadso.c
-SRCS+= SDL_sysfilesystem.c
-SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
-SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
-SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
-SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
-SRCS+= SDL_dummysensor.c
-SRCS+= SDL_locale.c SDL_syslocale.c
-SRCS+= SDL_url.c SDL_sysurl.c
-
-SRCS+= SDL_os2.c
-!ifeq LIBICONV 0
-SRCS+= geniconv.c os2cp.c os2iconv.c sys2utf8.c
-!endif
-SRCS+= SDL_os2audio.c
-SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
-       SDL_os2mouse.c SDL_os2messagebox.c
-
-SRCS+= SDL_dynapi.c
-
-OBJS = $(SRCS:.c=.obj)
-
-.extensions:
-.extensions: .lib .dll .obj .c .asm
-
-.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
-.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
-.c: ./src/core/os2;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
-.c: ./src/core/os2/geniconv;
-.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy;./src/joystick/hidapi;./src/hidapi
-
-all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
-
-build_dll: .symbolic
-    @echo * Compiling dll objects
-
-$(DLLFILE): build_dll $(OBJS) $(LIBM) $(LIBICONV_LIB) $(LNKFILE)
-    @echo * Linking: $@
-    wlink @$(LNKFILE)
-
-$(LIBFILE): $(DLLFILE)
-    @echo * Creating LIB file: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
-
-.c.obj:
-    wcc386 $(CFLAGS_DLL) -fo=$^@ $<
-
-SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
-    wcc386 $(CFLAGS_DLL) -fo=$^@ $<
-SDL_cpuinfo.obj: SDL_cpuinfo.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_wave.obj: SDL_wave.c
-    wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
-SDL_blendfillrect.obj: SDL_blendfillrect.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_blendline.obj: SDL_blendline.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_blendpoint.obj: SDL_blendpoint.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_RLEaccel.obj: SDL_RLEaccel.c
-    wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
-!ifeq HIDAPI 1
-# c99 mode needed because of structs with flexible array members in libusb.h
-SDL_hidapi.obj: SDL_hidapi.c
-    wcc386 $(CFLAGS_DLL) -za99 -fo=$^@ $<
-!endif
-
-$(LIBICONV_LIB):  "src/core/os2/iconv2.lbc"
-    @echo * Creating: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
-
-# SDL2libm
-MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
-       k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
-       s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
-MOBJS= $(MSRCS:.c=.obj)
-
-.c: ./src/libm;
-e_atan2.obj: e_atan2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_exp.obj: e_exp.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_fmod.obj: e_fmod.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_log10.obj: e_log10.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_log.obj: e_log.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_pow.obj: e_pow.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_rem_pio2.obj: e_rem_pio2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_sqrt.obj: e_sqrt.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_cos.obj: k_cos.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_rem_pio2.obj: k_rem_pio2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_sin.obj: k_sin.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_tan.obj: k_tan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_atan.obj: s_atan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_copysign.obj: s_copysign.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_cos.obj: s_cos.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_fabs.obj: s_fabs.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_floor.obj: s_floor.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_scalbn.obj: s_scalbn.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_sin.obj: s_sin.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_tan.obj: s_tan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-
-build_libm: .symbolic
-    @echo * Compiling libm objects
-$(LIBM): build_libm $(MOBJS)
-    @echo * Creating: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
-
-# SDL2test
-TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
-        SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
-        SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
-        SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
-        SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
-TOBJS= $(TSRCS:.c=.obj)
-
-.c: ./src/test;
-SDL_test_assert.obj: SDL_test_assert.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_common.obj: SDL_test_common.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_compare.obj: SDL_test_compare.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_crc32.obj: SDL_test_crc32.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_font.obj: SDL_test_font.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_fuzzer.obj: SDL_test_fuzzer.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_harness.obj: SDL_test_harness.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageBlit.obj: SDL_test_imageBlit.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageFace.obj: SDL_test_imageFace.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_log.obj: SDL_test_log.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_md5.obj: SDL_test_md5.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_random.obj: SDL_test_random.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_memory.obj: SDL_test_memory.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-
-build_tlib: .symbolic
-    @echo * Compiling testlib objects
-$(TLIB): build_tlib $(TOBJS)
-    @echo * Creating: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
-
-$(LNKFILE):
-    @echo * Creating linker file: $@
-    @%create $@
-    @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
-    @%append $@ NAME $(DLLFILE)
-    @for %i in ($(OBJS)) do @%append $@ FILE %i
-    @for %i in ($(LIBS)) do @%append $@ LIB %i
-    @%append $@ OPTION QUIET
-    @%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
-    @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
-    @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
-    @%append $@ OPTION ELIMINATE
-    @%append $@ OPTION MANYAUTODATA
-    @%append $@ OPTION OSNAME='OS/2 and eComStation'
-    @%append $@ OPTION SHOWDEAD
-
-clean: .SYMBOLIC
-    @echo * Clean: $(LIBNAME)
-    @if exist *.obj rm *.obj
-    @if exist *.err rm *.err
-    @if exist $(LNKFILE) rm $(LNKFILE)
-    @if exist $(LIBM) rm $(LIBM)
-    @if exist $(LIBICONV_LIB) rm $(LIBICONV_LIB)
-
-distclean: .SYMBOLIC clean
-    @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
-    @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
-    @if exist $(LIBFILE) rm $(LIBFILE)
-    @if exist $(DLLFILE) rm $(DLLFILE)
-    @if exist $(TLIB) rm $(TLIB)

+ 0 - 64
Makefile.pandora

@@ -1,64 +0,0 @@
-# Makefile to build the pandora SDL library
-
-AR	= arm-none-linux-gnueabi-ar
-RANLIB	= arm-none-linux-gnueabi-ranlib
-CC = arm-none-linux-gnueabi-gcc
-CXX = arm-none-linux-gnueabi-g++
-STRIP = arm-none-linux-gnueabi-strip
-
-CFLAGS  = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
-	-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
-	-I./include -I$(PNDSDK)/usr/include
-
-TARGET  = libSDL2.a
-
-SOURCES = 
-	./src/*.c \
-	./src/atomic/*.c \
-	./src/audio/*.c \
-	./src/audio/disk/*.c \
-	./src/audio/dsp/*.c \
-	./src/audio/dummy/*.c \
-	./src/cpuinfo/*.c \
-	./src/events/*.c \
-	./src/file/*.c \
-	./src/filesystem/unix/*.c \
-	./src/haptic/*.c \
-	./src/haptic/linux/*.c \
-	./src/hidapi/*.c \
-	./src/joystick/*.c \
-	./src/joystick/linux/*.c \
-	./src/loadso/dlopen/*.c \
-	./src/locale/*.c \
-	./src/locale/unix/*.c \
-	./src/misc/*.c \
-	./src/misc/unix/*.c \
-	./src/power/*.c \
-	./src/sensor/*.c \
-	./src/sensor/dummy/*.c \
-	./src/stdlib/*.c \
-	./src/thread/*.c \
-	./src/thread/pthread/SDL_syscond.c \
-	./src/thread/pthread/SDL_sysmutex.c \
-	./src/thread/pthread/SDL_syssem.c \
-	./src/thread/pthread/SDL_systhread.c \
-	./src/timer/*.c \
-	./src/timer/unix/*.c \
-	./src/video/*.c \
-	./src/video/yuv2rgb/*.c \
-	./src/video/dummy/*.c \
-	./src/video/x11/*.c \
-	./src/video/pandora/*.c
-
-OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
-
-CONFIG_H = $(shell cp include/SDL_config_pandora.h include/SDL_config.h)
-
-all: $(TARGET)
-
-$(TARGET): $(CONFIG_H) $(OBJECTS)
-	$(AR) crv $@ $^
-	$(RANLIB) $@
-
-clean:
-	rm -f $(TARGET) $(OBJECTS)

+ 0 - 280
Makefile.w32

@@ -1,280 +0,0 @@
-# Open Watcom makefile to build SDL2.dll for Win32
-# wmake -f Makefile.w32
-#
-# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
-
-LIBNAME = SDL2
-MAJOR_VERSION = 2
-MINOR_VERSION = 25
-MICRO_VERSION = 0
-VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
-
-LIBHOME = .
-DLLFILE = $(LIBHOME)/$(LIBNAME).dll
-LIBFILE = $(LIBHOME)/$(LIBNAME).lib
-EXPFILE = $(LIBHOME)/$(LIBNAME).exp
-LNKFILE = $(LIBNAME).lnk
-
-INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
-INCPATH+= -Iinclude
-INCPATH+= -I"src/video/khronos"
-
-LIBM = SDL2libm.lib
-TLIB = SDL2test.lib
-# user32.lib, gdi32.lib, ole32.lib and oleaut32.lib are actually
-# among the default libraries in wlink.lnk for nt_dll linkage...
-LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
-
-CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
-# max warnings:
-CFLAGS+= -wx
-!ifeq ENABLE_WERROR 1
-CFLAGS+= -we
-!endif
-# newer OpenWatcom versions enable W303 by default
-CFLAGS+= -wcd=303
-# new vulkan headers result in lots of W202 warnings
-CFLAGS+= -wcd=202
-# the include paths :
-CFLAGS+= $(INCPATH)
-CFLAGS_STATIC=$(CFLAGS)
-# building dll:
-CFLAGS_DLL =$(CFLAGS)
-CFLAGS_DLL+= -bd
-# we override the DECLSPEC define in begin_code.h, because we are using
-# an exports file to remove the _cdecl '_' prefix from the symbol names
-CFLAGS_DLL+= -DDECLSPEC=
-
-CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
-CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
-CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
-
-RCFLAGS = -q -r -bt=nt $(INCPATH)
-
-SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
-SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
-SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
-SRCS+= SDL_rwops.c SDL_power.c
-SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
-SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
-       SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
-       SDL_sensor.c SDL_touch.c
-SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
-SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
-       SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
-       SDL_render_sw.c SDL_rotate.c SDL_triangle.c
-SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
-       SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
-       SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
-       SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
-
-SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
-SRCS+= SDL_systimer.c
-SRCS+= SDL_sysloadso.c
-SRCS+= SDL_sysfilesystem.c
-SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
-SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
-SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
-SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
-SRCS+= SDL_dummysensor.c
-SRCS+= SDL_locale.c SDL_syslocale.c
-SRCS+= SDL_url.c SDL_sysurl.c
-
-SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
-SRCS+= SDL_hid.c SDL_immdevice.c SDL_windows.c SDL_xinput.c
-SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
-SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
-SRCS+= SDL_syspower.c
-SRCS+= SDL_d3dmath.c
-SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
-SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
-SRCS+= SDL_render_d3d12.c SDL_shaders_d3d12.c
-SRCS+= SDL_render_gl.c SDL_shaders_gl.c
-SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
-SRCS+= SDL_windowssensor.c
-SRCS+= SDL_syscond_cv.c
-SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
-
-SRCS+= SDL_dynapi.c
-
-RCSRCS = version.rc
-
-OBJS = $(SRCS:.c=.obj)
-RCOBJS= $(RCSRCS:.rc=.res)
-
-.extensions:
-.extensions: .lib .dll .obj .res .c .rc .asm
-
-.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
-.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
-.c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
-.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/direct3d12;./src/render/opengl;./src/render/opengles2
-.rc: ./src/main/windows
-
-all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
-
-build_dll: .symbolic
-    @echo * Compiling dll objects
-
-$(DLLFILE): build_dll $(OBJS) $(LIBM) $(RCOBJS) $(LNKFILE)
-    @echo * Linking: $@
-    wlink @$(LNKFILE)
-
-$(LIBFILE): $(DLLFILE)
-    @echo * Creating LIB file: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $* @$(EXPFILE)
-
-.c.obj:
-    wcc386 $(CFLAGS_DLL) -fo=$^@ $<
-
-.rc.res:
-    wrc $(RCFLAGS) -fo=$^@ $<
-
-SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
-    wcc386 $(CFLAGS_DLL) -fo=$^@ $<
-SDL_cpuinfo.obj: SDL_cpuinfo.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_wave.obj: SDL_wave.c
-    wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
-SDL_blendfillrect.obj: SDL_blendfillrect.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_blendline.obj: SDL_blendline.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_blendpoint.obj: SDL_blendpoint.c
-    wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
-SDL_RLEaccel.obj: SDL_RLEaccel.c
-    wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
-SDL_malloc.obj: SDL_malloc.c
-    wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
-
-# SDL2libm
-MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
-       k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
-       s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
-MOBJS= $(MSRCS:.c=.obj)
-
-.c: ./src/libm;
-e_atan2.obj: e_atan2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_exp.obj: e_exp.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_fmod.obj: e_fmod.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_log10.obj: e_log10.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_log.obj: e_log.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_pow.obj: e_pow.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_rem_pio2.obj: e_rem_pio2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-e_sqrt.obj: e_sqrt.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_cos.obj: k_cos.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_rem_pio2.obj: k_rem_pio2.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_sin.obj: k_sin.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-k_tan.obj: k_tan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_atan.obj: s_atan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_copysign.obj: s_copysign.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_cos.obj: s_cos.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_fabs.obj: s_fabs.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_floor.obj: s_floor.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_scalbn.obj: s_scalbn.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_sin.obj: s_sin.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-s_tan.obj: s_tan.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-
-build_libm: .symbolic
-    @echo * Compiling libm objects
-$(LIBM): build_libm $(MOBJS)
-    @echo * Creating: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
-
-# SDL2test
-TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
-        SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
-        SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
-        SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
-        SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
-TOBJS= $(TSRCS:.c=.obj)
-
-.c: ./src/test;
-SDL_test_assert.obj: SDL_test_assert.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_common.obj: SDL_test_common.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_compare.obj: SDL_test_compare.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_crc32.obj: SDL_test_crc32.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_font.obj: SDL_test_font.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_fuzzer.obj: SDL_test_fuzzer.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_harness.obj: SDL_test_harness.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageBlit.obj: SDL_test_imageBlit.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imageFace.obj: SDL_test_imageFace.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_log.obj: SDL_test_log.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_md5.obj: SDL_test_md5.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_random.obj: SDL_test_random.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-SDL_test_memory.obj: SDL_test_memory.c
-    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
-
-build_tlib: .symbolic
-    @echo * Compiling testlib objects
-$(TLIB): build_tlib $(TOBJS)
-    @echo * Creating: $@
-    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
-
-$(LNKFILE): Makefile.w32
-    @echo * Creating linker file: $@
-    @%create $@
-    @%append $@ SYSTEM nt_dll INITINSTANCE TERMINSTANCE
-    @%append $@ NAME $(DLLFILE)
-    @for %i in ($(OBJS)) do @%append $@ FILE %i
-    @for %i in ($(LIBS)) do @%append $@ LIB %i
-    @%append $@ OPTION RESOURCE=$(RCOBJS)
-    @%append $@ EXPORT=src/dynapi/SDL2.exports
-    @%append $@ OPTION QUIET
-    @%append $@ OPTION IMPF=$(EXPFILE)
-    @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
-    @%append $@ OPTION ELIMINATE
-    @%append $@ OPTION SHOWDEAD
-
-clean: .SYMBOLIC
-    @echo * Clean: $(LIBNAME)
-    @if exist *.obj rm *.obj
-    @if exist *.res rm *.res
-    @if exist *.err rm *.err
-    @if exist $(LNKFILE) rm $(LNKFILE)
-    @if exist $(LIBM) rm $(LIBM)
-
-distclean: .SYMBOLIC clean
-    @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
-    @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
-    @if exist $(LIBFILE) rm $(LIBFILE)
-    @if exist $(DLLFILE) rm $(DLLFILE)
-    @if exist $(TLIB) rm $(TLIB)

+ 1 - 1
README.md

@@ -1,5 +1,5 @@
 
-# Simple DirectMedia Layer (SDL) Version 2.0
+# Simple DirectMedia Layer (SDL) Version 3.0
 
 https://www.libsdl.org/
 

+ 0 - 65
SDL2Config.cmake.in

@@ -1,65 +0,0 @@
-# sdl2 cmake project-config input for CMakeLists.txt script
-
-include(FeatureSummary)
-set_package_properties(SDL2 PROPERTIES
-  URL "https://www.libsdl.org/"
-  DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
-)
-
-@PACKAGE_INIT@
-
-set(SDL2_FOUND TRUE)
-
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
-  set(SDL2_SDL2_FOUND TRUE)
-endif()
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
-  if(ANDROID)
-    enable_language(CXX)
-  endif()
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
-  set(SDL2_SDL2-static_FOUND TRUE)
-endif()
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
-  set(SDL2_SDL2main_FOUND TRUE)
-endif()
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
-  set(SDL2_SDL2test_FOUND TRUE)
-endif()
-
-check_required_components(SDL2)
-
-# Create SDL2::SDL2 alias for static-only builds
-if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
-  if(CMAKE_VERSION VERSION_LESS "3.18")
-    # FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
-    add_library(SDL2::SDL2 INTERFACE IMPORTED)
-    set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
-  else()
-    add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
-  endif()
-endif()
-
-# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
-
-set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
-set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
-set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
-set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
-set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
-set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
-set(SDL2_LIBRARIES SDL2::SDL2)
-set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
-set(SDL2_STATIC_PRIVATE_LIBS)
-
-set(SDL2MAIN_LIBRARY)
-if(TARGET SDL2::SDL2main)
-  set(SDL2MAIN_LIBRARY SDL2::SDL2main)
-  list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
-  list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
-endif()
-
-set(SDL2TEST_LIBRARY SDL2::SDL2test)

+ 3 - 3
SDL2.spec.in → SDL3.spec.in

@@ -1,5 +1,5 @@
 Summary: Simple DirectMedia Layer
-Name: SDL2
+Name: SDL3
 Version: @SDL_VERSION@
 Release: 2
 Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
@@ -9,7 +9,7 @@ Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
 Prefix: %{_prefix}
 %ifos linux
-Provides: libSDL2-2.0.so.0
+Provides: libSDL3-3.0.so.0
 %endif
 
 %define __defattr %defattr(-,root,root)
@@ -75,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/lib*.%{__soext}
 %{_includedir}/*/*.h
 %{_libdir}/cmake/*
-%{_libdir}/pkgconfig/SDL2/*
+%{_libdir}/pkgconfig/SDL3/*
 %{_datadir}/aclocal/*
 
 %changelog

+ 65 - 0
SDL3Config.cmake.in

@@ -0,0 +1,65 @@
+# SDL cmake project-config input for CMakeLists.txt script
+
+include(FeatureSummary)
+set_package_properties(SDL3 PROPERTIES
+  URL "https://www.libsdl.org/"
+  DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
+)
+
+@PACKAGE_INIT@
+
+set(SDL3_FOUND TRUE)
+
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
+  set(SDL3_SDL3_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
+  if(ANDROID)
+    enable_language(CXX)
+  endif()
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
+  set(SDL3_SDL3-static_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
+  set(SDL3_SDL3main_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
+  set(SDL3_SDL3test_FOUND TRUE)
+endif()
+
+check_required_components(SDL3)
+
+# Create SDL3::SDL3 alias for static-only builds
+if(TARGET SDL3::SDL3-static AND NOT TARGET SDL3::SDL3)
+  if(CMAKE_VERSION VERSION_LESS "3.18")
+    # FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
+    add_library(SDL3::SDL3 INTERFACE IMPORTED)
+    set_target_properties(SDL3::SDL3 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL3::SDL3-static")
+  else()
+    add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
+  endif()
+endif()
+
+# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
+
+set(SDL3_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+set(SDL3_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+set(SDL3_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL3")
+set(SDL3_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL3")
+set(SDL3_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
+set(SDL3_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
+set(SDL3_LIBRARIES SDL3::SDL3)
+set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
+set(SDL3_STATIC_PRIVATE_LIBS)
+
+set(SDL3MAIN_LIBRARY)
+if(TARGET SDL3::SDL3main)
+  set(SDL3MAIN_LIBRARY SDL3::SDL3main)
+  list(INSERT SDL3_LIBRARIES 0 SDL3::SDL3main)
+  list(INSERT SDL3_STATIC_LIBRARIES 0 SDL3::SDL3main)
+endif()
+
+set(SDL3TEST_LIBRARY SDL3::SDL3test)

+ 3 - 3
VisualC-GDK/SDL.sln

@@ -4,13 +4,13 @@ VisualStudioVersion = 17.1.32414.318
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D69D5741-611F-4E14-8541-1FEE94F50B5A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
 EndProject

+ 2 - 3
VisualC-GDK/SDL/SDL.vcxproj

@@ -27,7 +27,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2</ProjectName>
+    <ProjectName>SDL3</ProjectName>
     <ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
     <RootNamespace>SDL</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -378,7 +378,6 @@
     <ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
     <ClInclude Include="..\..\src\audio\SDL_wave.h" />
     <ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
-    <ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h" />
     <ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
     <ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
     <ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
@@ -534,7 +533,6 @@
     <ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
     <ClCompile Include="..\..\src\audio\SDL_mixer.c" />
     <ClCompile Include="..\..\src\audio\SDL_wave.c" />
-    <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
     <ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
@@ -600,6 +598,7 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
+    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />

+ 3 - 9
VisualC-GDK/SDL/SDL.vcxproj.filters

@@ -76,9 +76,6 @@
     <Filter Include="audio\dummy">
       <UniqueIdentifier>{4c8ad943-c2fb-4014-9ca3-041e0ad08426}</UniqueIdentifier>
     </Filter>
-    <Filter Include="audio\winmm">
-      <UniqueIdentifier>{e90fa293-2828-4927-8113-35bf561024a9}</UniqueIdentifier>
-    </Filter>
     <Filter Include="audio\wasapi">
       <UniqueIdentifier>{3d68ae70-a9ff-46cf-be69-069f0b02aca0}</UniqueIdentifier>
     </Filter>
@@ -534,9 +531,6 @@
     <ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h">
       <Filter>audio\dummy</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h">
-      <Filter>audio\winmm</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h">
       <Filter>audio\wasapi</Filter>
     </ClInclude>
@@ -1027,9 +1021,6 @@
     <ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c">
       <Filter>audio\dummy</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c">
-      <Filter>audio\winmm</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c">
       <Filter>audio\wasapi</Filter>
     </ClCompile>
@@ -1078,6 +1069,9 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c">
       <Filter>joystick\hidapi</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
+      <Filter>joystick\hidapi</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
       <Filter>joystick\hidapi</Filter>
     </ClCompile>

+ 2 - 2
VisualC-GDK/SDLmain/SDLmain.vcxproj

@@ -30,7 +30,7 @@
     <ClCompile Include="..\..\src\main\gdk\SDL_gdk_main.c" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2main</ProjectName>
+    <ProjectName>SDL3main</ProjectName>
     <ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
     <RootNamespace>SDLmain</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -208,4 +208,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>

+ 2 - 2
VisualC-GDK/SDLtest/SDLtest.vcxproj

@@ -27,7 +27,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2test</ProjectName>
+    <ProjectName>SDL3test</ProjectName>
     <ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
     <RootNamespace>SDLtest</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -223,4 +223,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 4
VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgamecontroller.exe"
@@ -19,8 +19,8 @@
 	</DesktopRegistration>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgamecontroller"
 					PublisherDisplayName="SDL"

+ 4 - 10
VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgamecontroller.exe"
@@ -12,15 +12,9 @@
 					Id="Game" />
 	</ExecutableList>
 
-	<DesktopRegistration>
-		<DependencyList>
-			<KnownDependency Name="VC14"/>
-		</DependencyList>
-	</DesktopRegistration>
-
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgamecontroller"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgamecontroller.exe"
@@ -13,8 +13,8 @@
 	</ExecutableList>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgamecontroller"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testgdk/wingdk/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgdk.exe"
@@ -19,8 +19,8 @@
 	</DesktopRegistration>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgdk"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testgdk/xboxone/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgdk.exe"
@@ -13,8 +13,8 @@
 	</ExecutableList>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgdk"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testgdk/xboxseries/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testgdk.exe"
@@ -13,8 +13,8 @@
 	</ExecutableList>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testgdk"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testsprite2/wingdk/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testsprite2.exe"
@@ -19,8 +19,8 @@
 	</DesktopRegistration>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testsprite2"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testsprite2/xboxone/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testsprite2.exe"
@@ -13,8 +13,8 @@
 	</ExecutableList>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testsprite2"
 					PublisherDisplayName="SDL"

+ 4 - 4
VisualC-GDK/tests/testsprite2/xboxseries/MicrosoftGame.config

@@ -2,9 +2,9 @@
 <Game configVersion="1">
 
 	<!-- Set these to the correct identifiers from Partner Center -->
-	<Identity Name="41336MicrosoftATG.ATGSimpleLiveSample"
+	<Identity Name="SDL"
 		Version="1.0.0.0"
-		Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"/>
+		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
 		<Executable Name="testsprite2.exe"
@@ -13,8 +13,8 @@
 	</ExecutableList>
 
 	<!-- Set these to the correct values from Partner Center -->
-	<TitleId>7325F784</TitleId>
-	<MSAAppId>0000000000000000</MSAAppId>
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
 
 	<ShellVisuals DefaultDisplayName="testsprite2"
 					PublisherDisplayName="SDL"

+ 1 - 1
VisualC-WinRT/SDL-UWP.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
 VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 10 - 10
VisualC-WinRT/SDL-UWP.vcxproj

@@ -349,8 +349,8 @@
   <PropertyGroup Label="Globals">
     <ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
     <Keyword>DynamicLibrary</Keyword>
-    <ProjectName>SDL2-UWP</ProjectName>
-    <RootNamespace>SDL2</RootNamespace>
+    <ProjectName>SDL3-UWP</ProjectName>
+    <RootNamespace>SDL3</RootNamespace>
     <DefaultLanguage>en-US</DefaultLanguage>
     <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
     <AppContainerApplication>true</AppContainerApplication>
@@ -439,42 +439,42 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <GenerateManifest>false</GenerateManifest>
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
-    <TargetName>SDL2</TargetName>
+    <TargetName>SDL3</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 4 - 1
VisualC-WinRT/SDL-UWP.vcxproj.filters

@@ -842,5 +842,8 @@
     <ClCompile Include="..\src\joystick\controller_type.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\src\stdlib\SDL_mslibc.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
-</Project>
+</Project>

+ 3 - 3
VisualC/SDL.sln

@@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D69D5741-611F-4E14-8541-1FEE94F50B5A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}"
 EndProject
@@ -40,7 +40,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshap
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
 EndProject

+ 2 - 3
VisualC/SDL/SDL.vcxproj

@@ -19,7 +19,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2</ProjectName>
+    <ProjectName>SDL3</ProjectName>
     <ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
     <RootNamespace>SDL</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -302,7 +302,6 @@
     <ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
     <ClInclude Include="..\..\src\audio\SDL_wave.h" />
     <ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
-    <ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h" />
     <ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
     <ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
     <ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
@@ -452,7 +451,6 @@
     <ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
     <ClCompile Include="..\..\src\audio\SDL_mixer.c" />
     <ClCompile Include="..\..\src\audio\SDL_wave.c" />
-    <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
     <ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
@@ -491,6 +489,7 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
+    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />

+ 3 - 9
VisualC/SDL/SDL.vcxproj.filters

@@ -76,9 +76,6 @@
     <Filter Include="audio\dummy">
       <UniqueIdentifier>{4c8ad943-c2fb-4014-9ca3-041e0ad08426}</UniqueIdentifier>
     </Filter>
-    <Filter Include="audio\winmm">
-      <UniqueIdentifier>{e90fa293-2828-4927-8113-35bf561024a9}</UniqueIdentifier>
-    </Filter>
     <Filter Include="audio\wasapi">
       <UniqueIdentifier>{3d68ae70-a9ff-46cf-be69-069f0b02aca0}</UniqueIdentifier>
     </Filter>
@@ -534,9 +531,6 @@
     <ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h">
       <Filter>audio\dummy</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h">
-      <Filter>audio\winmm</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h">
       <Filter>audio\wasapi</Filter>
     </ClInclude>
@@ -1018,9 +1012,6 @@
     <ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c">
       <Filter>audio\dummy</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c">
-      <Filter>audio\winmm</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c">
       <Filter>audio\wasapi</Filter>
     </ClCompile>
@@ -1069,6 +1060,9 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c">
       <Filter>joystick\hidapi</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
+      <Filter>joystick\hidapi</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
       <Filter>joystick\hidapi</Filter>
     </ClCompile>

+ 1 - 1
VisualC/SDLmain/SDLmain.vcxproj

@@ -19,7 +19,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2main</ProjectName>
+    <ProjectName>SDL3main</ProjectName>
     <ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
     <RootNamespace>SDLmain</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

+ 1 - 1
VisualC/SDLtest/SDLtest.vcxproj

@@ -19,7 +19,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectName>SDL2test</ProjectName>
+    <ProjectName>SDL3test</ProjectName>
     <ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
     <RootNamespace>SDLtest</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

+ 0 - 111
VisualC/pkg-support/cmake/sdl2-config.cmake

@@ -1,111 +0,0 @@
-# SDL2 CMake configuration file:
-# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
-
-cmake_minimum_required(VERSION 3.0)
-
-include(FeatureSummary)
-set_package_properties(SDL2 PROPERTIES
-    URL "https://www.libsdl.org/"
-    DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
-)
-
-# Copied from `configure_package_config_file`
-macro(set_and_check _var _file)
-    set(${_var} "${_file}")
-    if(NOT EXISTS "${_file}")
-        message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
-    endif()
-endmacro()
-
-# Copied from `configure_package_config_file`
-macro(check_required_components _NAME)
-    foreach(comp ${${_NAME}_FIND_COMPONENTS})
-        if(NOT ${_NAME}_${comp}_FOUND)
-            if(${_NAME}_FIND_REQUIRED_${comp})
-                set(${_NAME}_FOUND FALSE)
-            endif()
-        endif()
-    endforeach()
-endmacro()
-
-set(SDL2_FOUND TRUE)
-
-if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
-    set(_sdl_arch_subdir "x86")
-elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
-    set(_sdl_arch_subdir "x64")
-else()
-    set(SDL2_FOUND FALSE)
-    return()
-endif()
-
-# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
-
-set_and_check(SDL2_PREFIX       "${CMAKE_CURRENT_LIST_DIR}/..")
-set_and_check(SDL2_EXEC_PREFIX  "${CMAKE_CURRENT_LIST_DIR}/..")
-set_and_check(SDL2_INCLUDE_DIR  "${SDL2_PREFIX}/include")
-set(SDL2_INCLUDE_DIRS           "${SDL2_INCLUDE_DIR}")
-set_and_check(SDL2_BINDIR       "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
-set_and_check(SDL2_LIBDIR       "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
-
-set(SDL2_LIBRARIES      SDL2::SDL2main SDL2::SDL2)
-set(SDL2MAIN_LIBRARY    SDL2::SDL2main)
-set(SDL2TEST_LIBRARY    SDL2::SDL2test)
-
-
-# All targets are created, even when some might not be requested though COMPONENTS.
-# This is done for compatibility with CMake generated SDL2-target.cmake files.
-
-set(_sdl2_library     "${SDL2_LIBDIR}/SDL2.lib")
-set(_sdl2_dll_library "${SDL2_BINDIR}/SDL2.dll")
-if(EXISTS "${_sdl2_library}" AND EXISTS "${_sdl2_dll_library}")
-    if(NOT TARGET SDL2::SDL2)
-        add_library(SDL2::SDL2 SHARED IMPORTED)
-        set_target_properties(SDL2::SDL2
-            PROPERTIES
-                INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
-                IMPORTED_IMPLIB "${_sdl2_library}"
-                IMPORTED_LOCATION "${_sdl2_dll_library}"
-                COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
-                INTERFACE_SDL2_SHARED "ON"
-        )
-    endif()
-    set(SDL2_SDL2_FOUND TRUE)
-else()
-    set(SDL2_SDL2_FOUND FALSE)
-endif()
-unset(_sdl2_library)
-unset(_sdl2_dll_library)
-
-set(_sdl2main_library "${SDL2_LIBDIR}/SDL2main.lib")
-if(EXISTS "${_sdl2main_library}")
-    if(NOT TARGET SDL2::SDL2main)
-        add_library(SDL2::SDL2main STATIC IMPORTED)
-        set_target_properties(SDL2::SDL2main
-        PROPERTIES
-            IMPORTED_LOCATION "${_sdl2main_library}"
-        )
-    endif()
-    set(SDL2_SDL2main_FOUND TRUE)
-else()
-    set(SDL2_SDL2_FOUND FALSE)
-endif()
-unset(_sdl2main_library)
-
-set(_sdl2test_library "${SDL2_LIBDIR}/SDL2test.lib")
-if(EXISTS "${_sdl2test_library}")
-    if(NOT TARGET SDL2::SDL2test)
-        add_library(SDL2::SDL2test STATIC IMPORTED)
-        set_target_properties(SDL2::SDL2test
-            PROPERTIES
-                INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
-                IMPORTED_LOCATION "${_sdl2test_library}"
-        )
-    endif()
-    set(SDL2_SDL2test_FOUND TRUE)
-else()
-    set(SDL2_SDL2_FOUND FALSE)
-endif()
-unset(_sdl2test_library)
-
-check_required_components(SDL2)

+ 3 - 3
VisualC/pkg-support/cmake/sdl2-config-version.cmake → VisualC/pkg-support/cmake/sdl3-config-version.cmake

@@ -1,10 +1,10 @@
 # based on the files generated by CMake's write_basic_package_version_file
 
-# SDL2 CMake version configuration file:
-# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
+# SDL CMake version configuration file:
+# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
 
 if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h")
-    message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL2-devel-2.x.y-VC")
+    message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL3-devel-3.x.y-VC")
     return()
 endif()
 

+ 111 - 0
VisualC/pkg-support/cmake/sdl3-config.cmake

@@ -0,0 +1,111 @@
+# SDL CMake configuration file:
+# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
+
+cmake_minimum_required(VERSION 3.0)
+
+include(FeatureSummary)
+set_package_properties(SDL3 PROPERTIES
+    URL "https://www.libsdl.org/"
+    DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
+)
+
+# Copied from `configure_package_config_file`
+macro(set_and_check _var _file)
+    set(${_var} "${_file}")
+    if(NOT EXISTS "${_file}")
+        message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
+    endif()
+endmacro()
+
+# Copied from `configure_package_config_file`
+macro(check_required_components _NAME)
+    foreach(comp ${${_NAME}_FIND_COMPONENTS})
+        if(NOT ${_NAME}_${comp}_FOUND)
+            if(${_NAME}_FIND_REQUIRED_${comp})
+                set(${_NAME}_FOUND FALSE)
+            endif()
+        endif()
+    endforeach()
+endmacro()
+
+set(SDL3_FOUND TRUE)
+
+if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
+    set(_sdl_arch_subdir "x86")
+elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
+    set(_sdl_arch_subdir "x64")
+else()
+    set(SDL3_FOUND FALSE)
+    return()
+endif()
+
+# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
+
+set_and_check(SDL3_PREFIX       "${CMAKE_CURRENT_LIST_DIR}/..")
+set_and_check(SDL3_EXEC_PREFIX  "${CMAKE_CURRENT_LIST_DIR}/..")
+set_and_check(SDL3_INCLUDE_DIR  "${SDL3_PREFIX}/include")
+set(SDL3_INCLUDE_DIRS           "${SDL3_INCLUDE_DIR}")
+set_and_check(SDL3_BINDIR       "${SDL3_PREFIX}/lib/${_sdl_arch_subdir}")
+set_and_check(SDL3_LIBDIR       "${SDL3_PREFIX}/lib/${_sdl_arch_subdir}")
+
+set(SDL3_LIBRARIES      SDL3::SDL3main SDL3::SDL3)
+set(SDL3MAIN_LIBRARY    SDL3::SDL3main)
+set(SDL3TEST_LIBRARY    SDL3::SDL3test)
+
+
+# All targets are created, even when some might not be requested though COMPONENTS.
+# This is done for compatibility with CMake generated SDL3-target.cmake files.
+
+set(_sdl3_library     "${SDL3_LIBDIR}/SDL3.lib")
+set(_sdl3_dll_library "${SDL3_BINDIR}/SDL3.dll")
+if(EXISTS "${_sdl3_library}" AND EXISTS "${_sdl3_dll_library}")
+    if(NOT TARGET SDL3::SDL3)
+        add_library(SDL3::SDL3 SHARED IMPORTED)
+        set_target_properties(SDL3::SDL3
+            PROPERTIES
+                INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
+                IMPORTED_IMPLIB "${_sdl3_library}"
+                IMPORTED_LOCATION "${_sdl3_dll_library}"
+                COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
+                INTERFACE_SDL3_SHARED "ON"
+        )
+    endif()
+    set(SDL3_SDL3_FOUND TRUE)
+else()
+    set(SDL3_SDL3_FOUND FALSE)
+endif()
+unset(_sdl3_library)
+unset(_sdl3_dll_library)
+
+set(_sdl3main_library "${SDL3_LIBDIR}/SDL3main.lib")
+if(EXISTS "${_sdl3main_library}")
+    if(NOT TARGET SDL3::SDL3main)
+        add_library(SDL3::SDL3main STATIC IMPORTED)
+        set_target_properties(SDL3::SDL3main
+        PROPERTIES
+            IMPORTED_LOCATION "${_sdl3main_library}"
+        )
+    endif()
+    set(SDL3_SDL3main_FOUND TRUE)
+else()
+    set(SDL3_SDL3_FOUND FALSE)
+endif()
+unset(_sdl3main_library)
+
+set(_sdl3test_library "${SDL3_LIBDIR}/SDL3test.lib")
+if(EXISTS "${_sdl3test_library}")
+    if(NOT TARGET SDL3::SDL3test)
+        add_library(SDL3::SDL3test STATIC IMPORTED)
+        set_target_properties(SDL3::SDL3test
+            PROPERTIES
+                INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
+                IMPORTED_LOCATION "${_sdl3test_library}"
+        )
+    endif()
+    set(SDL3_SDL3test_FOUND TRUE)
+else()
+    set(SDL3_SDL3_FOUND FALSE)
+endif()
+unset(_sdl3test_library)
+
+check_required_components(SDL3)

+ 0 - 217
VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj

@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectName>testquit</ProjectName>
-    <RootNamespace>testquit</RootNamespace>
-    <ProjectGuid>{1D12C737-7C71-45CE-AE2C-AAB47B690BC8}</ProjectGuid>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Midl>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TargetEnvironment>Win32</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>true</StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <SubSystem>Windows</SubSystem>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <Midl>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-    </Midl>
-    <ClCompile>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>true</StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <SubSystem>Windows</SubSystem>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Midl>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TargetEnvironment>Win32</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Midl>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\..\..\visualtest\unittest\testquit.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\SDLmain\SDLmain.vcxproj">
-      <Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\SDLtest\SDLtest.vcxproj">
-      <Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\SDL\SDL.vcxproj">
-      <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 308
VisualC/visualtest/visualtest_VS2012.vcxproj

@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectName>visualtest</ProjectName>
-    <RootNamespace>visualtest</RootNamespace>
-    <ProjectGuid>{13DDF23A-4A8F-4AF9-9734-CC09D9157924}</ProjectGuid>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <TargetName>testharness</TargetName>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Midl>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TargetEnvironment>Win32</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>..\..\include;..\..\visualtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>true</StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <SubSystem>Windows</SubSystem>
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testsprite2.exe" "$(ProjectDir)"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testquit.exe" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.actions" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Command>
-    </PostBuildEvent>
-    <PostBuildEvent>
-      <Message>Copy data files</Message>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <Midl>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-    </Midl>
-    <ClCompile>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>..\..\include;..\..\visualtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>true</StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <SubSystem>Windows</SubSystem>
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testsprite2.exe" "$(ProjectDir)"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testquit.exe" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.actions" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Command>
-    </PostBuildEvent>
-    <PostBuildEvent>
-      <Message>Copy data files</Message>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Midl>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TargetEnvironment>Win32</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\include;..\..\visualtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableLanguageExtensions>false</DisableLanguageExtensions>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testsprite2.exe" "$(ProjectDir)"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testquit.exe" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.actions" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Command>
-    </PostBuildEvent>
-    <PostBuildEvent>
-      <Message>Copy data files</Message>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Midl>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MkTypLibCompatible>true</MkTypLibCompatible>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\include;..\..\visualtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testsprite2.exe" "$(ProjectDir)"
-copy "$(SolutionDir)\$(Platform)\$(Configuration)\testquit.exe" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\*.actions" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.config" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.parameters" "$(ProjectDir)"
-copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Command>
-    </PostBuildEvent>
-    <PostBuildEvent>
-      <Message>Copy data files</Message>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_action_configparser.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_exhaustive_variator.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_harness_argparser.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_mischelper.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_parsehelper.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_process.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_random_variator.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_rwhelper.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_screenshot.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_sut_configparser.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_variators.h" />
-    <ClInclude Include="..\..\visualtest\include\SDL_visualtest_variator_common.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\visualtest\src\action_configparser.c" />
-    <ClCompile Include="..\..\visualtest\src\harness_argparser.c" />
-    <ClCompile Include="..\..\visualtest\src\mischelper.c" />
-    <ClCompile Include="..\..\visualtest\src\parsehelper.c" />
-    <ClCompile Include="..\..\visualtest\src\rwhelper.c" />
-    <ClCompile Include="..\..\visualtest\src\screenshot.c" />
-    <ClCompile Include="..\..\visualtest\src\sut_configparser.c" />
-    <ClCompile Include="..\..\visualtest\src\testharness.c" />
-    <ClCompile Include="..\..\visualtest\src\variators.c" />
-    <ClCompile Include="..\..\visualtest\src\variator_exhaustive.c" />
-    <ClCompile Include="..\..\visualtest\src\variator_common.c" />
-    <ClCompile Include="..\..\visualtest\src\variator_random.c" />
-    <ClCompile Include="..\..\visualtest\src\windows\windows_process.c" />
-    <ClCompile Include="..\..\visualtest\src\windows\windows_screenshot.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\SDLmain\SDLmain.vcxproj">
-      <Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\SDLtest\SDLtest.vcxproj">
-      <Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\SDL\SDL.vcxproj">
-      <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 32 - 1
WhatsNew.txt

@@ -6,9 +6,40 @@ This is a list of major changes in SDL's version history.
 ---------------------------------------------------------------------------
 
 General:
+* Updated OpenGL headers to the latest API from The Khronos Group Inc.
+* Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support
+* Added simulated vsync synchronization for the software renderer
+* Added the mouse position to SDL_MouseWheelEvent
+* Added SDL_ResetHints() to reset all hints to their default values
 * Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID
-* Added support for Nintendo Wii controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_WII to control whether this is used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED
+* Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint
+* Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint
 * Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
+* Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
+* Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
+* Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
+* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices 
+* SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available
+
+Windows:
+* Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion
+
+macOS:
+* Implemented vsync synchronization on macOS 12
+
+Linux:
+* Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard
+* Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland
+
+Android:
+* Enabled IME soft keyboard input
+* Added version checking to make sure the SDL Java and C code are compatible
 
 
 ---------------------------------------------------------------------------

+ 49 - 49
Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj

@@ -7,14 +7,14 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL2.a */; };
-		F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
+		F3A497102555EE4800E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A4972F2555EE8A00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A497422555EEBE00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A497442555EECD00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A497462555EEDF00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL3.a */; };
+		F3A497492555EF0B00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A4974B2555EF1B00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
+		F3A4974E2555EF9F00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
 		FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
 		FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
@@ -188,7 +188,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */,
+				F3A497102555EE4800E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -196,7 +196,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */,
+				F3A497462555EEDF00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -204,7 +204,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */,
+				F3A497442555EECD00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -212,7 +212,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */,
+				F3A4972F2555EE8A00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -220,7 +220,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */,
+				F3A497492555EF0B00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -228,7 +228,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */,
+				F3A4974E2555EF9F00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -236,7 +236,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */,
+				F3A497422555EEBE00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -244,7 +244,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */,
+				F3A4974B2555EF1B00E92A8B /* libSDL3.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -292,17 +292,17 @@
 		F3A495812555ED0400E92A8B /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				F3A495912555ED0500E92A8B /* SDL2.framework */,
-				F3A495932555ED0500E92A8B /* SDL2.framework */,
-				F3A495952555ED0500E92A8B /* SDL2.framework */,
-				F3C17D9228E4355900E1A26D /* SDL2.framework */,
-				F3A495972555ED0500E92A8B /* libSDL2.a */,
-				F3A495992555ED0500E92A8B /* libSDL2.a */,
-				F3A4959B2555ED0500E92A8B /* libSDL2.a */,
-				F3A4959D2555ED0500E92A8B /* libSDL2.dylib */,
-				F3A4959F2555ED0500E92A8B /* libSDL2.dylib */,
-				F3A495A12555ED0500E92A8B /* libSDL2.dylib */,
-				F3A495A32555ED0500E92A8B /* SDL2 */,
+				F3A495912555ED0500E92A8B /* SDL3.framework */,
+				F3A495932555ED0500E92A8B /* SDL3.framework */,
+				F3A495952555ED0500E92A8B /* SDL3.framework */,
+				F3C17D9228E4355900E1A26D /* SDL3.framework */,
+				F3A495972555ED0500E92A8B /* libSDL3.a */,
+				F3A495992555ED0500E92A8B /* libSDL3.a */,
+				F3A4959B2555ED0500E92A8B /* libSDL3.a */,
+				F3A4959D2555ED0500E92A8B /* libSDL3.dylib */,
+				F3A4959F2555ED0500E92A8B /* libSDL3.dylib */,
+				F3A495A12555ED0500E92A8B /* libSDL3.dylib */,
+				F3A495A32555ED0500E92A8B /* SDL3 */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -565,80 +565,80 @@
 /* End PBXProject section */
 
 /* Begin PBXReferenceProxy section */
-		F3A495912555ED0500E92A8B /* SDL2.framework */ = {
+		F3A495912555ED0500E92A8B /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3A495902555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495932555ED0500E92A8B /* SDL2.framework */ = {
+		F3A495932555ED0500E92A8B /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3A495922555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495952555ED0500E92A8B /* SDL2.framework */ = {
+		F3A495952555ED0500E92A8B /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3A495942555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495972555ED0500E92A8B /* libSDL2.a */ = {
+		F3A495972555ED0500E92A8B /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = F3A495962555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495992555ED0500E92A8B /* libSDL2.a */ = {
+		F3A495992555ED0500E92A8B /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = F3A495982555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A4959B2555ED0500E92A8B /* libSDL2.a */ = {
+		F3A4959B2555ED0500E92A8B /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = F3A4959A2555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A4959D2555ED0500E92A8B /* libSDL2.dylib */ = {
+		F3A4959D2555ED0500E92A8B /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = F3A4959C2555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A4959F2555ED0500E92A8B /* libSDL2.dylib */ = {
+		F3A4959F2555ED0500E92A8B /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = F3A4959E2555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495A12555ED0500E92A8B /* libSDL2.dylib */ = {
+		F3A495A12555ED0500E92A8B /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = F3A495A02555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3A495A32555ED0500E92A8B /* SDL2 */ = {
+		F3A495A32555ED0500E92A8B /* SDL3 */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.executable";
-			path = SDL2;
+			path = SDL3;
 			remoteRef = F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17D9228E4355900E1A26D /* SDL2.framework */ = {
+		F3C17D9228E4355900E1A26D /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3C17D9128E4355900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};

+ 1 - 1
Xcode-iOS/Demos/README

@@ -2,7 +2,7 @@
 About the iPhone OS Demo Applications
 ==============================================================================
 
-Demos.xcodeproj contains several targets for iPhone oriented SDL demos.  These demos are written strictly using SDL 2.0 calls.  All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script.
+Demos.xcodeproj contains several targets for iPhone oriented SDL demos.  These demos are written strictly using SDL 3.0 calls.  All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script.
 
 Common files:
 

+ 3 - 3
Xcode-iOS/Demos/config.xcconfig

@@ -9,6 +9,6 @@
 // Include any optional config for this build
 #include? "build.xcconfig"
 
-CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
-CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
-CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL3 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
+CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

+ 2 - 2
Xcode-iOS/Demos/src/accelerometer.c

@@ -127,7 +127,7 @@ initializeTextures(SDL_Renderer *renderer)
 
     /* create ship texture from surface */
     ship = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (ship == 0) {
+    if (!ship) {
         fatalError("could not create ship texture");
     }
     SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND);
@@ -145,7 +145,7 @@ initializeTextures(SDL_Renderer *renderer)
     }
     /* create space texture from surface */
     space = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (space == 0) {
+    if (!space) {
         fatalError("could not create space texture");
     }
     SDL_FreeSurface(bmp_surface);

+ 1 - 1
Xcode-iOS/Demos/src/happy.c

@@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer)
 
     /* convert RGBA surface to texture */
     texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (texture == 0) {
+    if (!texture) {
         fatalError("could not create texture");
     }
     SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);

+ 1 - 1
Xcode-iOS/Demos/src/keyboard.c

@@ -183,7 +183,7 @@ loadFont(void)
         SDL_BlitSurface(surface, NULL, converted, NULL);
         /* create our texture */
         texture = SDL_CreateTextureFromSurface(renderer, converted);
-        if (texture == 0) {
+        if (!texture) {
             printf("texture creation failed: %s\n", SDL_GetError());
         } else {
             /* set blend mode for our texture */

+ 1 - 1
Xcode-iOS/Demos/src/rectangles.c

@@ -58,7 +58,7 @@ main(int argc, char *argv[])
 
     /* create window and renderer */
     window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI);
-    if (window == 0) {
+    if (!window) {
         fatalError("Could not initialize Window");
     }
     renderer = SDL_CreateRenderer(window, -1, 0);

+ 1 - 1
Xcode-iOS/Demos/src/touch.c

@@ -63,7 +63,7 @@ initializeTexture(SDL_Renderer *renderer)
     brush =
         SDL_CreateTextureFromSurface(renderer, bmp_surface);
     SDL_FreeSurface(bmp_surface);
-    if (brush == 0) {
+    if (!brush) {
         fatalError("could not create brush texture");
     }
     /* additive blending -- laying strokes on top of eachother makes them brighter */

+ 2 - 2
Xcode/SDL/Info-Framework.plist

@@ -19,10 +19,10 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.25.0</string>
+	<string>3.0.0</string>
 	<key>CFBundleSignature</key>
 	<string>SDLX</string>
 	<key>CFBundleVersion</key>
-	<string>2.25.0</string>
+	<string>3.0.0</string>
 </dict>
 </plist>

+ 69 - 63
Xcode/SDL/SDL.xcodeproj/project.pbxproj

@@ -3393,6 +3393,9 @@
 		F323060528939F6400E66D30 /* SDL_hidapi_combined.c in Sources */ = {isa = PBXBuildFile; fileRef = F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */; };
 		F323060628939F6400E66D30 /* SDL_hidapi_combined.c in Sources */ = {isa = PBXBuildFile; fileRef = F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */; };
 		F323060728939F6400E66D30 /* SDL_hidapi_combined.c in Sources */ = {isa = PBXBuildFile; fileRef = F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */; };
+		F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */; };
+		F34B9896291DEFF700AAC96E /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */; };
+		F34B9897291DEFFA00AAC96E /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */; };
 		F3631C6424884ACF004F28EA /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26792462701100718109 /* SDL_locale.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F3631C652488534E004F28EA /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26792462701100718109 /* SDL_locale.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F376F6192559B29300CFC0BC /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F376F6182559B29300CFC0BC /* OpenGLES.framework */; platformFilter = ios; };
@@ -3701,8 +3704,8 @@
 		A1BB8B6227F6CF330057CFA8 /* SDL_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_list.h; sourceTree = "<group>"; };
 		A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-		A75FCEB323E25AB700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-		A75FD06C23E25AC700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		A75FCEB323E25AB700529352 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		A75FD06C23E25AC700529352 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		A75FDAA523E2792500529352 /* hid.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = hid.m; sourceTree = "<group>"; };
 		A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam.c; sourceTree = "<group>"; };
 		A75FDAB923E28A7A00529352 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@@ -3720,11 +3723,11 @@
 		A75FDBA723E4CB6F00529352 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
 		A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
 		A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
-		A769B23D23E259AE00872273 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		A769B23D23E259AE00872273 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
-		A7D88B5423E2437C00DCD162 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		A7D88D1523E24BED00DCD162 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		A7D88E5423E24D3B00DCD162 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		A7D88B5423E2437C00DCD162 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		A7D88D1523E24BED00DCD162 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		A7D88E5423E24D3B00DCD162 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
 		A7D8A57123E2513D00DCD162 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; };
 		A7D8A57323E2513D00DCD162 /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; };
@@ -4095,11 +4098,11 @@
 		AAC070F8195606770073DCDF /* SDL_opengles2_khrplatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_opengles2_khrplatform.h; sourceTree = "<group>"; };
 		AADA5B8616CCAB3000107CF7 /* SDL_bits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_bits.h; sourceTree = "<group>"; };
 		BECDF66B0761BA81005FE872 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
-		BECDF66C0761BA81005FE872 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		BECDF6BE0761BA81005FE872 /* SDL2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDL2; sourceTree = BUILT_PRODUCTS_DIR; };
-		DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-		E2D187CF28A5673500D2B4F1 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		BECDF66C0761BA81005FE872 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		BECDF6B30761BA81005FE872 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		BECDF6BE0761BA81005FE872 /* SDL3 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDL3; sourceTree = BUILT_PRODUCTS_DIR; };
+		DB31407717554B71006C0E22 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		E2D187CF28A5673500D2B4F1 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		E2D187D228A5673500D2B4F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		F31A92C628D4CB39003BFD6A /* SDL_offscreenopengles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_offscreenopengles.h; sourceTree = "<group>"; };
 		F31A92C728D4CB39003BFD6A /* SDL_offscreenopengles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_offscreenopengles.c; sourceTree = "<group>"; };
@@ -4383,17 +4386,17 @@
 		034768DDFF38A45A11DB9C8B /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				BECDF66C0761BA81005FE872 /* SDL2.framework */,
-				BECDF6B30761BA81005FE872 /* libSDL2.a */,
-				BECDF6BE0761BA81005FE872 /* SDL2 */,
-				DB31407717554B71006C0E22 /* libSDL2.dylib */,
-				A7D88B5423E2437C00DCD162 /* SDL2.framework */,
-				A7D88D1523E24BED00DCD162 /* SDL2.framework */,
-				A7D88E5423E24D3B00DCD162 /* libSDL2.a */,
-				A769B23D23E259AE00872273 /* libSDL2.a */,
-				A75FCEB323E25AB700529352 /* libSDL2.dylib */,
-				A75FD06C23E25AC700529352 /* libSDL2.dylib */,
-				E2D187CF28A5673500D2B4F1 /* SDL2.framework */,
+				BECDF66C0761BA81005FE872 /* SDL3.framework */,
+				BECDF6B30761BA81005FE872 /* libSDL3.a */,
+				BECDF6BE0761BA81005FE872 /* SDL3 */,
+				DB31407717554B71006C0E22 /* libSDL3.dylib */,
+				A7D88B5423E2437C00DCD162 /* SDL3.framework */,
+				A7D88D1523E24BED00DCD162 /* SDL3.framework */,
+				A7D88E5423E24D3B00DCD162 /* libSDL3.a */,
+				A769B23D23E259AE00872273 /* libSDL3.a */,
+				A75FCEB323E25AB700529352 /* libSDL3.dylib */,
+				A75FD06C23E25AC700529352 /* libSDL3.dylib */,
+				E2D187CF28A5673500D2B4F1 /* SDL3.framework */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -4405,7 +4408,7 @@
 				F59C70FC00D5CB5801000001 /* pkg-support */,
 				0153844A006D81B07F000001 /* Public Headers */,
 				08FB77ACFE841707C02AAC07 /* Library Source */,
-				E2D187D028A5673500D2B4F1 /* SDL2 */,
+				E2D187D028A5673500D2B4F1 /* SDL3 */,
 				034768DDFF38A45A11DB9C8B /* Products */,
 				BECDF66B0761BA81005FE872 /* Info-Framework.plist */,
 				564624341FF821B70074AC87 /* Frameworks */,
@@ -5341,12 +5344,12 @@
 			path = events;
 			sourceTree = "<group>";
 		};
-		E2D187D028A5673500D2B4F1 /* SDL2 */ = {
+		E2D187D028A5673500D2B4F1 /* SDL3 */ = {
 			isa = PBXGroup;
 			children = (
 				E2D187D228A5673500D2B4F1 /* Info.plist */,
 			);
-			path = SDL2;
+			path = SDL3;
 			sourceTree = "<group>";
 		};
 		F3ADAB8C2576F08500A6B1D9 /* ios */ = {
@@ -7296,13 +7299,13 @@
 			);
 			buildRules = (
 			);
-			comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
+			comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
 			dependencies = (
 			);
 			name = "Shared Library-iOS";
 			productInstallPath = /usr/local/lib;
 			productName = "Shared Library";
-			productReference = A75FCEB323E25AB700529352 /* libSDL2.dylib */;
+			productReference = A75FCEB323E25AB700529352 /* libSDL3.dylib */;
 			productType = "com.apple.product-type.library.dynamic";
 		};
 		A75FCEB423E25AC700529352 /* Shared Library-tvOS */ = {
@@ -7316,13 +7319,13 @@
 			);
 			buildRules = (
 			);
-			comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
+			comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
 			dependencies = (
 			);
 			name = "Shared Library-tvOS";
 			productInstallPath = /usr/local/lib;
 			productName = "Shared Library";
-			productReference = A75FD06C23E25AC700529352 /* libSDL2.dylib */;
+			productReference = A75FD06C23E25AC700529352 /* libSDL3.dylib */;
 			productType = "com.apple.product-type.library.dynamic";
 		};
 		A769B08223E259AE00872273 /* Static Library-tvOS */ = {
@@ -7342,7 +7345,7 @@
 			name = "Static Library-tvOS";
 			productInstallPath = /usr/local/lib;
 			productName = "Static Library";
-			productReference = A769B23D23E259AE00872273 /* libSDL2.a */;
+			productReference = A769B23D23E259AE00872273 /* libSDL3.a */;
 			productType = "com.apple.product-type.library.static";
 		};
 		A7D88A1423E2437C00DCD162 /* Framework-iOS */ = {
@@ -7364,7 +7367,7 @@
 			name = "Framework-iOS";
 			productInstallPath = "@executable_path/../Frameworks";
 			productName = SDL;
-			productReference = A7D88B5423E2437C00DCD162 /* SDL2.framework */;
+			productReference = A7D88B5423E2437C00DCD162 /* SDL3.framework */;
 			productType = "com.apple.product-type.framework";
 		};
 		A7D88BC923E24BED00DCD162 /* Framework-tvOS */ = {
@@ -7386,7 +7389,7 @@
 			name = "Framework-tvOS";
 			productInstallPath = "@executable_path/../Frameworks";
 			productName = SDL;
-			productReference = A7D88D1523E24BED00DCD162 /* SDL2.framework */;
+			productReference = A7D88D1523E24BED00DCD162 /* SDL3.framework */;
 			productType = "com.apple.product-type.framework";
 		};
 		A7D88D1723E24D3B00DCD162 /* Static Library-iOS */ = {
@@ -7406,7 +7409,7 @@
 			name = "Static Library-iOS";
 			productInstallPath = /usr/local/lib;
 			productName = "Static Library";
-			productReference = A7D88E5423E24D3B00DCD162 /* libSDL2.a */;
+			productReference = A7D88E5423E24D3B00DCD162 /* libSDL3.a */;
 			productType = "com.apple.product-type.library.static";
 		};
 		BECDF5FE0761BA81005FE872 /* Framework */ = {
@@ -7428,7 +7431,7 @@
 			name = Framework;
 			productInstallPath = "@executable_path/../Frameworks";
 			productName = SDL;
-			productReference = BECDF66C0761BA81005FE872 /* SDL2.framework */;
+			productReference = BECDF66C0761BA81005FE872 /* SDL3.framework */;
 			productType = "com.apple.product-type.framework";
 		};
 		BECDF66D0761BA81005FE872 /* Static Library */ = {
@@ -7448,7 +7451,7 @@
 			name = "Static Library";
 			productInstallPath = /usr/local/lib;
 			productName = "Static Library";
-			productReference = BECDF6B30761BA81005FE872 /* libSDL2.a */;
+			productReference = BECDF6B30761BA81005FE872 /* libSDL3.a */;
 			productType = "com.apple.product-type.library.static";
 		};
 		BECDF6BB0761BA81005FE872 /* Standard DMG */ = {
@@ -7465,7 +7468,7 @@
 			name = "Standard DMG";
 			productInstallPath = /usr/local/bin;
 			productName = "Standard Package";
-			productReference = BECDF6BE0761BA81005FE872 /* SDL2 */;
+			productReference = BECDF6BE0761BA81005FE872 /* SDL3 */;
 			productType = "com.apple.product-type.tool";
 		};
 		DB313F7217554B71006C0E22 /* Shared Library */ = {
@@ -7479,13 +7482,13 @@
 			);
 			buildRules = (
 			);
-			comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
+			comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
 			dependencies = (
 			);
 			name = "Shared Library";
 			productInstallPath = /usr/local/lib;
 			productName = "Shared Library";
-			productReference = DB31407717554B71006C0E22 /* libSDL2.dylib */;
+			productReference = DB31407717554B71006C0E22 /* libSDL3.dylib */;
 			productType = "com.apple.product-type.library.dynamic";
 		};
 		E2D187CE28A5673500D2B4F1 /* xcFramework-iOS */ = {
@@ -7503,8 +7506,8 @@
 			dependencies = (
 			);
 			name = "xcFramework-iOS";
-			productName = SDL2;
-			productReference = E2D187CF28A5673500D2B4F1 /* SDL2.framework */;
+			productName = SDL3;
+			productReference = E2D187CF28A5673500D2B4F1 /* SDL3.framework */;
 			productType = "com.apple.product-type.framework";
 		};
 /* End PBXNativeTarget section */
@@ -7642,7 +7645,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL2.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
+			shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL3.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/SDL3.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
 		};
 		E2D187E728A5685000D2B4F1 /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -7659,7 +7662,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# Build an xcframework with both device and simulator files for all platforms.\n# Adapted from an answer in\n# https://developer.apple.com/forums/thread/666335?answerId=685927022#685927022\n\nif [ \"$XCODE_VERSION_ACTUAL\" -lt 1100 ]\nthen\n\techo \"error: Building an xcframework requires Xcode 11 minimum.\"\n\texit 1\nfi\n\nSCHEME_NAME=\"Framework-iOS\"\nFRAMEWORK_NAME=\"SDL2\"\nPROJECT_NAME=\"SDL\"\n\nSIMULATOR_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphonesimulator.xcarchive\"\nDEVICE_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphoneos.xcarchive\"\n\nOUTPUT_DIR=\"./Products/\"\n\n# Simulator xcarchive (arm64, i386, x86_64)\nxcodebuild archive \\\n\tONLY_ACTIVE_ARCH=NO \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${SIMULATOR_ARCHIVE_PATH} \\\n\t-sdk iphonesimulator \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Device xcarchive (arm64, armv7)\nxcodebuild archive \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${DEVICE_ARCHIVE_PATH} \\\n\t-sdk iphoneos \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Clean-up any existing instance of this xcframework from the Products directory\nrm -rf \"${OUTPUT_DIR}${FRAMEWORK_NAME}.xcframework\"\n\n# Create final xcframework\nxcodebuild -create-xcframework \\\n\t-framework \"${DEVICE_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-framework \"${SIMULATOR_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-output ${OUTPUT_DIR}/${FRAMEWORK_NAME}.xcframework\n\n# Ensure git doesn't pick up on our Products folder. \nrm -rf ${OUTPUT_DIR}/.gitignore\necho \"*\" >> ${OUTPUT_DIR}/.gitignore\n";
+			shellScript = "# Build an xcframework with both device and simulator files for all platforms.\n# Adapted from an answer in\n# https://developer.apple.com/forums/thread/666335?answerId=685927022#685927022\n\nif [ \"$XCODE_VERSION_ACTUAL\" -lt 1100 ]\nthen\n\techo \"error: Building an xcframework requires Xcode 11 minimum.\"\n\texit 1\nfi\n\nSCHEME_NAME=\"Framework-iOS\"\nFRAMEWORK_NAME=\"SDL3\"\nPROJECT_NAME=\"SDL\"\n\nSIMULATOR_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphonesimulator.xcarchive\"\nDEVICE_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphoneos.xcarchive\"\n\nOUTPUT_DIR=\"./Products/\"\n\n# Simulator xcarchive (arm64, i386, x86_64)\nxcodebuild archive \\\n\tONLY_ACTIVE_ARCH=NO \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${SIMULATOR_ARCHIVE_PATH} \\\n\t-sdk iphonesimulator \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Device xcarchive (arm64, armv7)\nxcodebuild archive \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${DEVICE_ARCHIVE_PATH} \\\n\t-sdk iphoneos \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Clean-up any existing instance of this xcframework from the Products directory\nrm -rf \"${OUTPUT_DIR}${FRAMEWORK_NAME}.xcframework\"\n\n# Create final xcframework\nxcodebuild -create-xcframework \\\n\t-framework \"${DEVICE_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-framework \"${SIMULATOR_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-output ${OUTPUT_DIR}/${FRAMEWORK_NAME}.xcframework\n\n# Ensure git doesn't pick up on our Products folder. \nrm -rf ${OUTPUT_DIR}/.gitignore\necho \"*\" >> ${OUTPUT_DIR}/.gitignore\n";
 		};
 		F3ED8106281DB8A500C33C5B /* Convert SDL includes to SDL Framework includes */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -7677,7 +7680,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
+			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
 		};
 		F3ED8107281DB8E600C33C5B /* Convert SDL includes to SDL Framework includes */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -7695,7 +7698,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
+			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
 		};
 		F3ED8108281DB8F200C33C5B /* Convert SDL includes to SDL Framework includes */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -7713,7 +7716,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
+			shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -8909,6 +8912,7 @@
 				A7D8BBD923E2574800DCD162 /* SDL_uikitmessagebox.m in Sources */,
 				A7D8AD2923E2514100DCD162 /* SDL_vulkan_utils.c in Sources */,
 				A7D8A95123E2514000DCD162 /* SDL_spinlock.c in Sources */,
+				F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */,
 				A7D8BAAF23E2514400DCD162 /* s_atan.c in Sources */,
 				A7D8B75223E2514300DCD162 /* SDL_sysloadso.c in Sources */,
 				A7D8BBE123E2574800DCD162 /* SDL_uikitopenglview.m in Sources */,
@@ -9103,6 +9107,7 @@
 				A7D8B41F23E2514300DCD162 /* SDL_systls.c in Sources */,
 				A7D8AD2C23E2514100DCD162 /* SDL_vulkan_utils.c in Sources */,
 				A7D8A95423E2514000DCD162 /* SDL_spinlock.c in Sources */,
+				F34B9896291DEFF700AAC96E /* SDL_hidapi_steam.c in Sources */,
 				A7D8BAB223E2514400DCD162 /* s_atan.c in Sources */,
 				F3A490A12554D38600E92A8B /* SDL_hidapi_ps5.c in Sources */,
 				A7D8B75523E2514300DCD162 /* SDL_sysloadso.c in Sources */,
@@ -9297,6 +9302,7 @@
 				A7D8AD2E23E2514100DCD162 /* SDL_vulkan_utils.c in Sources */,
 				A7D8A95623E2514000DCD162 /* SDL_spinlock.c in Sources */,
 				A7D8BAB423E2514400DCD162 /* s_atan.c in Sources */,
+				F34B9897291DEFFA00AAC96E /* SDL_hidapi_steam.c in Sources */,
 				A7D8B75723E2514300DCD162 /* SDL_sysloadso.c in Sources */,
 				F3A490A42554D38600E92A8B /* SDL_hidapi_ps5.c in Sources */,
 				A7D8B98B23E2514400DCD162 /* SDL_render_metal.m in Sources */,
@@ -9522,8 +9528,8 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEPLOYMENT_POSTPROCESSING = YES;
-				DYLIB_COMPATIBILITY_VERSION = 2501.0.0;
-				DYLIB_CURRENT_VERSION = 2501.0.0;
+				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
+				DYLIB_CURRENT_VERSION = 1.0.0;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_ALTIVEC_EXTENSIONS = YES;
@@ -9553,8 +9559,8 @@
 					"@loader_path/Frameworks",
 				);
 				MACOSX_DEPLOYMENT_TARGET = 10.9;
-				PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
-				PRODUCT_NAME = SDL2;
+				PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
+				PRODUCT_NAME = SDL3;
 				STRIP_STYLE = "non-global";
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -9564,7 +9570,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				CLANG_LINK_OBJC_RUNTIME = NO;
-				MARKETING_VERSION = 2.0.17;
+				MARKETING_VERSION = 3.0.0;
 				OTHER_LDFLAGS = "-liconv";
 			};
 			name = Release;
@@ -9607,8 +9613,8 @@
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				DEBUG_INFORMATION_FORMAT = dwarf;
-				DYLIB_COMPATIBILITY_VERSION = 2501.0.0;
-				DYLIB_CURRENT_VERSION = 2501.0.0;
+				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
+				DYLIB_CURRENT_VERSION = 1.0.0;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				ENABLE_TESTABILITY = YES;
@@ -9639,8 +9645,8 @@
 				);
 				MACOSX_DEPLOYMENT_TARGET = 10.9;
 				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
-				PRODUCT_NAME = SDL2;
+				PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
+				PRODUCT_NAME = SDL3;
 				STRIP_INSTALLED_PRODUCT = NO;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -9650,7 +9656,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				CLANG_LINK_OBJC_RUNTIME = NO;
-				MARKETING_VERSION = 2.0.17;
+				MARKETING_VERSION = 3.0.0;
 				OTHER_LDFLAGS = "-liconv";
 			};
 			name = Debug;
@@ -9856,8 +9862,8 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = "";
-				DYLIB_COMPATIBILITY_VERSION = 2501.0.0;
-				DYLIB_CURRENT_VERSION = 2501.0.0;
+				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
+				DYLIB_CURRENT_VERSION = 1.0.0;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_DYNAMIC_NO_PIC = NO;
@@ -9867,7 +9873,7 @@
 				);
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INFOPLIST_FILE = SDL2/Info.plist;
+				INFOPLIST_FILE = SDL3/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				IPHONEOS_DEPLOYMENT_TARGET = 12.1;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -9879,7 +9885,7 @@
 				MTL_FAST_MATH = YES;
 				OTHER_LDFLAGS = "-liconv";
 				PRODUCT_BUNDLE_IDENTIFIER = "";
-				PRODUCT_NAME = SDL2;
+				PRODUCT_NAME = SDL3;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SUPPORTS_MACCATALYST = NO;
@@ -9908,14 +9914,14 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = "";
-				DYLIB_COMPATIBILITY_VERSION = 2501.0.0;
-				DYLIB_CURRENT_VERSION = 2501.0.0;
+				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
+				DYLIB_CURRENT_VERSION = 1.0.0;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_NS_ASSERTIONS = NO;
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INFOPLIST_FILE = SDL2/Info.plist;
+				INFOPLIST_FILE = SDL3/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				IPHONEOS_DEPLOYMENT_TARGET = 12.1;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -9927,7 +9933,7 @@
 				MTL_FAST_MATH = YES;
 				OTHER_LDFLAGS = "-liconv";
 				PRODUCT_BUNDLE_IDENTIFIER = "";
-				PRODUCT_NAME = SDL2;
+				PRODUCT_NAME = SDL3;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SUPPORTS_MACCATALYST = NO;

+ 2 - 2
Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/Framework-iOS.xcscheme

@@ -15,7 +15,7 @@
             <BuildableReference
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
-               BuildableName = "SDL2.framework"
+               BuildableName = "SDL3.framework"
                BlueprintName = "Framework-iOS"
                ReferencedContainer = "container:SDL.xcodeproj">
             </BuildableReference>
@@ -51,7 +51,7 @@
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
-            BuildableName = "SDL2.framework"
+            BuildableName = "SDL3.framework"
             BlueprintName = "Framework-iOS"
             ReferencedContainer = "container:SDL.xcodeproj">
          </BuildableReference>

+ 2 - 2
Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/xcFramework-iOS.xcscheme

@@ -15,7 +15,7 @@
             <BuildableReference
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
-               BuildableName = "SDL2.framework"
+               BuildableName = "SDL3.framework"
                BlueprintName = "xcFramework-iOS"
                ReferencedContainer = "container:SDL.xcodeproj">
             </BuildableReference>
@@ -51,7 +51,7 @@
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
-            BuildableName = "SDL2.framework"
+            BuildableName = "SDL3.framework"
             BlueprintName = "xcFramework-iOS"
             ReferencedContainer = "container:SDL.xcodeproj">
          </BuildableReference>

+ 0 - 0
Xcode/SDL/SDL2/Info.plist → Xcode/SDL/SDL3/Info.plist


+ 1 - 1
Xcode/SDL/pkg-support/SDL.info

@@ -1,4 +1,4 @@
-Title SDL 2.0.0
+Title SDL 3.0.0
 Version 1
 Description SDL Library for Mac OS X (http://www.libsdl.org)
 DefaultLocation /Library/Frameworks

+ 0 - 69
Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake

@@ -1,69 +0,0 @@
-# SDL2 CMake configuration file:
-# This file is meant to be placed in Resources/CMake of a SDL2 framework
-
-# INTERFACE_LINK_OPTIONS needs CMake 3.12
-cmake_minimum_required(VERSION 3.12)
-
-include(FeatureSummary)
-set_package_properties(SDL2 PROPERTIES
-    URL "https://www.libsdl.org/"
-    DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
-)
-
-# Copied from `configure_package_config_file`
-macro(set_and_check _var _file)
-    set(${_var} "${_file}")
-    if(NOT EXISTS "${_file}")
-        message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
-    endif()
-endmacro()
-
-# Copied from `configure_package_config_file`
-macro(check_required_components _NAME)
-    foreach(comp ${${_NAME}_FIND_COMPONENTS})
-        if(NOT ${_NAME}_${comp}_FOUND)
-            if(${_NAME}_FIND_REQUIRED_${comp})
-                set(${_NAME}_FOUND FALSE)
-            endif()
-        endif()
-    endforeach()
-endmacro()
-
-set(SDL2_FOUND TRUE)
-
-string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
-string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
-
-# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
-
-set_and_check(SDL2_PREFIX       "${SDL2_FRAMEWORK_PATH}")
-set_and_check(SDL2_EXEC_PREFIX  "${SDL2_FRAMEWORK_PATH}")
-set_and_check(SDL2_INCLUDE_DIR  "${SDL2_FRAMEWORK_PATH}/Headers")
-set(SDL2_INCLUDE_DIRS           "${SDL2_INCLUDE_DIR}")
-set_and_check(SDL2_BINDIR       "${SDL2_FRAMEWORK_PATH}")
-set_and_check(SDL2_LIBDIR       "${SDL2_FRAMEWORK_PATH}")
-
-set(SDL2_LIBRARIES "SDL2::SDL2")
-
-# All targets are created, even when some might not be requested though COMPONENTS.
-# This is done for compatibility with CMake generated SDL2-target.cmake files.
-
-if(NOT TARGET SDL2::SDL2)
-    add_library(SDL2::SDL2 INTERFACE IMPORTED)
-    set_target_properties(SDL2::SDL2
-        PROPERTIES
-            INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
-            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
-            INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
-            COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
-            INTERFACE_SDL2_SHARED "ON"
-    )
-endif()
-set(SDL2_SDL2_FOUND TRUE)
-
-if(NOT TARGET SDL2::SDL2main)
-    add_library(SDL2::SDL2main INTERFACE IMPORTED)
-endif()
-set(SDL2_SDL2main_FOUND TRUE)
-
-check_required_components(SDL2)

+ 3 - 3
Xcode/SDL/pkg-support/resources/CMake/sdl2-config-version.cmake → Xcode/SDL/pkg-support/resources/CMake/sdl3-config-version.cmake

@@ -1,10 +1,10 @@
 # based on the files generated by CMake's write_basic_package_version_file
 
-# SDL2 CMake version configuration file:
-# This file is meant to be placed in Resources/CMake of a SDL2 framework
+# SDL CMake version configuration file:
+# This file is meant to be placed in Resources/CMake of a SDL3 framework
 
 if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h")
-    message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL2.framework")
+    message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL3.framework")
     return()
 endif()
 

+ 69 - 0
Xcode/SDL/pkg-support/resources/CMake/sdl3-config.cmake

@@ -0,0 +1,69 @@
+# SDL CMake configuration file:
+# This file is meant to be placed in Resources/CMake of a SDL3 framework
+
+# INTERFACE_LINK_OPTIONS needs CMake 3.12
+cmake_minimum_required(VERSION 3.12)
+
+include(FeatureSummary)
+set_package_properties(SDL3 PROPERTIES
+    URL "https://www.libsdl.org/"
+    DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
+)
+
+# Copied from `configure_package_config_file`
+macro(set_and_check _var _file)
+    set(${_var} "${_file}")
+    if(NOT EXISTS "${_file}")
+        message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
+    endif()
+endmacro()
+
+# Copied from `configure_package_config_file`
+macro(check_required_components _NAME)
+    foreach(comp ${${_NAME}_FIND_COMPONENTS})
+        if(NOT ${_NAME}_${comp}_FOUND)
+            if(${_NAME}_FIND_REQUIRED_${comp})
+                set(${_NAME}_FOUND FALSE)
+            endif()
+        endif()
+    endforeach()
+endmacro()
+
+set(SDL3_FOUND TRUE)
+
+string(REGEX REPLACE "SDL3\\.framework.*" "SDL3.framework" SDL3_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
+string(REGEX REPLACE "SDL3\\.framework.*" "" SDL3_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
+
+# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
+
+set_and_check(SDL3_PREFIX       "${SDL3_FRAMEWORK_PATH}")
+set_and_check(SDL3_EXEC_PREFIX  "${SDL3_FRAMEWORK_PATH}")
+set_and_check(SDL3_INCLUDE_DIR  "${SDL3_FRAMEWORK_PATH}/Headers")
+set(SDL3_INCLUDE_DIRS           "${SDL3_INCLUDE_DIR};${SDL3_FRAMEWORK_PATH}")
+set_and_check(SDL3_BINDIR       "${SDL3_FRAMEWORK_PATH}")
+set_and_check(SDL3_LIBDIR       "${SDL3_FRAMEWORK_PATH}")
+
+set(SDL3_LIBRARIES "SDL3::SDL3")
+
+# All targets are created, even when some might not be requested though COMPONENTS.
+# This is done for compatibility with CMake generated SDL3-target.cmake files.
+
+if(NOT TARGET SDL3::SDL3)
+    add_library(SDL3::SDL3 INTERFACE IMPORTED)
+    set_target_properties(SDL3::SDL3
+        PROPERTIES
+            INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL3_FRAMEWORK_PARENT_PATH}\""
+            INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
+            INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL3_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL3"
+            COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
+            INTERFACE_SDL3_SHARED "ON"
+    )
+endif()
+set(SDL3_SDL3_FOUND TRUE)
+
+if(NOT TARGET SDL3::SDL3main)
+    add_library(SDL3::SDL3main INTERFACE IMPORTED)
+endif()
+set(SDL3_SDL3main_FOUND TRUE)
+
+check_required_components(SDL3)

+ 5 - 5
Xcode/SDL/pkg-support/resources/ReadMe.txt

@@ -15,20 +15,20 @@ contains both the SDL runtime component and development header files.
 
 
 To Install:
-Copy the SDL2.framework to /Library/Frameworks
+Copy the SDL3.framework to /Library/Frameworks
 
 You may alternatively install it in <Your home directory>/Library/Frameworks 
 if your access privileges are not high enough.
 
 
 Use in CMake projects:
-SDL2.framework can be used in CMake projects using the following pattern:
+SDL3.framework can be used in CMake projects using the following pattern:
 ```
-find_package(SDL2 REQUIRED COMPONENTS SDL2)
+find_package(SDL3 REQUIRED COMPONENTS SDL3)
 add_executable(my_game ${MY_SOURCES})
-target_link_libraries(my_game PRIVATE SDL2::SDL2)
+target_link_libraries(my_game PRIVATE SDL3::SDL3)
 ```
-If SDL2.framework is installed in a non-standard location,
+If SDL3.framework is installed in a non-standard location,
 please refer to the following link for ways to configure CMake:
 https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
 

binární
Xcode/SDL/pkg-support/resources/SDL_DS_Store


+ 33 - 33
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj

@@ -1222,17 +1222,17 @@
 		003FA63B093FFD41000C53B3 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				003FA643093FFD41000C53B3 /* SDL2.framework */,
-				F3C17C5D28E3FB2900E1A26D /* SDL2.framework */,
-				F3C17C5F28E3FB2900E1A26D /* SDL2.framework */,
-				F3C17C6128E3FB2900E1A26D /* SDL2.framework */,
-				003FA645093FFD41000C53B3 /* libSDL2.a */,
-				F3C17C6328E3FB2900E1A26D /* libSDL2.a */,
-				F3C17C6528E3FB2900E1A26D /* libSDL2.a */,
-				DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */,
-				F3C17C6728E3FB2900E1A26D /* libSDL2.dylib */,
-				F3C17C6928E3FB2900E1A26D /* libSDL2.dylib */,
-				003FA649093FFD41000C53B3 /* SDL2 */,
+				003FA643093FFD41000C53B3 /* SDL3.framework */,
+				F3C17C5D28E3FB2900E1A26D /* SDL3.framework */,
+				F3C17C5F28E3FB2900E1A26D /* SDL3.framework */,
+				F3C17C6128E3FB2900E1A26D /* SDL3.framework */,
+				003FA645093FFD41000C53B3 /* libSDL3.a */,
+				F3C17C6328E3FB2900E1A26D /* libSDL3.a */,
+				F3C17C6528E3FB2900E1A26D /* libSDL3.a */,
+				DB1D40D717B3F30D00D74CFC /* libSDL3.dylib */,
+				F3C17C6728E3FB2900E1A26D /* libSDL3.dylib */,
+				F3C17C6928E3FB2900E1A26D /* libSDL3.dylib */,
+				003FA649093FFD41000C53B3 /* SDL3 */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -2298,80 +2298,80 @@
 /* End PBXProject section */
 
 /* Begin PBXReferenceProxy section */
-		003FA643093FFD41000C53B3 /* SDL2.framework */ = {
+		003FA643093FFD41000C53B3 /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = 003FA642093FFD41000C53B3 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		003FA645093FFD41000C53B3 /* libSDL2.a */ = {
+		003FA645093FFD41000C53B3 /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = 003FA644093FFD41000C53B3 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		003FA649093FFD41000C53B3 /* SDL2 */ = {
+		003FA649093FFD41000C53B3 /* SDL3 */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.executable";
-			path = SDL2;
+			path = SDL3;
 			remoteRef = 003FA648093FFD41000C53B3 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */ = {
+		DB1D40D717B3F30D00D74CFC /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = DB1D40D617B3F30D00D74CFC /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C5D28E3FB2900E1A26D /* SDL2.framework */ = {
+		F3C17C5D28E3FB2900E1A26D /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3C17C5C28E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C5F28E3FB2900E1A26D /* SDL2.framework */ = {
+		F3C17C5F28E3FB2900E1A26D /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3C17C5E28E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C6128E3FB2900E1A26D /* SDL2.framework */ = {
+		F3C17C6128E3FB2900E1A26D /* SDL3.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
-			path = SDL2.framework;
+			path = SDL3.framework;
 			remoteRef = F3C17C6028E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C6328E3FB2900E1A26D /* libSDL2.a */ = {
+		F3C17C6328E3FB2900E1A26D /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = F3C17C6228E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C6528E3FB2900E1A26D /* libSDL2.a */ = {
+		F3C17C6528E3FB2900E1A26D /* libSDL3.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			path = libSDL2.a;
+			path = libSDL3.a;
 			remoteRef = F3C17C6428E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C6728E3FB2900E1A26D /* libSDL2.dylib */ = {
+		F3C17C6728E3FB2900E1A26D /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = F3C17C6628E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3C17C6928E3FB2900E1A26D /* libSDL2.dylib */ = {
+		F3C17C6928E3FB2900E1A26D /* libSDL3.dylib */ = {
 			isa = PBXReferenceProxy;
 			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
+			path = libSDL3.dylib;
 			remoteRef = F3C17C6828E3FB2900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};

+ 3 - 3
Xcode/SDLTest/config.xcconfig

@@ -9,6 +9,6 @@
 // Include any optional config for this build
 #include? "build.xcconfig"
 
-CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
-CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
-CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL3 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
+CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

+ 0 - 173
acinclude/esd.m4

@@ -1,173 +0,0 @@
-# Configure paths for ESD
-# Manish Singh    98-9-30
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
-dnl
-AC_DEFUN([AM_PATH_ESD],
-[dnl
-dnl Get the cflags and libraries from the esd-config script
-dnl
-AC_ARG_WITH(esd-prefix,[  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)],
-            esd_prefix="$withval", esd_prefix="")
-AC_ARG_WITH(esd-exec-prefix,[  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
-            esd_exec_prefix="$withval", esd_exec_prefix="")
-AC_ARG_ENABLE(esdtest, [  --disable-esdtest       Do not try to compile and run a test ESD program],
-		    , enable_esdtest=yes)
-
-  if test x$esd_exec_prefix != x ; then
-     esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
-     if test x${ESD_CONFIG+set} != xset ; then
-        ESD_CONFIG=$esd_exec_prefix/bin/esd-config
-     fi
-  fi
-  if test x$esd_prefix != x ; then
-     esd_args="$esd_args --prefix=$esd_prefix"
-     if test x${ESD_CONFIG+set} != xset ; then
-        ESD_CONFIG=$esd_prefix/bin/esd-config
-     fi
-  fi
-
-  AC_PATH_PROG(ESD_CONFIG, esd-config, no)
-  min_esd_version=ifelse([$1], ,0.2.7,$1)
-  AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
-  no_esd=""
-  if test "$ESD_CONFIG" = "no" ; then
-    no_esd=yes
-  else
-    ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
-    ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
-
-    esd_major_version=`$ESD_CONFIG $esd_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    esd_minor_version=`$ESD_CONFIG $esd_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_esdtest" = "xyes" ; then
-      AC_LANG_PUSH([C])
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $ESD_CFLAGS"
-      LIBS="$LIBS $ESD_LIBS"
-dnl
-dnl Now check if the installed ESD is sufficiently new. (Also sanity
-dnl checks the results of esd-config to some extent
-dnl
-      rm -f conf.esdtest
-      AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <esd.h>
-
-int main (void)
-{
-  int major, minor, micro;
-  FILE *fp = fopen("conf.esdtest", "w");
-
-  if (fp) fclose(fp);
-
-  if (sscanf("$min_esd_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_esd_version");
-     exit(1);
-   }
-
-   if (($esd_major_version > major) ||
-      (($esd_major_version == major) && ($esd_minor_version > minor)) ||
-      (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
-      printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
-      printf("*** to point to the correct copy of esd-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-]])], [], [no_esd=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-       AC_LANG_POP([C])
-     fi
-  fi
-  if test "x$no_esd" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])
-  else
-     AC_MSG_RESULT(no)
-     if test "$ESD_CONFIG" = "no" ; then
-dnl       echo "*** The esd-config script installed by ESD could not be found"
-dnl       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
-dnl       echo "*** your path, or set the ESD_CONFIG environment variable to the"
-dnl       echo "*** full path to esd-config."
-      :
-     else
-       if test -f conf.esdtest ; then
-        :
-       else
-          echo "*** Could not run ESD test program, checking why..."
-          CFLAGS="$CFLAGS $ESD_CFLAGS"
-          LIBS="$LIBS $ESD_LIBS"
-          AC_LANG_PUSH([C])
-          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <esd.h>
-]], [[ return 0; ]])],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding ESD or finding the wrong"
-          echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means ESD was incorrectly installed"
-          echo "*** or that you have moved ESD since it was installed. In the latter case, you"
-          echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-          AC_LANG_POP([C])
-       fi
-     fi
-     ESD_CFLAGS=""
-     ESD_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(ESD_CFLAGS)
-  AC_SUBST(ESD_LIBS)
-  rm -f conf.esdtest
-])
-
-dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
-dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
-dnl
-AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
-[dnl
-  AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
-  ac_save_ESD_CFLAGS="$ESD_CFLAGS"
-  ac_save_ESD_LIBS="$ESD_LIBS"
-  AM_PATH_ESD(0.2.21,
-    ifelse([$1], , [
-      AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
-      AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
-	[Define if you have esound with support of multiple recording clients.])],
-    [$1]),
-    ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
-    if test "x$ac_save_ESD_CFLAGS" != x ; then
-       ESD_CFLAGS="$ac_save_ESD_CFLAGS"
-    fi
-    if test "x$ac_save_ESD_LIBS" != x ; then
-       ESD_LIBS="$ac_save_ESD_LIBS"
-    fi
-  )
-])

+ 1 - 1
android-project-ant/jni/src/Android.mk

@@ -11,7 +11,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
 # Add your application source files here...
 LOCAL_SRC_FILES := YourSourceHere.c
 
-LOCAL_SHARED_LIBRARIES := SDL2
+LOCAL_SHARED_LIBRARIES := SDL3
 
 LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
 

+ 1 - 1
android-project-ant/jni/src/Android_static.mk

@@ -6,7 +6,7 @@ LOCAL_MODULE := main
 
 LOCAL_SRC_FILES := YourSourceHere.c
 
-LOCAL_STATIC_LIBRARIES := SDL2_static
+LOCAL_STATIC_LIBRARIES := SDL3_static
 
 include $(BUILD_SHARED_LIBRARY)
 $(call import-module,SDL)LOCAL_PATH := $(call my-dir)

+ 1 - 1
android-project/app/jni/src/Android.mk

@@ -11,7 +11,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
 # Add your application source files here...
 LOCAL_SRC_FILES := YourSourceHere.c
 
-LOCAL_SHARED_LIBRARIES := SDL2
+LOCAL_SHARED_LIBRARIES := SDL3
 
 LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
 

+ 2 - 2
android-project/app/jni/src/CMakeLists.txt

@@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.6)
 
 project(MY_APP)
 
-find_library(SDL2 SDL2)
+find_library(SDL3 SDL3)
 
 add_library(main SHARED)
 
 target_sources(main PRIVATE YourSourceHere.c)
 
-target_link_libraries(main SDL2)
+target_link_libraries(main SDL3)
 
 

+ 9 - 9
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -59,8 +59,8 @@ import java.util.Locale;
 */
 public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
     private static final String TAG = "SDL";
-    private static final int SDL_MAJOR_VERSION = 2;
-    private static final int SDL_MINOR_VERSION = 25;
+    private static final int SDL_MAJOR_VERSION = 3;
+    private static final int SDL_MINOR_VERSION = 0;
     private static final int SDL_MICRO_VERSION = 0;
 /*
     // Display InputType.SOURCE/CLASS of events and devices
@@ -263,17 +263,17 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
      * This method is called by SDL before loading the native shared libraries.
      * It can be overridden to provide names of shared libraries to be loaded.
      * The default implementation returns the defaults. It never returns null.
-     * An array returned by a new implementation must at least contain "SDL2".
+     * An array returned by a new implementation must at least contain "SDL3".
      * Also keep in mind that the order the libraries are loaded may matter.
-     * @return names of shared libraries to be loaded (e.g. "SDL2", "main").
+     * @return names of shared libraries to be loaded (e.g. "SDL3", "main").
      */
     protected String[] getLibraries() {
         return new String[] {
-            "SDL2",
-            // "SDL2_image",
-            // "SDL2_mixer",
-            // "SDL2_net",
-            // "SDL2_ttf",
+            "SDL3",
+            // "SDL3_image",
+            // "SDL3_mixer",
+            // "SDL3_net",
+            // "SDL3_ttf",
             "main"
         };
     }

+ 2 - 2
build-scripts/android-prefab.sh

@@ -61,8 +61,8 @@ build_cmake_projects() {
             -DSDL_STATIC=ON \
             -DSDL_STATIC_PIC=ON \
             -DSDL_TEST=ON \
-            -DSDL2_DISABLE_SDL2MAIN=OFF \
-            -DSDL2_DISABLE_INSTALL=OFF \
+            -DSDL3_DISABLE_SDL3MAIN=OFF \
+            -DSDL3_DISABLE_INSTALL=OFF \
             -DCMAKE_INSTALL_PREFIX="${build_root}/build_${android_abi}/prefix" \
             -DCMAKE_INSTALL_INCLUDEDIR=include \
             -DCMAKE_INSTALL_LIBDIR=lib \

+ 1 - 1
build-scripts/androidbuildlibs.sh

@@ -69,5 +69,5 @@ ndk-build \
     APP_BUILD_SCRIPT=Android.mk \
     APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
     APP_PLATFORM=android-16 \
-    APP_MODULES="SDL2 SDL2_main" \
+    APP_MODULES="SDL3 SDL3_main" \
     $ndk_args

+ 3 - 3
build-scripts/emscripten-buildbot.sh

@@ -55,7 +55,7 @@ mkdir buildbot
 pushd buildbot
 
 echo "Configuring..."
-emconfigure ../configure --host=wasm32-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-s USE_SDL=0 -O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
+emconfigure ../configure --host=wasm32-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-s USE_SDL=0 -O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl3-installed" || exit $?
 
 echo "Building..."
 emmake $MAKE || exit $?
@@ -64,9 +64,9 @@ echo "Moving things around..."
 emmake $MAKE install || exit $?
 
 # Fix up a few things to a real install path
-perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
+perl -w -pi -e "s#$PWD/emscripten-sdl3-installed#/usr/local#g;" ./emscripten-sdl3-installed/lib/libSDL3.la ./emscripten-sdl3-installed/lib/pkgconfig/sdl3.pc ./emscripten-sdl3-installed/bin/sdl3-config
 mkdir -p ./usr
-mv ./emscripten-sdl2-installed ./usr/local
+mv ./emscripten-sdl3-installed ./usr/local
 tar -cJvvf $TARBALL usr
 popd
 

+ 10 - 41
build-scripts/fnsince.pl

@@ -19,12 +19,12 @@ open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
 while (<PIPEFH>) {
     chomp;
     if (/\Arelease\-(.*?)\Z/) {
-        # After 2.24.x, ignore anything that isn't a x.y.0 release.
-        # We moved to bugfix-only point releases there, so make sure new APIs
-        #  are assigned to the next minor version and ignore the patch versions.
+        # Ignore anything that isn't a x.y.0 release.
+        # Make sure new APIs are assigned to the next minor version and ignore the patch versions.
         my $ver = $1;
         my @versplit = split /\./, $ver;
-        next if (scalar(@versplit) > 2) && (($versplit[0] > 2) || (($versplit[0] == 2) && ($versplit[1] >= 24))) && ($versplit[2] != 0);
+        next if (scalar(@versplit) < 1) || ($versplit[0] != 3);  # Ignore anything that isn't an SDL3 release.
+        next if (scalar(@versplit) < 3) || ($versplit[2] != 0);
 
         # Consider this release version.
         push @unsorted_releases, $ver;
@@ -52,13 +52,12 @@ my @releases = sort {
     return 0;  # still here? They matched completely?!
 } @unsorted_releases;
 
-# this happens to work for how SDL versions things at the moment.
-my $current_release = $releases[-1];
-my $next_release;
+my $current_release = 'in-development';
+my $next_release = '3.0.0';  # valid until we actually ship something.  :)
+if (scalar(@releases) > 0) {
+    # this happens to work for how SDL versions things at the moment.
+    $current_release = $releases[-1];
 
-if ($current_release eq '2.0.22') {  # Hack for our jump from 2.0.22 to 2.24.0...
-    $next_release = '2.24.0';
-} else {
     my @current_release_segments = split /\./, $current_release;
     @current_release_segments[1] = '' . ($current_release_segments[1] + 2);
     $next_release = join('.', @current_release_segments);
@@ -76,8 +75,6 @@ push @releases, 'HEAD';
 my %funcs = ();
 foreach my $release (@releases) {
     #print("Checking $release...\n");
-    next if ($release eq '2.0.0') || ($release eq '2.0.1');  # no dynapi before 2.0.2
-    my $assigned_release = ($release eq '2.0.2') ? '2.0.0' : $release;  # assume everything in 2.0.2--first with dynapi--was there since 2.0.0. We'll fix it up later.
     my $tag = ($release eq 'HEAD') ? $release : "release-$release";
     my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h";
     open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n";
@@ -85,40 +82,12 @@ foreach my $release (@releases) {
         chomp;
         if (/\A\#define\s+(SDL_.*?)\s+SDL_.*?_REAL\Z/) {
             my $fn = $1;
-            $funcs{$fn} = $assigned_release if not defined $funcs{$fn};
+            $funcs{$fn} = $release if not defined $funcs{$fn};
         }
     }
     close(PIPEFH);
 }
 
-# Fixup the handful of functions that were added in 2.0.1 and 2.0.2 that we
-#  didn't have dynapi revision data about...
-$funcs{'SDL_GetSystemRAM'} = '2.0.1';
-$funcs{'SDL_GetBasePath'} = '2.0.1';
-$funcs{'SDL_GetPrefPath'} = '2.0.1';
-$funcs{'SDL_UpdateYUVTexture'} = '2.0.1';
-$funcs{'SDL_GL_GetDrawableSize'} = '2.0.1';
-$funcs{'SDL_Direct3D9GetAdapterIndex'} = '2.0.1';
-$funcs{'SDL_RenderGetD3D9Device'} = '2.0.1';
-
-$funcs{'SDL_RegisterApp'} = '2.0.2';
-$funcs{'SDL_UnregisterApp'} = '2.0.2';
-$funcs{'SDL_GetAssertionHandler'} = '2.0.2';
-$funcs{'SDL_GetDefaultAssertionHandler'} = '2.0.2';
-$funcs{'SDL_AtomicAdd'} = '2.0.2';
-$funcs{'SDL_AtomicGet'} = '2.0.2';
-$funcs{'SDL_AtomicGetPtr'} = '2.0.2';
-$funcs{'SDL_AtomicSet'} = '2.0.2';
-$funcs{'SDL_AtomicSetPtr'} = '2.0.2';
-$funcs{'SDL_HasAVX'} = '2.0.2';
-$funcs{'SDL_GameControllerAddMappingsFromRW'} = '2.0.2';
-$funcs{'SDL_acos'} = '2.0.2';
-$funcs{'SDL_asin'} = '2.0.2';
-$funcs{'SDL_vsscanf'} = '2.0.2';
-$funcs{'SDL_DetachThread'} = '2.0.2';
-$funcs{'SDL_GL_ResetAttributes'} = '2.0.2';
-$funcs{'SDL_DXGIGetOutputInfo'} = '2.0.2';
-
 # these are incorrect in the dynapi header, because we forgot to add them
 #  until a later release, but are available in the older release.
 $funcs{'SDL_WinRTGetFSPathUNICODE'} = '2.0.3';

+ 0 - 61
build-scripts/nacl-buildbot.sh

@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
-#  amd64 Linux to NaCl.
-
-# PLEASE NOTE that we have reports that SDL built with pepper_49 (current
-#  stable release as of November 10th, 2016) is broken. Please retest
-#  when something newer becomes stable and then decide if this was SDL's
-#  bug or NaCl's bug.  --ryan.
-export NACL_SDK_ROOT="/nacl_sdk/pepper_47"
-
-TARBALL="$1"
-if [ -z $1 ]; then
-    TARBALL=sdl-nacl.tar.xz
-fi
-
-OSTYPE=`uname -s`
-if [ "$OSTYPE" != "Linux" ]; then
-    # !!! FIXME
-    echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
-    exit 1
-fi
-
-if [ "x$MAKE" == "x" ]; then
-    NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
-    let NCPU=$NCPU+1
-    MAKE="make -j$NCPU"
-fi
-
-BUILDBOTDIR="nacl-buildbot"
-PARENTDIR="$PWD"
-
-set -e
-set -x
-rm -f $TARBALL
-rm -rf $BUILDBOTDIR
-mkdir -p $BUILDBOTDIR
-pushd $BUILDBOTDIR
-
-# !!! FIXME: ccache?
-export CC="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-clang"
-export CFLAGS="$CFLAGS -I$NACL_SDK_ROOT/include -I$NACL_SDK_ROOT/include/pnacl"
-export AR="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
-export LD="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
-export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
-
-../configure --host=pnacl --prefix=$PWD/nacl-sdl2-installed
-$MAKE
-$MAKE install
-# Fix up a few things to a real install path
-perl -w -pi -e "s#$PWD/nacl-sdl2-installed#/usr/local#g;" ./nacl-sdl2-installed/lib/libSDL2.la ./nacl-sdl2-installed/lib/pkgconfig/sdl2.pc ./nacl-sdl2-installed/bin/sdl2-config
-mkdir -p ./usr
-mv ./nacl-sdl2-installed ./usr/local
-
-popd
-tar -cJvvf $TARBALL -C $BUILDBOTDIR usr
-rm -rf $BUILDBOTDIR
-
-set +x
-echo "All done. Final installable is in $TARBALL ...";
-

+ 0 - 105
build-scripts/naclbuild.sh

@@ -1,105 +0,0 @@
-#!/bin/bash
-if [ -z "$1" ] && [ -z "$NACL_SDK_ROOT" ]; then
-    echo "Usage: ./naclbuild ~/nacl/pepper_35"
-    echo "This will build SDL for Native Client, and testgles2.c as a demo"
-    echo "You can set env vars CC, AR, LD and RANLIB to override the default PNaCl toolchain used"
-    echo "You can set env var SOURCES to select a different source file than testgles2.c"
-    exit 1
-fi
-
-if [ -n "$1" ]; then
-    NACL_SDK_ROOT="$1"
-fi
-
-CC=""
-
-if [ -n "$2" ]; then
-    CC="$2"
-fi
-
-echo "Using SDK at $NACL_SDK_ROOT"
-
-export NACL_SDK_ROOT="$NACL_SDK_ROOT"
-export CFLAGS="$CFLAGS -I$NACL_SDK_ROOT/include -I$NACL_SDK_ROOT/include/pnacl"
-
-NCPUS="1"
-case "$OSTYPE" in
-    darwin*)
-        NCPU=`sysctl -n hw.ncpu`
-        ;; 
-    linux*)
-        if [ -n `which nproc` ]; then
-            NCPUS=`nproc`
-        fi  
-        ;;
-  *);;
-esac
-
-CURDIR=`pwd -P`
-SDLPATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
-BUILDPATH="$SDLPATH/build/nacl"
-TESTBUILDPATH="$BUILDPATH/test"
-SDL2_STATIC="$BUILDPATH/build/.libs/libSDL2.a"
-mkdir -p $BUILDPATH
-mkdir -p $TESTBUILDPATH
-
-if [ -z "$CC" ]; then
-    export CC="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-clang"
-fi
-if [ -z "$AR" ]; then
-    export AR="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
-fi
-if [ -z "$LD" ]; then
-    export LD="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
-fi
-if [ -z "$RANLIB" ]; then
-    export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
-fi
-
-if [ -z "$SOURCES" ]; then
-    export SOURCES="$SDLPATH/test/testgles2.c"
-fi
-
-if [ ! -f "$CC" ]; then
-    echo "Could not find compiler at $CC"
-    exit 1
-fi
-
-
-
-
-cd $BUILDPATH
-$SDLPATH/configure --host=pnacl --prefix $TESTBUILDPATH
-make -j$NCPUS CFLAGS="$CFLAGS -I./include"
-make install
-
-if [ ! -f "$SDL2_STATIC" ]; then
-    echo "Build failed! $SDL2_STATIC"
-    exit 1
-fi
-
-echo "Building test"
-cp -f $SDLPATH/test/nacl/* $TESTBUILDPATH
-# Some tests need these resource files
-cp -f $SDLPATH/test/*.bmp $TESTBUILDPATH
-cp -f $SDLPATH/test/*.wav $TESTBUILDPATH
-cp -f $SDL2_STATIC $TESTBUILDPATH
-
-# Copy user sources
-_SOURCES=($SOURCES)
-for src in "${_SOURCES[@]}"
-do
-    cp $src $TESTBUILDPATH
-done
-export SOURCES="$SOURCES"
-
-cd $TESTBUILDPATH
-make -j$NCPUS CONFIG="Release" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL2 -I$SDLPATH/include"
-make -j$NCPUS CONFIG="Debug" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL2 -I$SDLPATH/include"
-
-echo
-echo "Run the test with: "
-echo "cd $TESTBUILDPATH;python -m SimpleHTTPServer"
-echo "Then visit http://localhost:8000 with Chrome"
-
-cd $CURDIR

+ 7 - 7
build-scripts/raspberrypi-buildbot.sh

@@ -1,13 +1,13 @@
 #!/bin/bash
 
-# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
+# This is the script buildbot.libsdl.org uses to cross-compile SDL3 from
 #  x86 Linux to Raspberry Pi.
 
 # The final tarball can be unpacked in the root directory of a RPi,
-#  so the SDL2 install lands in /usr/local. Run ldconfig, and then
-#  you should be able to build and run SDL2-based software on your
+#  so the SDL3 install lands in /usr/local. Run ldconfig, and then
+#  you should be able to build and run SDL3-based software on your
 #  Pi. Standard configure scripts should be able to find SDL and
-#  build against it, and sdl2-config should work correctly on the
+#  build against it, and sdl3-config should work correctly on the
 #  actual device.
 
 TARBALL="$1"
@@ -42,13 +42,13 @@ SYSROOT="/opt/rpi-sysroot"
 export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
 # -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
 # !!! FIXME: shouldn't have to --disable-* things here.
-../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
+../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl3-installed --disable-pulseaudio --disable-esd --disable-video-wayland
 $MAKE
 $MAKE install
 # Fix up a few things to a real install path on a real Raspberry Pi...
-perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
+perl -w -pi -e "s#$PWD/rpi-sdl3-installed#/usr/local#g;" ./rpi-sdl3-installed/lib/libSDL3.la ./rpi-sdl3-installed/lib/pkgconfig/sdl3.pc ./rpi-sdl3-installed/bin/sdl3-config
 mkdir -p ./usr
-mv ./rpi-sdl2-installed ./usr/local
+mv ./rpi-sdl3-installed ./usr/local
 tar -cJvvf $TARBALL usr
 popd
 

+ 2 - 2
build-scripts/showrev.sh

@@ -5,8 +5,8 @@
 SDL_ROOT=$(dirname $0)/..
 cd $SDL_ROOT
 
-if [ -e ./VERSION ]; then
-    cat ./VERSION
+if [ -e ./VERSION.txt ]; then
+    cat ./VERSION.txt
     exit 0
 fi
 

+ 21 - 22
build-scripts/test-versioning.sh

@@ -4,6 +4,8 @@
 
 set -eu
 
+cd `dirname $0`/..
+
 ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION  *//p' include/SDL_version.h)
 ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION  *//p' include/SDL_version.h)
 ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL  *//p' include/SDL_version.h)
@@ -67,28 +69,6 @@ else
     not_ok "android-project/app/src/main/java/org/libsdl/app/SDLActivity.java $version disagrees with SDL_version.h $ref_version"
 fi
 
-major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
-minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
-micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
-version="${major}.${minor}.${micro}"
-
-if [ "$ref_version" = "$version" ]; then
-    ok "Makefile.os2 $version"
-else
-    not_ok "Makefile.os2 $version disagrees with SDL_version.h $ref_version"
-fi
-
-major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.w32)
-minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.w32)
-micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.w32)
-version="${major}.${minor}.${micro}"
-
-if [ "$ref_version" = "$version" ]; then
-    ok "Makefile.w32 $version"
-else
-    not_ok "Makefile.w32 $version disagrees with SDL_version.h $ref_version"
-fi
-
 tuple=$(sed -ne 's/^ *FILEVERSION *//p' src/main/windows/version.rc | tr -d '\r')
 ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
 
@@ -139,6 +119,25 @@ else
     not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version"
 fi
 
+version=$(sed -Ene 's/Title SDL (.*)/\1/p' Xcode/SDL/pkg-support/SDL.info)
+
+if [ "$ref_version" = "$version" ]; then
+    ok "SDL.info Title $version"
+else
+    not_ok "SDL.info Title $version disagrees with SDL_version.h $ref_version"
+fi
+
+marketing=$(sed -Ene 's/.*MARKETING_VERSION = (.*);/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
+
+ref="$ref_version
+$ref_version"
+
+if [ "$ref" = "$marketing" ]; then
+    ok "project.pbxproj MARKETING_VERSION is consistent"
+else
+    not_ok "project.pbxproj MARKETING_VERSION is inconsistent, expected $ref, got $marketing"
+fi
+
 # For simplicity this assumes we'll never break ABI before SDL 3.
 dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
 

+ 4 - 8
build-scripts/update-version.sh

@@ -30,6 +30,10 @@ echo "Updating version to '$NEWVERSION' ..."
 # !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file.
 perl -w -pi -e 's/(\<string\>)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist
 
+perl -w -pi -e 's/(Title SDL )\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/pkg-support/SDL.info
+
+perl -w -pi -e 's/(MARKETING_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+
 DYVER=`expr $MINOR \* 100 + 1`
 perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
 
@@ -62,14 +66,6 @@ perl -w -pi -e 's/\A(.* SDL_MAJOR_VERSION = )\d+/${1}'$MAJOR'/;' android-project
 perl -w -pi -e 's/\A(.* SDL_MINOR_VERSION = )\d+/${1}'$MINOR'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
 perl -w -pi -e 's/\A(.* SDL_MICRO_VERSION = )\d+/${1}'$PATCH'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
 
-perl -w -pi -e 's/\A(MAJOR_VERSION\s*=\s*)\d+/${1}'$MAJOR'/;' Makefile.os2
-perl -w -pi -e 's/\A(MINOR_VERSION\s*=\s*)\d+/${1}'$MINOR'/;' Makefile.os2
-perl -w -pi -e 's/\A(MICRO_VERSION\s*=\s*)\d+/${1}'$PATCH'/;' Makefile.os2
-
-perl -w -pi -e 's/\A(MAJOR_VERSION\s*=\s*)\d+/${1}'$MAJOR'/;' Makefile.w32
-perl -w -pi -e 's/\A(MINOR_VERSION\s*=\s*)\d+/${1}'$MINOR'/;' Makefile.w32
-perl -w -pi -e 's/\A(MICRO_VERSION\s*=\s*)\d+/${1}'$PATCH'/;' Makefile.w32
-
 perl -w -pi -e 's/(\#define SDL_MAJOR_VERSION\s+)\d+/${1}'$MAJOR'/;' include/SDL_version.h
 perl -w -pi -e 's/(\#define SDL_MINOR_VERSION\s+)\d+/${1}'$MINOR'/;' include/SDL_version.h
 perl -w -pi -e 's/(\#define SDL_PATCHLEVEL\s+)\d+/${1}'$PATCH'/;' include/SDL_version.h

+ 1 - 1
build-scripts/updaterev.sh

@@ -29,7 +29,7 @@ done
 rev=`sh showrev.sh 2>/dev/null`
 if [ "$rev" != "" ]; then
     if [ -n "$dist" ]; then
-        echo "$rev" > "$outdir/VERSION"
+        echo "$rev" > "$outdir/VERSION.txt"
     fi
     echo "/* Generated by updaterev.sh, do not edit */" >"$header.new"
     if [ -n "$vendor" ]; then

+ 3 - 3
build-scripts/windows-buildbot-zipper.bat

@@ -16,9 +16,9 @@ mkdir zipper\SDL
 mkdir zipper\SDL\include
 mkdir zipper\SDL\lib
 copy include\*.h include\
-copy %2\%1\Release\SDL2.dll zipper\SDL\lib\
-copy %2\%1\Release\SDL2.lib zipper\SDL\lib\
-copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\
+copy %2\%1\Release\SDL3.dll zipper\SDL\lib\
+copy %2\%1\Release\SDL3.lib zipper\SDL\lib\
+copy %2\%1\Release\SDL3main.lib zipper\SDL\lib\
 cd zipper
 zip -9r ..\%3 SDL
 cd ..

+ 1 - 1
cmake/macros.cmake

@@ -92,7 +92,7 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
   endforeach()
 endmacro()
 
-if(CMAKE_VERSION VERSION_LESS 3.16.0 OR SDL2_SUBPROJECT)
+if(CMAKE_VERSION VERSION_LESS 3.16.0 OR SDL3_SUBPROJECT)
   # - CMake versions <3.16 do not support the OBJC language
   # - When SDL is built as a subproject and when the main project does not enable OBJC,
   #   CMake fails due to missing internal CMake variables (CMAKE_OBJC_COMPILE_OBJECT)

+ 41 - 196
cmake/sdlchecks.cmake

@@ -65,7 +65,7 @@ macro(CheckOSS)
 
     if(HAVE_OSS_SYS_SOUNDCARD_H)
       set(HAVE_OSS TRUE)
-      file(GLOB OSS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dsp/*.c)
+      file(GLOB OSS_SOURCES ${SDL3_SOURCE_DIR}/src/audio/dsp/*.c)
       set(SDL_AUDIO_DRIVER_OSS 1)
       list(APPEND SOURCE_FILES ${OSS_SOURCES})
       if(NETBSD)
@@ -89,7 +89,7 @@ macro(CheckALSA)
     endif()
     if(HAVE_LIBASOUND)
       set(HAVE_ALSA TRUE)
-      file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
+      file(GLOB ALSA_SOURCES ${SDL3_SOURCE_DIR}/src/audio/alsa/*.c)
       list(APPEND SOURCE_FILES ${ALSA_SOURCES})
       set(SDL_AUDIO_DRIVER_ALSA 1)
       if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
@@ -117,7 +117,7 @@ macro(CheckPipewire)
         pkg_check_modules(PKG_PIPEWIRE libpipewire-0.3>=0.3.20)
         if(PKG_PIPEWIRE_FOUND)
             set(HAVE_PIPEWIRE TRUE)
-            file(GLOB PIPEWIRE_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pipewire/*.c)
+            file(GLOB PIPEWIRE_SOURCES ${SDL3_SOURCE_DIR}/src/audio/pipewire/*.c)
             list(APPEND SOURCE_FILES ${PIPEWIRE_SOURCES})
             set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
             list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
@@ -146,7 +146,7 @@ macro(CheckPulseAudio)
     pkg_check_modules(PKG_PULSEAUDIO libpulse-simple)
     if(PKG_PULSEAUDIO_FOUND)
       set(HAVE_PULSEAUDIO TRUE)
-      file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
+      file(GLOB PULSEAUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/pulseaudio/*.c)
       list(APPEND SOURCE_FILES ${PULSEAUDIO_SOURCES})
       set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
       list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
@@ -165,128 +165,6 @@ macro(CheckPulseAudio)
   endif()
 endmacro()
 
-# Requires:
-# - PkgCheckModules
-# Optional:
-# - SDL_JACK_SHARED opt
-# - HAVE_SDL_LOADSO opt
-macro(CheckJACK)
-  if(SDL_JACK)
-    pkg_check_modules(PKG_JACK jack)
-    if(PKG_JACK_FOUND)
-      set(HAVE_JACK TRUE)
-      file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
-      list(APPEND SOURCE_FILES ${JACK_SOURCES})
-      set(SDL_AUDIO_DRIVER_JACK 1)
-      list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
-      if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
-      endif()
-      FindLibraryAndSONAME("jack" LIBDIRS ${PKG_JACK_LIBRARY_DIRS})
-      if(SDL_JACK_SHARED AND JACK_LIB AND HAVE_SDL_LOADSO)
-        set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
-        set(HAVE_JACK_SHARED TRUE)
-      else()
-        list(APPEND EXTRA_LDFLAGS ${PKG_JACK_LDFLAGS})
-      endif()
-      set(HAVE_SDL_AUDIO TRUE)
-    endif()
-  endif()
-endmacro()
-
-# Requires:
-# - PkgCheckModules
-# Optional:
-# - SDL_ESD_SHARED opt
-# - HAVE_SDL_LOADSO opt
-macro(CheckESD)
-  if(SDL_ESD)
-    pkg_check_modules(PKG_ESD esound)
-    if(PKG_ESD_FOUND)
-      set(HAVE_ESD TRUE)
-      file(GLOB ESD_SOURCES ${SDL2_SOURCE_DIR}/src/audio/esd/*.c)
-      list(APPEND SOURCE_FILES ${ESD_SOURCES})
-      set(SDL_AUDIO_DRIVER_ESD 1)
-      list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
-      if(SDL_ESD_SHARED AND NOT HAVE_SDL_LOADSO)
-          message_warn("You must have SDL_LoadObject() support for dynamic ESD loading")
-      endif()
-      FindLibraryAndSONAME(esd LIBDIRS ${PKG_ESD_LIBRARY_DIRS})
-      if(SDL_ESD_SHARED AND ESD_LIB AND HAVE_SDL_LOADSO)
-          set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"")
-          set(HAVE_ESD_SHARED TRUE)
-      else()
-          list(APPEND EXTRA_LDFLAGS ${PKG_ESD_LDFLAGS})
-      endif()
-      set(HAVE_SDL_AUDIO TRUE)
-    endif()
-  endif()
-endmacro()
-
-# Requires:
-# - n/a
-# Optional:
-# - SDL_ARTS_SHARED opt
-# - HAVE_SDL_LOADSO opt
-macro(CheckARTS)
-  if(SDL_ARTS)
-    find_program(ARTS_CONFIG arts-config)
-    if(ARTS_CONFIG)
-      execute_process(CMD_ARTSCFLAGS ${ARTS_CONFIG} --cflags
-        OUTPUT_VARIABLE ARTS_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
-      list(APPEND EXTRA_CFLAGS ${ARTS_CFLAGS})
-      execute_process(CMD_ARTSLIBS ${ARTS_CONFIG} --libs
-        OUTPUT_VARIABLE ARTS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
-      file(GLOB ARTS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/arts/*.c)
-      list(APPEND SOURCE_FILES ${ARTS_SOURCES})
-      set(SDL_AUDIO_DRIVER_ARTS 1)
-      set(HAVE_ARTS TRUE)
-      if(SDL_ARTS_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading")
-      endif()
-      FindLibraryAndSONAME(artsc)
-      if(SDL_ARTS_SHARED AND ARTSC_LIB AND HAVE_SDL_LOADSO)
-        # TODO
-        set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"")
-        set(HAVE_ARTS_SHARED TRUE)
-      else()
-        list(APPEND EXTRA_LDFLAGS ${ARTS_LIBS})
-      endif()
-      set(HAVE_SDL_AUDIO TRUE)
-    endif()
-  endif()
-endmacro()
-
-# Requires:
-# - n/a
-# Optional:
-# - SDL_NAS_SHARED opt
-# - HAVE_SDL_LOADSO opt
-macro(CheckNAS)
-  if(SDL_NAS)
-    # TODO: set include paths properly, so the NAS headers are found
-    check_include_file(audio/audiolib.h HAVE_NAS_H)
-    find_library(D_NAS_LIB audio)
-    if(HAVE_NAS_H AND D_NAS_LIB)
-      set(HAVE_NAS TRUE)
-      file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
-      list(APPEND SOURCE_FILES ${NAS_SOURCES})
-      set(SDL_AUDIO_DRIVER_NAS 1)
-      if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic NAS loading")
-      endif()
-      FindLibraryAndSONAME("audio")
-      if(SDL_NAS_SHARED AND AUDIO_LIB AND HAVE_SDL_LOADSO)
-        set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"")
-        set(HAVE_NAS_SHARED TRUE)
-      else()
-        list(APPEND EXTRA_LIBS ${D_NAS_LIB})
-      endif()
-      set(HAVE_SDL_AUDIO TRUE)
-    endif()
-  endif()
-endmacro()
-
 # Requires:
 # - PkgCheckModules
 # Optional:
@@ -297,7 +175,7 @@ macro(CheckSNDIO)
     pkg_check_modules(PKG_SNDIO sndio)
     if(PKG_SNDIO_FOUND)
       set(HAVE_SNDIO TRUE)
-      file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
+      file(GLOB SNDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/sndio/*.c)
       list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
       set(SDL_AUDIO_DRIVER_SNDIO 1)
       list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
@@ -319,26 +197,26 @@ endmacro()
 # Requires:
 # - PkgCheckModules
 # Optional:
-# - FUSIONSOUND_SHARED opt
+# - SDL_JACK_SHARED opt
 # - HAVE_SDL_LOADSO opt
-macro(CheckFusionSound)
-  if(FUSIONSOUND)
-    pkg_check_modules(PKG_FUSIONSOUND fusionsound>=1.0.0)
-    if(PKG_FUSIONSOUND_FOUND)
-      set(HAVE_FUSIONSOUND TRUE)
-      file(GLOB FUSIONSOUND_SOURCES ${SDL2_SOURCE_DIR}/src/audio/fusionsound/*.c)
-      list(APPEND SOURCE_FILES ${FUSIONSOUND_SOURCES})
-      set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
-      list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
-      if(FUSIONSOUND_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading")
+macro(CheckJACK)
+  if(SDL_JACK)
+    pkg_check_modules(PKG_JACK jack)
+    if(PKG_JACK_FOUND)
+      set(HAVE_JACK TRUE)
+      file(GLOB JACK_SOURCES ${SDL3_SOURCE_DIR}/src/audio/jack/*.c)
+      list(APPEND SOURCE_FILES ${JACK_SOURCES})
+      set(SDL_AUDIO_DRIVER_JACK 1)
+      list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
+      if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
+        message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
       endif()
-      FindLibraryAndSONAME("fusionsound" LIBDIRS ${PKG_FUSIONSOUND_LIBRARY_DIRS})
-      if(FUSIONSOUND_SHARED AND FUSIONSOUND_LIB AND HAVE_SDL_LOADSO)
-        set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"")
-        set(HAVE_FUSIONSOUND_SHARED TRUE)
+      FindLibraryAndSONAME("jack" LIBDIRS ${PKG_JACK_LIBRARY_DIRS})
+      if(SDL_JACK_SHARED AND JACK_LIB AND HAVE_SDL_LOADSO)
+        set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
+        set(HAVE_JACK_SHARED TRUE)
       else()
-        list(APPEND EXTRA_LDFLAGS ${PKG_FUSIONSOUND_LDFLAGS})
+        list(APPEND EXTRA_LDFLAGS ${PKG_JACK_LDFLAGS})
       endif()
       set(HAVE_SDL_AUDIO TRUE)
     endif()
@@ -364,7 +242,7 @@ macro(CheckLibSampleRate)
           get_property(_samplerate_type TARGET SampleRate::samplerate PROPERTY TYPE)
           if(_samplerate_type STREQUAL "SHARED_LIBRARY")
             set(HAVE_LIBSAMPLERATE_SHARED TRUE)
-            if(WIN32 OR OS2)
+            if(WIN32)
               set(SDL_LIBSAMPLERATE_DYNAMIC "\"$<TARGET_FILE_NAME:SampleRate::samplerate>\"")
             else()
               set(SDL_LIBSAMPLERATE_DYNAMIC "\"$<TARGET_SONAME_FILE_NAME:SampleRate::samplerate>\"")
@@ -442,7 +320,7 @@ macro(CheckX11)
       set(HAVE_X11 TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
-      file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
+      file(GLOB X11_SOURCES ${SDL3_SOURCE_DIR}/src/video/x11/*.c)
       list(APPEND SOURCE_FILES ${X11_SOURCES})
       set(SDL_VIDEO_DRIVER_X11 1)
 
@@ -662,17 +540,17 @@ macro(CheckWayland)
       set(HAVE_WAYLAND TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
-      file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
+      file(GLOB WAYLAND_SOURCES ${SDL3_SOURCE_DIR}/src/video/wayland/*.c)
       list(APPEND SOURCE_FILES ${WAYLAND_SOURCES})
 
       # We have to generate some protocol interface code for some unstable Wayland features.
       file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
       target_include_directories(sdl-build-options INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
 
-      file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
+      file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL3_SOURCE_DIR}/wayland-protocols/" "${SDL3_SOURCE_DIR}/wayland-protocols/*.xml")
       foreach(_XML ${WAYLAND_PROTOCOLS_XML})
         string(REGEX REPLACE "\\.xml$" "" _PROTL "${_XML}")
-        WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
+        WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL3_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
       endforeach()
 
       if(SDL_WAYLAND_QT_TOUCH)
@@ -731,7 +609,7 @@ macro(CheckCOCOA)
       set(HAVE_COCOA TRUE)
     endif()
     if(HAVE_COCOA)
-      file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
+      file(GLOB COCOA_SOURCES ${SDL3_SOURCE_DIR}/src/video/cocoa/*.m)
       list(APPEND SOURCE_FILES ${COCOA_SOURCES})
       set(SDL_VIDEO_DRIVER_COCOA 1)
       set(HAVE_SDL_VIDEO TRUE)
@@ -739,37 +617,6 @@ macro(CheckCOCOA)
   endif()
 endmacro()
 
-# Requires:
-# - PkgCheckModules
-# Optional:
-# - DIRECTFB_SHARED opt
-# - HAVE_SDL_LOADSO opt
-macro(CheckDirectFB)
-  if(SDL_DIRECTFB)
-    pkg_check_modules(PKG_DIRECTFB directfb>=1.0.0)
-    if(PKG_DIRECTFB_FOUND)
-      set(HAVE_DIRECTFB TRUE)
-      file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
-      list(APPEND SOURCE_FILES ${DIRECTFB_SOURCES})
-      set(SDL_VIDEO_DRIVER_DIRECTFB 1)
-      set(SDL_VIDEO_RENDER_DIRECTFB 1)
-      list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
-      list(APPEND SDL_CFLAGS ${PKG_DIRECTFB_CFLAGS})
-      if(SDL_DIRECTFB_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
-      endif()
-      FindLibraryAndSONAME("directfb" LIBDIRS ${PKG_DIRECTFB_LIBRARY_DIRS})
-      if(SDL_DIRECTFB_SHARED AND DIRECTFB_LIB AND HAVE_SDL_LOADSO)
-        set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"")
-        set(HAVE_DIRECTFB_SHARED TRUE)
-      else()
-        list(APPEND EXTRA_LDFLAGS ${PKG_DIRECTFB_LDFLAGS})
-      endif()
-      set(HAVE_SDL_VIDEO TRUE)
-    endif()
-  endif()
-endmacro()
-
 # Requires:
 # - n/a
 macro(CheckVivante)
@@ -786,7 +633,7 @@ macro(CheckVivante)
       set(HAVE_VIVANTE TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
-      file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
+      file(GLOB VIVANTE_SOURCES ${SDL3_SOURCE_DIR}/src/video/vivante/*.c)
       list(APPEND SOURCE_FILES ${VIVANTE_SOURCES})
       set(SDL_VIDEO_DRIVER_VIVANTE 1)
       if(HAVE_VIVANTE_VDK)
@@ -1000,17 +847,17 @@ macro(CheckPTHREAD)
       endif()
 
       set(SOURCE_FILES ${SOURCE_FILES}
-          ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
-          ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_sysmutex.c   # Can be faked, if necessary
-          ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_syscond.c    # Can be faked, if necessary
-          ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systls.c
+          ${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
+          ${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_sysmutex.c   # Can be faked, if necessary
+          ${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_syscond.c    # Can be faked, if necessary
+          ${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_systls.c
           )
       if(HAVE_PTHREADS_SEM)
         set(SOURCE_FILES ${SOURCE_FILES}
-            ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_syssem.c)
+            ${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_syssem.c)
       else()
         set(SOURCE_FILES ${SOURCE_FILES}
-            ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syssem.c)
+            ${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syssem.c)
       endif()
       set(HAVE_SDL_THREADS TRUE)
     endif()
@@ -1147,7 +994,7 @@ macro(CheckUSBHID)
       set(SDL_HAVE_MACHINE_JOYSTICK_H 1)
     endif()
     set(SDL_JOYSTICK_USBHID 1)
-    file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)
+    file(GLOB BSD_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/bsd/*.c)
     list(APPEND SOURCE_FILES ${BSD_JOYSTICK_SOURCES})
     list(APPEND EXTRA_CFLAGS ${USB_CFLAGS})
     list(APPEND EXTRA_LIBS ${USB_LIBS})
@@ -1172,8 +1019,6 @@ macro(CheckHIDAPI)
           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PKG_LIBUSB_CFLAGS}")
           if(HIDAPI_ONLY_LIBUSB)
             list(APPEND EXTRA_LIBS ${PKG_LIBUSB_LIBRARIES})
-          elseif(OS2)
-            set(SDL_LIBUSB_DYNAMIC "\"usb100.dll\"")
           else()
             # libusb is loaded dynamically, so don't add it to EXTRA_LIBS
             FindLibraryAndSONAME("usb-1.0" LIBDIRS ${PKG_LIBUSB_LIBRARY_DIRS})
@@ -1191,10 +1036,10 @@ macro(CheckHIDAPI)
 
     if(HAVE_HIDAPI)
       if(ANDROID)
-        list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
+        list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/hidapi/android/hid.cpp)
       endif()
       if(IOS OR TVOS)
-        list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
+        list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/hidapi/ios/hid.m)
         set(SDL_FRAMEWORK_COREBLUETOOTH 1)
       endif()
       set(HAVE_SDL_HIDAPI TRUE)
@@ -1203,7 +1048,7 @@ macro(CheckHIDAPI)
         set(SDL_JOYSTICK_HIDAPI 1)
         set(HAVE_SDL_JOYSTICK TRUE)
         set(HAVE_HIDAPI_JOYSTICK TRUE)
-        file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
+        file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/hidapi/*.c)
         list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
       endif()
     else()
@@ -1244,7 +1089,7 @@ macro(CheckRPI)
     if(SDL_VIDEO AND HAVE_RPI)
       set(HAVE_SDL_VIDEO TRUE)
       set(SDL_VIDEO_DRIVER_RPI 1)
-      file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
+      file(GLOB VIDEO_RPI_SOURCES ${SDL3_SOURCE_DIR}/src/video/raspberry/*.c)
       list(APPEND SOURCE_FILES ${VIDEO_RPI_SOURCES})
       list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
       # !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
@@ -1269,7 +1114,7 @@ macro(CheckKMSDRM)
       set(HAVE_KMSDRM TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
-      file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
+      file(GLOB KMSDRM_SOURCES ${SDL3_SOURCE_DIR}/src/video/kmsdrm/*.c)
       list(APPEND SOURCE_FILES ${KMSDRM_SOURCES})
 
       list(APPEND EXTRA_CFLAGS ${PKG_KMSDRM_CFLAGS})

+ 42 - 42
cmake/test/CMakeLists.txt

@@ -16,109 +16,109 @@ endif()
 
 cmake_policy(SET CMP0074 NEW)
 
-# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot
+# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL3 outside of sysroot
 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
 
 include(FeatureSummary)
 
-option(TEST_SHARED "Test linking to shared SDL2 library" ON)
+option(TEST_SHARED "Test linking to shared SDL3 library" ON)
 add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
 
-option(TEST_STATIC "Test linking to static SDL2 library" ON)
+option(TEST_STATIC "Test linking to static SDL3 library" ON)
 add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
 
 if(TEST_SHARED)
-    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2)
+    find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
     if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
-        find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+        find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
     endif()
     add_executable(gui-shared WIN32 main_gui.c)
-    if(TARGET SDL2::SDL2main)
-        target_link_libraries(gui-shared PRIVATE SDL2::SDL2main)
+    if(TARGET SDL3::SDL3main)
+        target_link_libraries(gui-shared PRIVATE SDL3::SDL3main)
     endif()
-    target_link_libraries(gui-shared PRIVATE SDL2::SDL2)
+    target_link_libraries(gui-shared PRIVATE SDL3::SDL3)
     if(WIN32)
         add_custom_command(TARGET gui-shared POST_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:gui-shared>"
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL3::SDL3>" "$<TARGET_FILE_DIR:gui-shared>"
         )
     endif()
 
     add_library(sharedlib-shared SHARED main_lib.c)
-    target_link_libraries(sharedlib-shared PRIVATE SDL2::SDL2)
+    target_link_libraries(sharedlib-shared PRIVATE SDL3::SDL3)
     generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
     target_compile_definitions(sharedlib-shared PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared_export.h\"")
     set_target_properties(sharedlib-shared PROPERTIES C_VISIBILITY_PRESET "hidden")
 
     add_executable(gui-shared-vars WIN32 main_gui.c)
-    target_link_libraries(gui-shared-vars PRIVATE ${SDL2_LIBRARIES})
-    target_include_directories(gui-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    target_link_libraries(gui-shared-vars PRIVATE ${SDL3_LIBRARIES})
+    target_include_directories(gui-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
 
     add_executable(cli-shared main_cli.c)
-    target_link_libraries(cli-shared PRIVATE SDL2::SDL2)
+    target_link_libraries(cli-shared PRIVATE SDL3::SDL3)
     if(WIN32)
         add_custom_command(TARGET cli-shared POST_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:cli-shared>"
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL3::SDL3>" "$<TARGET_FILE_DIR:cli-shared>"
         )
     endif()
 
-    # SDL2_LIBRARIES does not support creating a cli SDL2 application
-    # (it is possible that SDL2main is a stub, but we don't know for sure)
-    if(NOT TARGET SDL2::SDL2main)
+    # SDL3_LIBRARIES does not support creating a cli SDL3 application
+    # (it is possible that SDL3main is a stub, but we don't know for sure)
+    if(NOT TARGET SDL3::SDL3main)
         add_executable(cli-shared-vars main_cli.c)
-        target_link_libraries(cli-shared-vars PRIVATE ${SDL2_LIBRARIES})
-        target_include_directories(cli-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+        target_link_libraries(cli-shared-vars PRIVATE ${SDL3_LIBRARIES})
+        target_include_directories(cli-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
     endif()
 
     add_library(sharedlib-shared-vars SHARED main_lib.c)
-    target_link_libraries(sharedlib-shared-vars PRIVATE ${SDL2_LIBRARIES})
-    target_include_directories(sharedlib-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    target_link_libraries(sharedlib-shared-vars PRIVATE ${SDL3_LIBRARIES})
+    target_include_directories(sharedlib-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
     generate_export_header(sharedlib-shared-vars EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
     target_compile_definitions(sharedlib-shared-vars PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared-vars_export.h\"")
     set_target_properties(sharedlib-shared-vars PROPERTIES C_VISIBILITY_PRESET "hidden")
 endif()
 
 if(TEST_STATIC)
-    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2-static)
+    find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3-static)
     if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
-        find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+        find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
     endif()
     add_executable(gui-static WIN32 main_gui.c)
-    if(TARGET SDL2::SDL2main)
-        target_link_libraries(gui-static PRIVATE SDL2::SDL2main)
+    if(TARGET SDL3::SDL3main)
+        target_link_libraries(gui-static PRIVATE SDL3::SDL3main)
     endif()
-    target_link_libraries(gui-static PRIVATE SDL2::SDL2-static)
+    target_link_libraries(gui-static PRIVATE SDL3::SDL3-static)
 
     option(SDL_STATIC_PIC "SDL static library has been built with PIC")
     if(SDL_STATIC_PIC OR WIN32)
         add_library(sharedlib-static SHARED main_lib.c)
-        target_link_libraries(sharedlib-static PRIVATE SDL2::SDL2-static)
+        target_link_libraries(sharedlib-static PRIVATE SDL3::SDL3-static)
         generate_export_header(sharedlib-static EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
         target_compile_definitions(sharedlib-static PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-static_export.h\"")
         set_target_properties(sharedlib-static PROPERTIES C_VISIBILITY_PRESET "hidden")
     endif()
 
     add_executable(gui-static-vars WIN32 main_gui.c)
-    target_link_libraries(gui-static-vars PRIVATE ${SDL2MAIN_LIBRARY} ${SDL2_STATIC_LIBRARIES})
-    target_include_directories(gui-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    target_link_libraries(gui-static-vars PRIVATE ${SDL3MAIN_LIBRARY} ${SDL3_STATIC_LIBRARIES})
+    target_include_directories(gui-static-vars PRIVATE ${SDL3_INCLUDE_DIRS})
 
     add_executable(cli-static main_cli.c)
-    target_link_libraries(cli-static PRIVATE SDL2::SDL2-static)
+    target_link_libraries(cli-static PRIVATE SDL3::SDL3-static)
 
-    # SDL2_LIBRARIES does not support creating a cli SDL2 application (when SDL2::SDL2main is available)
-    # (it is possible that SDL2main is a stub, but we don't know for sure)
-    if(NOT TARGET SDL2::SDL2main)
+    # SDL3_LIBRARIES does not support creating a cli SDL3 application (when SDL3::SDL3main is available)
+    # (it is possible that SDL3main is a stub, but we don't know for sure)
+    if(NOT TARGET SDL3::SDL3main)
         add_executable(cli-static-vars main_cli.c)
-        target_link_libraries(cli-static-vars PRIVATE ${SDL2_STATIC_LIBRARIES})
-        target_include_directories(cli-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+        target_link_libraries(cli-static-vars PRIVATE ${SDL3_STATIC_LIBRARIES})
+        target_include_directories(cli-static-vars PRIVATE ${SDL3_INCLUDE_DIRS})
     endif()
 endif()
 
-message(STATUS "SDL2_PREFIX:            ${SDL2_PREFIX}")
-message(STATUS "SDL2_INCLUDE_DIR:       ${SDL2_INCLUDE_DIR}")
-message(STATUS "SDL2_INCLUDE_DIRS:      ${SDL2_INCLUDE_DIRS}")
-message(STATUS "SDL2_LIBRARIES:         ${SDL2_LIBRARIES}")
-message(STATUS "SDL2_STATIC_LIBRARIES:  ${SDL2_STATIC_LIBRARIES}")
-message(STATUS "SDL2MAIN_LIBRARY:       ${SDL2MAIN_LIBRARY}")
-message(STATUS "SDL2TEST_LIBRARY:       ${SDL2TEST_LIBRARY}")
+message(STATUS "SDL3_PREFIX:            ${SDL3_PREFIX}")
+message(STATUS "SDL3_INCLUDE_DIR:       ${SDL3_INCLUDE_DIR}")
+message(STATUS "SDL3_INCLUDE_DIRS:      ${SDL3_INCLUDE_DIRS}")
+message(STATUS "SDL3_LIBRARIES:         ${SDL3_LIBRARIES}")
+message(STATUS "SDL3_STATIC_LIBRARIES:  ${SDL3_STATIC_LIBRARIES}")
+message(STATUS "SDL3MAIN_LIBRARY:       ${SDL3MAIN_LIBRARY}")
+message(STATUS "SDL3TEST_LIBRARY:       ${SDL3TEST_LIBRARY}")
 
 feature_summary(WHAT ALL)

+ 3 - 3
cmake/test/jni/Android.mk

@@ -4,8 +4,8 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := main_gui_androidmk
 LOCAL_SRC_FILES := ../main_gui.c
-LOCAL_SHARED_LIBRARIES += SDL2
+LOCAL_SHARED_LIBRARIES += SDL3
 include $(BUILD_SHARED_LIBRARY)
 
-$(call import-module,SDL2main)
-$(call import-module,SDL2)
+$(call import-module,SDL3main)
+$(call import-module,SDL3)

+ 1 - 1
cmake/test/main_cli.c

@@ -5,7 +5,7 @@
 int main(int argc, char *argv[]) {
     SDL_SetMainReady();
     if (SDL_Init(0) < 0) {
-        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
         return 1;
     }
     SDL_Delay(100);

+ 2 - 2
cmake/test/main_gui.c

@@ -5,11 +5,11 @@ int main(int argc, char *argv[]) {
     SDL_Window *window = NULL;
     SDL_Surface *screenSurface = NULL;
     if (SDL_Init(SDL_INIT_VIDEO) < 0) {
-        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
         return 1;
     }
     window = SDL_CreateWindow(
-            "hello_sdl2",
+            "Hello SDL",
             SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
             640, 480,
             SDL_WINDOW_SHOWN

+ 1 - 1
cmake/test/main_lib.c

@@ -17,7 +17,7 @@ int MYLIBRARY_EXPORT mylibrary_work(void);
 int mylibrary_init(void) {
     SDL_SetMainReady();
     if (SDL_Init(0) < 0) {
-        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
         return 1;
     }
     return 0;

+ 3 - 3
cmake/test/test_pkgconfig.sh

@@ -25,9 +25,9 @@ set -e
 
 # Get the canonical path of the folder containing this script
 testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
-CFLAGS="$( pkg-config sdl2 --cflags )"
-LDFLAGS="$( pkg-config sdl2 --libs )"
-STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
+CFLAGS="$( pkg-config sdl3 --cflags )"
+LDFLAGS="$( pkg-config sdl3 --libs )"
+STATIC_LDFLAGS="$( pkg-config sdl3 --libs --static )"
 
 compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_CFLAGS"
 link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů