Prechádzať zdrojové kódy

First pass at changing SDL 2.0 to SDL 3.0

Sam Lantinga 2 rokov pred
rodič
commit
2c4159b99a
100 zmenil súbory, kde vykonal 1160 pridanie a 1163 odobranie
  1. 1 1
      .editorconfig
  2. 5 5
      Android.mk
  3. 377 377
      CMakeLists.txt
  4. 30 30
      Makefile.in
  5. 2 2
      Makefile.minimal
  6. 8 8
      Makefile.os2
  7. 1 1
      Makefile.pandora
  8. 9 9
      Makefile.w32
  9. 1 1
      README.md
  10. 0 65
      SDL2Config.cmake.in
  11. 3 3
      SDL3.spec.in
  12. 65 0
      SDL3Config.cmake.in
  13. 3 3
      VisualC-GDK/SDL.sln
  14. 1 1
      VisualC-GDK/SDL/SDL.vcxproj
  15. 2 2
      VisualC-GDK/SDLmain/SDLmain.vcxproj
  16. 2 2
      VisualC-GDK/SDLtest/SDLtest.vcxproj
  17. 1 1
      VisualC-WinRT/SDL-UWP.sln
  18. 10 10
      VisualC-WinRT/SDL-UWP.vcxproj
  19. 3 3
      VisualC/SDL.sln
  20. 1 1
      VisualC/SDL/SDL.vcxproj
  21. 1 1
      VisualC/SDLmain/SDLmain.vcxproj
  22. 1 1
      VisualC/SDLtest/SDLtest.vcxproj
  23. 0 111
      VisualC/pkg-support/cmake/sdl2-config.cmake
  24. 3 3
      VisualC/pkg-support/cmake/sdl3-config-version.cmake
  25. 111 0
      VisualC/pkg-support/cmake/sdl3-config.cmake
  26. 49 49
      Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
  27. 1 1
      Xcode-iOS/Demos/README
  28. 1 1
      Xcode-iOS/Demos/config.xcconfig
  29. 2 2
      Xcode/SDL/Info-Framework.plist
  30. 63 63
      Xcode/SDL/SDL.xcodeproj/project.pbxproj
  31. 2 2
      Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/Framework-iOS.xcscheme
  32. 2 2
      Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/xcFramework-iOS.xcscheme
  33. 0 0
      Xcode/SDL/SDL3/Info.plist
  34. 1 1
      Xcode/SDL/pkg-support/SDL.info
  35. 0 69
      Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
  36. 3 3
      Xcode/SDL/pkg-support/resources/CMake/sdl3-config-version.cmake
  37. 69 0
      Xcode/SDL/pkg-support/resources/CMake/sdl3-config.cmake
  38. 5 5
      Xcode/SDL/pkg-support/resources/ReadMe.txt
  39. BIN
      Xcode/SDL/pkg-support/resources/SDL_DS_Store
  40. 33 33
      Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
  41. 3 3
      Xcode/SDLTest/config.xcconfig
  42. 1 1
      android-project-ant/jni/src/Android.mk
  43. 1 1
      android-project-ant/jni/src/Android_static.mk
  44. 1 1
      android-project/app/jni/src/Android.mk
  45. 2 2
      android-project/app/jni/src/CMakeLists.txt
  46. 9 9
      android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  47. 2 2
      build-scripts/android-prefab.sh
  48. 1 1
      build-scripts/androidbuildlibs.sh
  49. 3 3
      build-scripts/emscripten-buildbot.sh
  50. 4 4
      build-scripts/nacl-buildbot.sh
  51. 6 6
      build-scripts/naclbuild.sh
  52. 7 7
      build-scripts/raspberrypi-buildbot.sh
  53. 3 3
      build-scripts/windows-buildbot-zipper.bat
  54. 1 1
      cmake/macros.cmake
  55. 29 29
      cmake/sdlchecks.cmake
  56. 42 42
      cmake/test/CMakeLists.txt
  57. 3 3
      cmake/test/jni/Android.mk
  58. 1 1
      cmake/test/main_cli.c
  59. 2 2
      cmake/test/main_gui.c
  60. 1 1
      cmake/test/main_lib.c
  61. 3 3
      cmake/test/test_pkgconfig.sh
  62. 3 3
      cmake/test/test_sdlconfig.sh
  63. 32 32
      configure
  64. 22 22
      configure.ac
  65. 4 4
      docs/README-android.md
  66. 15 15
      docs/README-cmake.md
  67. 12 12
      docs/README-dynapi.md
  68. 2 2
      docs/README-emscripten.md
  69. 10 10
      docs/README-gdk.md
  70. 4 4
      docs/README-ios.md
  71. 1 1
      docs/README-kmsbsd.md
  72. 1 1
      docs/README-n3ds.md
  73. 2 2
      docs/README-ngage.md
  74. 5 8
      docs/README-os2.md
  75. 3 3
      docs/README-ps2.md
  76. 3 3
      docs/README-psp.md
  77. 2 2
      docs/README-raspberrypi.md
  78. 3 3
      docs/README-riscos.md
  79. 8 8
      docs/README-visualc.md
  80. 3 3
      docs/README-winrt.md
  81. 4 4
      docs/doxyfile
  82. 1 1
      include/SDL.h
  83. 1 1
      include/SDL_audio.h
  84. 1 1
      include/SDL_hints.h
  85. 1 1
      include/SDL_main.h
  86. 1 1
      include/SDL_test.h
  87. 1 1
      include/SDL_test_assert.h
  88. 1 1
      include/SDL_test_common.h
  89. 1 1
      include/SDL_test_compare.h
  90. 1 1
      include/SDL_test_crc32.h
  91. 1 1
      include/SDL_test_font.h
  92. 1 1
      include/SDL_test_fuzzer.h
  93. 1 1
      include/SDL_test_harness.h
  94. 1 1
      include/SDL_test_images.h
  95. 1 1
      include/SDL_test_log.h
  96. 1 1
      include/SDL_test_md5.h
  97. 1 1
      include/SDL_test_memory.h
  98. 1 1
      include/SDL_test_random.h
  99. 4 4
      include/SDL_thread.h
  100. 3 3
      include/SDL_version.h

+ 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
 

+ 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)
 

+ 377 - 377
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
@@ -71,10 +71,10 @@ include(GNUInstallDirs)
 
 find_package(PkgConfig)
 
-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)
+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
@@ -84,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 26)
+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}")
 
@@ -98,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")
 
@@ -114,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.
@@ -146,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()
@@ -325,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,
@@ -358,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
@@ -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)
@@ -519,7 +519,7 @@ 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)
@@ -562,28 +562,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)
@@ -924,7 +924,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()
@@ -952,7 +952,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()
@@ -1141,14 +1141,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)
@@ -1161,7 +1161,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()
@@ -1175,7 +1175,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()
@@ -1183,14 +1183,14 @@ 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)
+    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)
@@ -1199,12 +1199,12 @@ 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()
@@ -1217,39 +1217,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()
@@ -1258,42 +1258,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)
 
@@ -1340,42 +1340,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)
 
@@ -1385,7 +1385,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)
 
@@ -1408,17 +1408,17 @@ 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)
+        file(GLOB SUN_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/sun/*.c)
         list(APPEND SOURCE_FILES ${SUN_AUDIO_SOURCES})
         set(HAVE_SDL_AUDIO TRUE)
     elseif(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)
+        file(GLOB AIX_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/paudio/*.c)
         list(APPEND SOURCE_FILES ${AIX_AUDIO_SOURCES})
         set(HAVE_SDL_AUDIO TRUE)
     endif()
@@ -1455,7 +1455,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("
@@ -1493,7 +1493,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()
@@ -1561,38 +1561,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()
@@ -1607,7 +1607,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
     endif()
     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()
@@ -1634,7 +1634,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()
@@ -1642,28 +1642,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()
@@ -1693,11 +1693,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()
 
@@ -1711,9 +1711,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)
@@ -1793,14 +1793,14 @@ elseif(WINDOWS)
   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)
+      file(GLOB WINMM_AUDIO_SOURCES ${SDL3_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()
@@ -1808,9 +1808,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)
@@ -1825,13 +1825,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})
 
@@ -1854,38 +1854,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)
@@ -1894,9 +1894,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)
@@ -1918,19 +1918,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)
@@ -1959,7 +1959,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)
@@ -1982,7 +1982,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()
@@ -1990,7 +1990,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})
@@ -1998,13 +1998,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()
 
@@ -2024,20 +2024,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)
@@ -2045,7 +2045,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)
@@ -2058,9 +2058,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)
@@ -2068,7 +2068,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>
@@ -2104,10 +2104,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)
@@ -2118,10 +2118,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()
@@ -2130,21 +2130,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()
@@ -2153,7 +2153,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()
@@ -2167,7 +2167,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()
@@ -2215,7 +2215,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)
@@ -2299,27 +2299,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)
 
@@ -2335,32 +2335,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()
@@ -2368,28 +2368,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)
 
@@ -2410,70 +2410,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)
 
@@ -2564,65 +2564,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)
@@ -2640,50 +2640,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)
@@ -2699,57 +2699,57 @@ elseif(PS2)
 elseif(OS2)
   list(APPEND EXTRA_CFLAGS "-DOS2EMX_PLAIN_CHAR")
 
-  file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/os2/*.c)
+  file(GLOB CORE_SOURCES ${SDL3_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)
+    file(GLOB CORE_SOURCES ${SDL3_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)
+    file(GLOB OS2_THREAD_SOURCES ${SDL3_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)
+    file(GLOB OS2_TIMER_SOURCES ${SDL3_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)
+    file(GLOB OS2_LOADSO_SOURCES ${SDL3_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)
+    file(GLOB FILESYSTEM_SOURCES ${SDL3_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)
+    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_VIDEO)
     set(SDL_VIDEO_DRIVER_OS2 1)
-    file(GLOB OS2_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/os2/*.c)
+    file(GLOB OS2_VIDEO_SOURCES ${SDL3_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)
+    file(GLOB OS2_AUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/os2/*.c)
     list(APPEND SOURCE_FILES ${OS2_AUDIO_SOURCES})
     set(HAVE_SDL_AUDIO TRUE)
     list(APPEND EXTRA_LIBS mmpm2)
@@ -2757,7 +2757,7 @@ elseif(OS2)
 
   if(SDL_JOYSTICK)
     set(SDL_JOYSTICK_OS2 1)
-    file(GLOB OS2_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/os2/*.c)
+    file(GLOB OS2_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/os2/*.c)
     list(APPEND SOURCE_FILES ${OS2_JOYSTICK_SOURCES})
     set(HAVE_SDL_JOYSTICK TRUE)
   endif()
@@ -2767,74 +2767,74 @@ elseif(OS2)
   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()
@@ -2861,47 +2861,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()
 
@@ -2910,7 +2910,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")
@@ -2918,12 +2918,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
@@ -2935,15 +2935,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)
@@ -2992,32 +2992,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})
@@ -3055,24 +3055,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})
@@ -3162,7 +3162,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}")
@@ -3229,27 +3229,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()
 
@@ -3275,98 +3275,98 @@ 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
+      set_target_properties(SDL3 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}")
@@ -3376,45 +3376,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}")
@@ -3423,85 +3423,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)
@@ -3513,32 +3513,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)
+      get_target_property(SONAME SDL3 OUTPUT_NAME)
       if(NOT ANDROID AND NOT MINGW AND NOT OS2)
           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"
@@ -3561,7 +3561,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 \

+ 8 - 8
Makefile.os2

@@ -1,4 +1,4 @@
-# Open Watcom makefile to build SDL2.dll for OS/2
+# Open Watcom makefile to build SDL3.dll for OS/2
 # wmake -f Makefile.os2
 #
 # If you have GNU libiconv installed (iconv2.dll), you
@@ -12,9 +12,9 @@
 #
 # To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
 
-LIBNAME = SDL2
-MAJOR_VERSION = 2
-MINOR_VERSION = 26
+LIBNAME = SDL3
+MAJOR_VERSION = 3
+MINOR_VERSION = 0
 MICRO_VERSION = 0
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
 DESCRIPTION = Simple DirectMedia Layer 2
@@ -30,8 +30,8 @@ LNKFILE = $(LIBNAME).lnk
 INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
 INCPATH+= -Iinclude
 
-LIBM = SDL2libm.lib
-TLIB = SDL2test.lib
+LIBM = SDL3libm.lib
+TLIB = SDL3test.lib
 LIBS = mmpm2.lib $(LIBM)
 CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
 # Debug options:
@@ -162,7 +162,7 @@ $(LIBICONV_LIB):  "src/core/os2/iconv2.lbc"
     @echo * Creating: $@
     wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
 
-# SDL2libm
+# SDL3libm
 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
@@ -216,7 +216,7 @@ $(LIBM): build_libm $(MOBJS)
     @echo * Creating: $@
     wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
 
-# SDL2test
+# SDL3test
 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 &

+ 1 - 1
Makefile.pandora

@@ -10,7 +10,7 @@ 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
+TARGET  = libSDL3.a
 
 SOURCES = 
 	./src/*.c \

+ 9 - 9
Makefile.w32

@@ -1,11 +1,11 @@
-# Open Watcom makefile to build SDL2.dll for Win32
+# Open Watcom makefile to build SDL3.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 = 26
+LIBNAME = SDL3
+MAJOR_VERSION = 3
+MINOR_VERSION = 0
 MICRO_VERSION = 0
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
 
@@ -19,8 +19,8 @@ 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
+LIBM = SDL3libm.lib
+TLIB = SDL3test.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)
@@ -147,7 +147,7 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
 SDL_malloc.obj: SDL_malloc.c
     wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
 
-# SDL2libm
+# SDL3libm
 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
@@ -201,7 +201,7 @@ $(LIBM): build_libm $(MOBJS)
     @echo * Creating: $@
     wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
 
-# SDL2test
+# SDL3test
 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 &
@@ -257,7 +257,7 @@ $(LNKFILE): Makefile.w32
     @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 $@ EXPORT=src/dynapi/SDL3.exports
     @%append $@ OPTION QUIET
     @%append $@ OPTION IMPF=$(EXPFILE)
     @%append $@ OPTION MAP=$(LIBHOME)/$^&.map

+ 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

+ 1 - 1
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>

+ 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>

+ 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>

+ 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

+ 1 - 1
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>

+ 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)

+ 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:
 

+ 1 - 1
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=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/SDL/Info-Framework.plist

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

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

@@ -3704,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; };
@@ -3723,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>"; };
@@ -4098,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>"; };
@@ -4386,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>";
@@ -4408,7 +4408,7 @@
 				F59C70FC00D5CB5801000001 /* pkg-support */,
 				0153844A006D81B07F000001 /* Public Headers */,
 				08FB77ACFE841707C02AAC07 /* Library Source */,
-				E2D187D028A5673500D2B4F1 /* SDL2 */,
+				E2D187D028A5673500D2B4F1 /* SDL3 */,
 				034768DDFF38A45A11DB9C8B /* Products */,
 				BECDF66B0761BA81005FE872 /* Info-Framework.plist */,
 				564624341FF821B70074AC87 /* Frameworks */,
@@ -5344,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 */ = {
@@ -7299,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 */ = {
@@ -7319,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 */ = {
@@ -7345,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 */ = {
@@ -7367,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 */ = {
@@ -7389,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 */ = {
@@ -7409,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 */ = {
@@ -7431,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 */ = {
@@ -7451,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 */ = {
@@ -7468,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 */ = {
@@ -7482,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 */ = {
@@ -7506,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 */
@@ -7645,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;
@@ -7662,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;
@@ -7680,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;
@@ -7698,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;
@@ -7716,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 */
 
@@ -9528,8 +9528,8 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEPLOYMENT_POSTPROCESSING = YES;
-				DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
-				DYLIB_CURRENT_VERSION = 2601.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;
@@ -9559,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;
 			};
@@ -9570,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;
@@ -9613,8 +9613,8 @@
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				DEBUG_INFORMATION_FORMAT = dwarf;
-				DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
-				DYLIB_CURRENT_VERSION = 2601.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;
@@ -9645,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;
 			};
@@ -9656,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;
@@ -9862,8 +9862,8 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = "";
-				DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
-				DYLIB_CURRENT_VERSION = 2601.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;
@@ -9873,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 = (
@@ -9885,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;
@@ -9914,14 +9914,14 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = "";
-				DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
-				DYLIB_CURRENT_VERSION = 2601.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 = (
@@ -9933,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};${SDL2_FRAMEWORK_PATH}")
-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_DIRS}"
-            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
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

+ 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 = 26;
+    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
 

+ 4 - 4
build-scripts/nacl-buildbot.sh

@@ -1,6 +1,6 @@
 #!/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
 #  amd64 Linux to NaCl.
 
 # PLEASE NOTE that we have reports that SDL built with pepper_49 (current
@@ -44,13 +44,13 @@ 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
+../configure --host=pnacl --prefix=$PWD/nacl-sdl3-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
+perl -w -pi -e "s#$PWD/nacl-sdl3-installed#/usr/local#g;" ./nacl-sdl3-installed/lib/libSDL3.la ./nacl-sdl3-installed/lib/pkgconfig/sdl3.pc ./nacl-sdl3-installed/bin/sdl3-config
 mkdir -p ./usr
-mv ./nacl-sdl2-installed ./usr/local
+mv ./nacl-sdl3-installed ./usr/local
 
 popd
 tar -cJvvf $TARBALL -C $BUILDBOTDIR usr

+ 6 - 6
build-scripts/naclbuild.sh

@@ -39,7 +39,7 @@ CURDIR=`pwd -P`
 SDLPATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
 BUILDPATH="$SDLPATH/build/nacl"
 TESTBUILDPATH="$BUILDPATH/test"
-SDL2_STATIC="$BUILDPATH/build/.libs/libSDL2.a"
+SDL3_STATIC="$BUILDPATH/build/.libs/libSDL3.a"
 mkdir -p $BUILDPATH
 mkdir -p $TESTBUILDPATH
 
@@ -73,8 +73,8 @@ $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"
+if [ ! -f "$SDL3_STATIC" ]; then
+    echo "Build failed! $SDL3_STATIC"
     exit 1
 fi
 
@@ -83,7 +83,7 @@ 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
+cp -f $SDL3_STATIC $TESTBUILDPATH
 
 # Copy user sources
 _SOURCES=($SOURCES)
@@ -94,8 +94,8 @@ 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"
+make -j$NCPUS CONFIG="Release" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL3 -I$SDLPATH/include"
+make -j$NCPUS CONFIG="Debug" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL3 -I$SDLPATH/include"
 
 echo
 echo "Run the test with: "

+ 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
 

+ 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)

+ 29 - 29
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})
@@ -175,7 +175,7 @@ macro(CheckJACK)
     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)
+      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})
@@ -204,7 +204,7 @@ macro(CheckESD)
     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)
+      file(GLOB ESD_SOURCES ${SDL3_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})
@@ -237,7 +237,7 @@ macro(CheckARTS)
       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)
+      file(GLOB ARTS_SOURCES ${SDL3_SOURCE_DIR}/src/audio/arts/*.c)
       list(APPEND SOURCE_FILES ${ARTS_SOURCES})
       set(SDL_AUDIO_DRIVER_ARTS 1)
       set(HAVE_ARTS TRUE)
@@ -269,7 +269,7 @@ macro(CheckNAS)
     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)
+      file(GLOB NAS_SOURCES ${SDL3_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)
@@ -297,7 +297,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})
@@ -326,7 +326,7 @@ macro(CheckFusionSound)
     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)
+      file(GLOB FUSIONSOUND_SOURCES ${SDL3_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})
@@ -442,7 +442,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 +662,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 +731,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)
@@ -749,7 +749,7 @@ macro(CheckDirectFB)
     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)
+      file(GLOB DIRECTFB_SOURCES ${SDL3_SOURCE_DIR}/src/video/directfb/*.c)
       list(APPEND SOURCE_FILES ${DIRECTFB_SOURCES})
       set(SDL_VIDEO_DRIVER_DIRECTFB 1)
       set(SDL_VIDEO_RENDER_DIRECTFB 1)
@@ -786,7 +786,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 +1000,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 +1147,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})
@@ -1191,10 +1191,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 +1203,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 +1244,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 +1269,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"

+ 3 - 3
cmake/test/test_sdlconfig.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="$( sdl2-config --cflags )"
-LDFLAGS="$( sdl2-config --libs )"
-STATIC_LDFLAGS="$( sdl2-config --static-libs )"
+CFLAGS="$( sdl3-config --cflags )"
+LDFLAGS="$( sdl3-config --libs )"
+STATIC_LDFLAGS="$( sdl3-config --static-libs )"
 
 compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS"
 link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"

+ 32 - 32
configure

@@ -684,7 +684,7 @@ SDL_CFLAGS
 bin_prefix_relpath
 cmake_prefix_relpath
 SDL_VENDOR_INFO
-INSTALL_SDL2_CONFIG
+INSTALL_SDL3_CONFIG
 LIBUSB_LIBS
 LIBUSB_CFLAGS
 IBUS_LIBS
@@ -954,7 +954,7 @@ enable_backgrounding_signal
 enable_foregrounding_signal
 enable_joystick_virtual
 enable_render_d3d
-enable_sdl2_config
+enable_sdl3_config
 enable_vendor_info
 '
       ac_precious_vars='build_alias
@@ -1782,7 +1782,7 @@ Optional Features:
   --enable-joystick-virtual
                           enable virtual joystick APIs [default=yes]
   --enable-render-d3d     enable the Direct3D render driver [default=yes]
-  --enable-sdl2-config    Install sdl2-config [default=yes]
+  --enable-sdl3-config    Install sdl3-config [default=yes]
   --enable-vendor-info=STRING
                           Add vendor info to SDL_REVISION
 
@@ -3452,8 +3452,8 @@ ac_config_headers="$ac_config_headers include/SDL_config.h"
 orig_CFLAGS="$CFLAGS"
 
 # See docs/release_checklist.md
-SDL_MAJOR_VERSION=2
-SDL_MINOR_VERSION=26
+SDL_MAJOR_VERSION=3
+SDL_MINOR_VERSION=0
 SDL_MICRO_VERSION=0
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
@@ -13073,9 +13073,9 @@ CFLAGS=$lt_save_CFLAGS
 
 
 # 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, stop using -release, which will simplify it to libSDL3.so.0
-LT_RELEASE=2.0
+LT_RELEASE=3.0
 # 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
 # reset to 0 anyway.
@@ -18276,7 +18276,7 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
 #    fi
 #done
 SDL_CFLAGS="$BASE_CFLAGS"
-SDL_LIBS="-lSDL2"
+SDL_LIBS="-lSDL3"
 if test "x$BASE_LDFLAGS" != x; then
     SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
 fi
@@ -28848,7 +28848,7 @@ printf "%s\n" "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
-        SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
+        SDL_LIBS="-lSDL3main $SDL_LIBS -mwindows"
 
         # Check to see if this is a mingw or cygwin build
         have_mingw32=
@@ -29464,29 +29464,29 @@ esac
 
 CheckVirtualJoystick
 
-# Check whether to install sdl2-config
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install sdl2-config" >&5
-printf %s "checking whether to install sdl2-config... " >&6; }
-# Check whether --enable-sdl2-config was given.
-if test ${enable_sdl2_config+y}
+# Check whether to install sdl3-config
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install sdl3-config" >&5
+printf %s "checking whether to install sdl3-config... " >&6; }
+# Check whether --enable-sdl3-config was given.
+if test ${enable_sdl3_config+y}
 then :
-  enableval=$enable_sdl2_config; case "${enableval}" in
-        yes) enable_sdl2_config="TRUE" ;;
-        no) enable_sdl2_config="FALSE" ;;
-        *) as_fn_error $? "bad value '${enableval}' for --enable-sdl2-config" "$LINENO" 5 ;;
+  enableval=$enable_sdl3_config; case "${enableval}" in
+        yes) enable_sdl3_config="TRUE" ;;
+        no) enable_sdl3_config="FALSE" ;;
+        *) as_fn_error $? "bad value '${enableval}' for --enable-sdl3-config" "$LINENO" 5 ;;
     esac
 else $as_nop
-  enable_sdl2_config="TRUE"
+  enable_sdl3_config="TRUE"
 fi
 
-if test "$enable_sdl2_config" = "TRUE"; then
+if test "$enable_sdl3_config" = "TRUE"; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
 fi
-INSTALL_SDL2_CONFIG=$enable_sdl2_config
+INSTALL_SDL3_CONFIG=$enable_sdl3_config
 
 
 # Check whether --enable-vendor-info was given.
@@ -29700,7 +29700,7 @@ fi
 
 SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
 
-pkg_cmakedir='$libdir/cmake/SDL2'
+pkg_cmakedir='$libdir/cmake/SDL3'
 for _lcl_i in pkg_cmakedir:prefix:cmake_prefix_relpath bindir:prefix:bin_prefix_relpath; do
   _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
   _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
@@ -29852,12 +29852,12 @@ $SDLTEST_DEPENDS
 $WAYLAND_PROTOCOLS_DEPENDS
 __EOF__
 
-ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc"
+ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl3-config sdl3-config.cmake sdl3-config-version.cmake SDL3.spec sdl3.pc"
 
-ac_config_commands="$ac_config_commands sdl2_config"
+ac_config_commands="$ac_config_commands sdl3_config"
 
 
-SUMMARY="SDL2 Configure Summary:\n"
+SUMMARY="SDL3 Configure Summary:\n"
 if test x$enable_shared = xyes; then
     SUMMARY="${SUMMARY}Building Shared Libraries\n"
 fi
@@ -31093,12 +31093,12 @@ do
     "include/SDL_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config.h" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;;
-    "sdl2-config") CONFIG_FILES="$CONFIG_FILES sdl2-config" ;;
-    "sdl2-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config.cmake" ;;
-    "sdl2-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config-version.cmake" ;;
-    "SDL2.spec") CONFIG_FILES="$CONFIG_FILES SDL2.spec" ;;
-    "sdl2.pc") CONFIG_FILES="$CONFIG_FILES sdl2.pc" ;;
-    "sdl2_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl2_config" ;;
+    "sdl3-config") CONFIG_FILES="$CONFIG_FILES sdl3-config" ;;
+    "sdl3-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl3-config.cmake" ;;
+    "sdl3-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl3-config-version.cmake" ;;
+    "SDL3.spec") CONFIG_FILES="$CONFIG_FILES SDL3.spec" ;;
+    "sdl3.pc") CONFIG_FILES="$CONFIG_FILES sdl3.pc" ;;
+    "sdl3_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl3_config" ;;
     "summary") CONFIG_COMMANDS="$CONFIG_COMMANDS summary" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -32522,7 +32522,7 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 _LT_EOF
 
  ;;
-    "sdl2_config":C) chmod a+x sdl2-config ;;
+    "sdl3_config":C) chmod a+x sdl3-config ;;
     "summary":C) printf "$SUMMARY" ;;
 
   esac

+ 22 - 22
configure.ac

@@ -11,18 +11,18 @@ orig_CFLAGS="$CFLAGS"
 
 dnl Set various version strings - taken gratefully from the GTk sources
 # See docs/release_checklist.md
-SDL_MAJOR_VERSION=2
-SDL_MINOR_VERSION=26
+SDL_MAJOR_VERSION=3
+SDL_MINOR_VERSION=0
 SDL_MICRO_VERSION=0
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
 SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
 AS_CASE(["$SDL_MINOR_VERSION"],
   [*@<:@02468@:>@],
-    dnl Stable branch, 2.24.1 -> libSDL2-2.0.so.0.2400.1
+    dnl Stable branch, 3.24.1 -> libSDL3-3.0.so.0.2400.1
     [SDL_INTERFACE_AGE="$SDL_MICRO_VERSION"],
   [*],
-    dnl Development branch, 2.23.1 -> libSDL2-2.0.so.0.2301.0
+    dnl Development branch, 3.23.1 -> libSDL3-3.0.so.0.2301.0
     [SDL_INTERFACE_AGE=0])
 
 AC_SUBST(SDL_MAJOR_VERSION)
@@ -37,9 +37,9 @@ LT_INIT([win32-dll])
 LT_LANG([Windows Resource])
 
 # 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, stop using -release, which will simplify it to libSDL3.so.0
-LT_RELEASE=2.0
+LT_RELEASE=3.0
 # 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
 # reset to 0 anyway.
@@ -162,7 +162,7 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
 #    fi
 #done
 SDL_CFLAGS="$BASE_CFLAGS"
-SDL_LIBS="-lSDL2"
+SDL_LIBS="-lSDL3"
 if test "x$BASE_LDFLAGS" != x; then
     SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
 fi
@@ -4168,7 +4168,7 @@ case "$host" in
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
-        SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
+        SDL_LIBS="-lSDL3main $SDL_LIBS -mwindows"
 
         # Check to see if this is a mingw or cygwin build
         have_mingw32=
@@ -4670,21 +4670,21 @@ esac
 dnl Permit use of virtual joystick APIs on any platform (subject to configure options)
 CheckVirtualJoystick
 
-# Check whether to install sdl2-config
-AC_MSG_CHECKING(whether to install sdl2-config)
-AC_ARG_ENABLE([sdl2-config],
-    [AS_HELP_STRING([--enable-sdl2-config],[Install sdl2-config [default=yes]])],
+# Check whether to install sdl3-config
+AC_MSG_CHECKING(whether to install sdl3-config)
+AC_ARG_ENABLE([sdl3-config],
+    [AS_HELP_STRING([--enable-sdl3-config],[Install sdl3-config [default=yes]])],
     [case "${enableval}" in
-        yes) enable_sdl2_config="TRUE" ;;
-        no) enable_sdl2_config="FALSE" ;;
-        *) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl2-config]) ;;
-    esac], [enable_sdl2_config="TRUE"])
-if test "$enable_sdl2_config" = "TRUE"; then
+        yes) enable_sdl3_config="TRUE" ;;
+        no) enable_sdl3_config="FALSE" ;;
+        *) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl3-config]) ;;
+    esac], [enable_sdl3_config="TRUE"])
+if test "$enable_sdl3_config" = "TRUE"; then
     AC_MSG_RESULT(yes)
 else
     AC_MSG_RESULT(no)
 fi
-AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
+AC_SUBST([INSTALL_SDL3_CONFIG], [$enable_sdl3_config])
 
 AC_ARG_ENABLE([vendor-info],
     [AS_HELP_STRING([--enable-vendor-info=STRING], [Add vendor info to SDL_REVISION])],
@@ -4850,7 +4850,7 @@ SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
 
 dnl Calculate the location of the prefix, relative to the cmake folder
 dnl Calculate the location of the prefix, relative to bindir
-pkg_cmakedir='$libdir/cmake/SDL2'
+pkg_cmakedir='$libdir/cmake/SDL3'
 AX_COMPUTE_RELATIVE_PATHS([pkg_cmakedir:prefix:cmake_prefix_relpath bindir:prefix:bin_prefix_relpath])
 AC_SUBST([cmake_prefix_relpath])
 AC_SUBST([bin_prefix_relpath])
@@ -4914,11 +4914,11 @@ $WAYLAND_PROTOCOLS_DEPENDS
 __EOF__
 
 AC_CONFIG_FILES([
-    Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
+    Makefile:Makefile.in:Makefile.rules sdl3-config sdl3-config.cmake sdl3-config-version.cmake SDL3.spec sdl3.pc
 ])
-AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
+AC_CONFIG_COMMANDS([sdl3_config],[chmod a+x sdl3-config])
 
-SUMMARY="SDL2 Configure Summary:\n"
+SUMMARY="SDL3 Configure Summary:\n"
 if test x$enable_shared = xyes; then
     SUMMARY="${SUMMARY}Building Shared Libraries\n"
 fi

+ 4 - 4
docs/README-android.md

@@ -86,8 +86,8 @@ If you already have a project that uses CMake, the instructions change somewhat:
 2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
    and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
 3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
-   adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
-   as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
+   adding the "src" subdirectory). Note that you'll have SDL3, SDL3main and SDL3-static
+   as targets in your project, so you should have "target_link_libraries(yourgame SDL3 SDL3main)"
    in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
    add_executable() for the target containing your "main" function.
 
@@ -414,10 +414,10 @@ Graphics debugging
 ================================================================================
 
 If you are developing on a compatible Tegra-based tablet, NVidia provides
-Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
+Tegra Graphics Debugger at their website. Because SDL3 dynamically loads EGL
 and GLES libraries, you must follow their instructions for installing the
 interposer library on a rooted device. The non-rooted instructions are not
-compatible with applications that use SDL2 for video.
+compatible with applications that use SDL3 for video.
 
 The Tegra Graphics Debugger is available from NVidia here:
 https://developer.nvidia.com/tegra-graphics-debugger

+ 15 - 15
docs/README-cmake.md

@@ -57,24 +57,24 @@ option(MYGAME_VENDORED "Use vendored libraries" OFF)
 if(MYGAME_VENDORED)
     add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
 else()
-    # 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
-    find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
+    # 1. Look for a SDL3 package, 2. look for the SDL3 component and 3. fail if none can be found
+    find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
     
-    # 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available 
-    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+    # 1. Look for a SDL3 package, 2. Look for the SDL3maincomponent and 3. DO NOT fail when SDL3main is not available 
+    find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
 endif()
 
 # Create your game executable target as usual 
 add_executable(mygame WIN32 mygame.c)
 
-# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications  
-if(TARGET SDL2::SDL2main)
-    # It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
-    target_link_libraries(mygame PRIVATE SDL2::SDL2main)
+# SDL3::SDL3main may or may not be available. It is e.g. required by Windows GUI applications  
+if(TARGET SDL3::SDL3main)
+    # It has an implicit dependency on SDL3 functions, so it MUST be added before SDL3::SDL3 (or SDL3::SDL3-static)
+    target_link_libraries(mygame PRIVATE SDL3::SDL3main)
 endif()
 
-# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
-target_link_libraries(mygame PRIVATE SDL2::SDL2)
+# Link to the actual SDL3 library. SDL3::SDL3 is the shared SDL library, SDL3::SDL3-static is the static SDL libarary.
+target_link_libraries(mygame PRIVATE SDL3::SDL3)
 ```
 
 ### A system SDL library
@@ -85,10 +85,10 @@ The following components are available, to be used as an argument of `find_packa
 
 | Component name | Description                                                                                |
 |----------------|--------------------------------------------------------------------------------------------|
-| SDL2           | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
-| SDL2-static    | The SDL2 static library, available through the `SDL2::SDL2-static` target                  |
-| SDL2main       | The SDL2main static library, available through the `SDL2::SDL2main` target                 |
-| SDL2test       | The SDL2test static library, available through the `SDL2::SDL2test` target                 |
+| SDL3           | The SDL3 shared library, available through the `SDL3::SDL3` target [^SDL_TARGET_EXCEPTION] |
+| SDL3-static    | The SDL3 static library, available through the `SDL3::SDL3-static` target                  |
+| SDL3main       | The SDL3main static library, available through the `SDL3::SDL3main` target                 |
+| SDL3test       | The SDL3test static library, available through the `SDL3::SDL3test` target                 |
 
 ### Using a vendored SDL
 
@@ -160,4 +160,4 @@ To use, set the following CMake variables when running CMake's configuration sta
     ```
 
 
-[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.
+[^SDL_TARGET_EXCEPTION]: `SDL3::SDL3` can be an ALIAS to a static `SDL3::SDL3-static` target for multiple reasons.

+ 12 - 12
docs/README-dynapi.md

@@ -4,22 +4,22 @@ Originally posted on Ryan's Google+ account.
 
 Background:
 
-- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, 
-  but developers are shipping their own SDL2 with individual Steam games. 
-  These games might stop getting updates, but a newer SDL2 might be needed later. 
+- The Steam Runtime has (at least in theory) a really kick-ass build of SDL, 
+  but developers are shipping their own SDL with individual Steam games. 
+  These games might stop getting updates, but a newer SDL might be needed later. 
   Certainly we'll always be fixing bugs in SDL, even if a new video target isn't 
   ever needed, and these fixes won't make it to a game shipping its own SDL.
-- Even if we replace the SDL2 in those games with a compatible one, that is to 
+- Even if we replace the SDL in those games with a compatible one, that is to 
   say, edit a developer's Steam depot (yuck!), there are developers that are 
-  statically linking SDL2 that we can't do this for. We can't even force the 
-  dynamic loader to ignore their SDL2 in this case, of course.
-- If you don't ship an SDL2 with the game in some form, people that disabled the
+  statically linking SDL that we can't do this for. We can't even force the 
+  dynamic loader to ignore their SDL in this case, of course.
+- If you don't ship an SDL with the game in some form, people that disabled the
   Steam Runtime, or just tried to run the game from the command line instead of 
   Steam might find themselves unable to run the game, due to a missing dependency.
 - If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target
-  generic Linux boxes that may or may not have SDL2 installed, you have to ship 
+  generic Linux boxes that may or may not have SDL installed, you have to ship 
   the library or risk a total failure to launch. So now, you might have to have 
-  a non-Steam build plus a Steam build (that is, one with and one without SDL2 
+  a non-Steam build plus a Steam build (that is, one with and one without SDL 
   included), which is inconvenient if you could have had one universal build 
   that works everywhere.
 - We like the zlib license, but the biggest complaint from the open source 
@@ -65,8 +65,8 @@ system's dynamic loader was supposed to do for us? Yes, but now we've got this
 level of indirection, we can do things like this:
 
 ```bash
-export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
-./MyGameThatIsStaticallyLinkedToSDL2
+export SDL_DYNAMIC_API=/my/actual/libSDL3.so.0
+./MyGameThatIsStaticallyLinkedToSDL
 ```
 
 And now, this game that is statically linked to SDL, can still be overridden 
@@ -108,7 +108,7 @@ the jump table, and the size, in bytes, of the table.
 Now, we've got policy here: this table's layout never changes; new stuff gets 
 added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all 
 the needed functions if tablesize <= sizeof its own jump table. If tablesize is
-bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but
+bigger (say, SDL 3.0.4 is trying to load SDL 3.0.3), then we know to abort, but
 if it's smaller, we know we can provide the entire API that the caller needs.
 
 The version variable is a failsafe switch. 

+ 2 - 2
docs/README-emscripten.md

@@ -59,11 +59,11 @@ Or with cmake:
 To build one of the tests:
 
     $ cd test/
-    $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
+    $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL3.a ../build/libSDL3_test.a -o a.html
 
 Uses GLES2 renderer or software
 
-Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
+Some other SDL3 libraries can be easily built (assuming SDL3 is installed somewhere):
 
 SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
 

+ 10 - 10
docs/README-gdk.md

@@ -25,7 +25,7 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
     * Initializing/uninitializing the game runtime, and initializing Xbox Live services
     * Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
   
-  * An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
+  * An implementation on `WinMain` that performs the above GDK setup (you should link against SDL3main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
   * Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
   * You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
   
@@ -36,8 +36,8 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
 
 The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
 
-* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
-* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
+* SDL3 (DLL) - This is the typical SDL3.dll, but for Gaming.Desktop.x64.
+* SDL3main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
 * tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
 * tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
   *NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
@@ -54,21 +54,21 @@ These steps assume you already have a game using SDL that runs on Windows x64 al
 
 In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
 
-### 2. Build SDL2 and SDL2main for GDK ###
+### 2. Build SDL3 and SDL3main for GDK ###
 
-Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
+Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL3 and SDL3main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL3.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL3.lib`, and `SDL3main.lib` output files for your game project.
 
-*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built. 
+*Alternatively*, you could setup your solution file to instead reference the SDL3/SDL3main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL3 and SDL3main would both be built when your game is built. 
 
 ### 3. Configuring Project Settings ###
 
 While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
 
 *  Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
-* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
+* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL3.lib and SDL3main.lib are
 * Under Linker > Input > Additional Dependencies, you need the following:
-  * `SDL2.lib`
-  * `SDL2main.lib` (unless not using)
+  * `SDL3.lib`
+  * `SDL3main.lib` (unless not using)
   * `xgameruntime.lib`
   * `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
 * Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
@@ -81,7 +81,7 @@ Rather than using your own implementation of `WinMain`, it's recommended that yo
 
 The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
 
-* Your SDL2.dll
+* Your SDL3.dll
 * "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
 * XCurl.dll
 

+ 4 - 4
docs/README-ios.md

@@ -20,7 +20,7 @@ Using the Simple DirectMedia Layer for iOS
 3. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
 4. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
 5. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
-6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
+6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL3.framework from "Framework-iOS"
 7. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
 8. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
 9. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
@@ -194,15 +194,15 @@ http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOS
 Notes -- xcFramework
 ==============================================================================
 
-The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform. 
+The SDL.xcodeproj file now includes a target to build SDL3.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform. 
 
 In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
 
-The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
+The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL3.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
 
 This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
 
-In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
+In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL3.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
 
 #ifndef SDL_MAIN_HANDLED
 #ifdef main

+ 1 - 1
docs/README-kmsbsd.md

@@ -8,7 +8,7 @@ WSCONS support has been brought back, but only as an input backend. It will not
 OpenBSD note: Note that the video backend assumes that the user has read/write permissions to the /dev/drm* devices.
 
 
-SDL2 WSCONS input backend features
+SDL WSCONS input backend features
 ===================================================
 1. It is keymap-aware; it will work properly with different keymaps.
 2. It has mouse support.

+ 1 - 1
docs/README-n3ds.md

@@ -22,6 +22,6 @@ cmake --install build
 ## Notes
 
 -   Currently only software rendering is supported.
--   SDL2main should be used to ensure ROMFS is enabled.
+-   SDL3main should be used to ensure ROMFS is enabled.
 -   By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
 -   `SDL_GetBasePath` returns the romfs root instead of the executable's directory.

+ 2 - 2
docs/README-ngage.md

@@ -1,7 +1,7 @@
 Nokia N-Gage
 ============
 
-SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
+SDL port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
 (Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
 
 Compiling
@@ -12,7 +12,7 @@ The library is included in the
 [toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
 sub-module.
 
-A complete example project based on SDL2 can be found in the GitHub
+A complete example project based on SDL can be found in the GitHub
 account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
 
 Current level of implementation

+ 5 - 8
docs/README-os2.md

@@ -42,24 +42,21 @@ Installing:
 
 - eComStation:
 
-  If you have previously installed SDL2, make a Backup copy of SDL2.dll
+  If you have previously installed SDL3, make a Backup copy of SDL3.dll
   located in D:\ecs\dll (where D: is disk on which installed eComStation).
-  Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll
+  Stop all programs running with SDL3. Copy SDL3.dll to D:\ecs\dll
 
 - OS/2:
 
-  Copy SDL2.dll to any directory on your LIBPATH.  If you have a previous
-  version installed, close all SDL2 applications before replacing the old
+  Copy SDL3.dll to any directory on your LIBPATH.  If you have a previous
+  version installed, close all SDL3 applications before replacing the old
   copy.  Also make sure that any other older versions of DLLs are removed
   from your system.
 
 
-Joysticks in SDL2:
+Joysticks:
 ------------------
 
-The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version.
-Here is the original documentation from SDL-1.2:
-
 The Joystick detection only works for standard joysticks (2 buttons, 2 axes
 and the like). Therefore, if you use a non-standard joystick, you should
 specify its features in the SDL_OS2_JOYSTICK environment variable in a batch

+ 3 - 3
docs/README-ps2.md

@@ -1,6 +1,6 @@
 PS2
 ======
-SDL2 port for the Sony Playstation 2 contributed by:
+SDL port for the Sony Playstation 2 contributed by:
 - Francisco Javier Trujillo Mata
 
 
@@ -9,7 +9,7 @@ Credit to
    - David G. F. for helping me with several issues and tests.
 
 ## Building
-To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
+To build SDL library for the PS2, make sure you have the latest PS2Dev status and run:
 ```bash
 cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
 cmake --build build
@@ -48,4 +48,4 @@ Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_
 ## To Do
 - PS2 Screen Keyboard
 - Dialogs
-- Others
+- Others

+ 3 - 3
docs/README-psp.md

@@ -1,6 +1,6 @@
 PSP
 ======
-SDL2 port for the Sony PSP contributed by:
+SDL port for the Sony PSP contributed by:
 - Captian Lex 
 - Francisco Javier Trujillo Mata
 - Wouter Wijsman
@@ -11,7 +11,7 @@ Credit to
    Geecko for his PSP GU lib "Glib2d"
 
 ## Building
-To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
+To build SDL library for the PSP, make sure you have the latest PSPDev status and run:
 ```bash
 cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
 cmake --build build
@@ -33,4 +33,4 @@ cmake --install build
 
 ## To Do
 - PSP Screen Keyboard
-- Dialogs
+- Dialogs

+ 2 - 2
docs/README-raspberrypi.md

@@ -81,13 +81,13 @@ The final step is compiling SDL itself.
     export CC="/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"
     cd <SDL SOURCE>
     mkdir -p build;cd build
-    LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
+    LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl3-installed --disable-pulseaudio --disable-esd
     make
     make install
 
 To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:
     
-    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
     
 Apps don't work or poor video/audio performance
 -----------------------------------------------

+ 3 - 3
docs/README-riscos.md

@@ -12,15 +12,15 @@ Requirements:
 Compiling:
 ----------
 
-Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
+Currently, SDL for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
 
-The following commands can be used to build SDL2 for RISC OS using autoconf:
+The following commands can be used to build SDL for RISC OS using autoconf:
 
     ./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics
     make
     make install
 
-The following commands can be used to build SDL2 for RISC OS using CMake:
+The following commands can be used to build SDL for RISC OS using CMake:
 
     cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF
     cmake --build build-riscos

+ 8 - 8
docs/README-visualc.md

@@ -27,9 +27,9 @@ You may get a few warnings, but you should not get any errors.
 
 Later, we will refer to the following `.lib` and `.dll` files that have just been generated:
 
--   `./VisualC/Win32/Debug/SDL2.dll` or `./VisualC/Win32/Release/SDL2.dll`
--   `./VisualC/Win32/Debug/SDL2.lib` or `./VisualC/Win32/Release/SDL2.lib`
--   `./VisualC/Win32/Debug/SDL2main.lib` or `./VisualC/Win32/Release/SDL2main.lib`
+-   `./VisualC/Win32/Debug/SDL3.dll` or `./VisualC/Win32/Release/SDL3.dll`
+-   `./VisualC/Win32/Debug/SDL3.lib` or `./VisualC/Win32/Release/SDL3.lib`
+-   `./VisualC/Win32/Debug/SDL3main.lib` or `./VisualC/Win32/Release/SDL3main.lib`
 
 _Note for the `x64` versions, just replace `Win32` in the path with `x64`_
 
@@ -59,12 +59,12 @@ Now we're going to use the files that we had created earlier in the *Build SDL*
 
 Copy the following file into your Project directory:
 
--   `SDL2.dll`
+-   `SDL3.dll`
 
 Add the following files to your project (It is not necessary to copy them to your project directory):
 
--   `SDL2.lib`
--   `SDL2main.lib`
+-   `SDL3.lib`
+-   `SDL3main.lib`
 
 To add them to your project, right click on your project, and select
 `Add files to project`.
@@ -73,7 +73,7 @@ To add them to your project, right click on your project, and select
 and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration
 (e.g. Release,Debug).**
 
-### Hello SDL2
+### Hello SDL
 
 Here's a sample SDL snippet to verify everything is setup in your IDE:
 
@@ -88,7 +88,7 @@ Here's a sample SDL snippet to verify everything is setup in your IDE:
         SDL_Renderer* renderer = NULL;
 
         SDL_Init(SDL_INIT_VIDEO);
-        window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
+        window = SDL_CreateWindow("Hello SDL", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
         renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
  
         SDL_DestroyRenderer(renderer);

+ 3 - 3
docs/README-winrt.md

@@ -272,8 +272,8 @@ To include these files for C/C++ projects:
 2. navigate to the directory containing SDL's source code, then into its
    subdirectory, 'src/main/winrt/'.  Select, then add, the following files:
    - `SDL_winrt_main_NonXAML.cpp`
-   - `SDL2-WinRTResources.rc`
-   - `SDL2-WinRTResource_BlankCursor.cur`
+   - `SDL3-WinRTResources.rc`
+   - `SDL3-WinRTResource_BlankCursor.cur`
 3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your
    project), then click on "Properties...".
 4. in the drop-down box next to "Configuration", choose, "All Configurations"
@@ -287,7 +287,7 @@ app's project.  This is to make sure that Visual C++'s linker builds a 'Windows
 Metadata' file (.winmd) for your app.  Not doing so can lead to build errors.**
 
 For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
-main function, and generate SDL2-WinRTResources.res manually by using `rc` via
+main function, and generate SDL3-WinRTResources.res manually by using `rc` via
 the Developer Command Prompt and including it as a <Win32Resource> within the
 first <PropertyGroup> block in your Visual Studio project file.
 

+ 4 - 4
docs/doxyfile

@@ -31,7 +31,7 @@ PROJECT_NAME           = SDL
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 2.0
+PROJECT_NUMBER         = 3.0
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
@@ -868,14 +868,14 @@ GENERATE_DOCSET        = NO
 # documentation sets from a single provider (such as a company or product suite) 
 # can be grouped.
 
-DOCSET_FEEDNAME        = "SDL 2.0 Doxygen"
+DOCSET_FEEDNAME        = "SDL 3.0 Doxygen"
 
 # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
 # should uniquely identify the documentation set bundle. This should be a 
 # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
 # will append .docset to the name.
 
-DOCSET_BUNDLE_ID       = org.libsdl.sdl20
+DOCSET_BUNDLE_ID       = org.libsdl.sdl30
 
 # If the GENERATE_HTMLHELP tag is set to YES, additional index files 
 # will be generated that can be used as input for tools like the 
@@ -889,7 +889,7 @@ GENERATE_HTMLHELP      = NO
 # can add a path in front of the file if the result should not be 
 # written to the html output directory.
 
-CHM_FILE               = ./sdl20.chm
+CHM_FILE               = ./sdl30.chm
 
 # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
 # be used to specify the location (absolute path including file name) of 

+ 1 - 1
include/SDL.h

@@ -146,7 +146,7 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
 /**
  * Compatibility function to initialize the SDL library.
  *
- * In SDL2, this function and SDL_Init() are interchangeable.
+ * This function and SDL_Init() are interchangeable.
  *
  * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
  * \returns 0 on success or a negative error code on failure; call

+ 1 - 1
include/SDL_audio.h

@@ -1211,7 +1211,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
  * You should not call SDL_LockAudio() on the device before queueing; SDL
  * handles locking internally for this function.
  *
- * Note that SDL2 does not support planar audio. You will need to resample
+ * Note that SDL does not support planar audio. You will need to resample
  * from planar audio formats into a non-planar one (see SDL_AudioFormat)
  * before queuing audio.
  *

+ 1 - 1
include/SDL_hints.h

@@ -352,7 +352,7 @@ extern "C" {
  *  \brief Disable giving back control to the browser automatically
  *  when running with asyncify
  *
- * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
+ * With -s ASYNCIFY, SDL calls emscripten_sleep during operations
  * such as refreshing the screen or polling events.
  *
  * This hint only applies to the emscripten platform

+ 1 - 1
include/SDL_main.h

@@ -55,7 +55,7 @@
 /* On GDK, SDL provides a main function that initializes the game runtime.
 
    Please note that #include'ing SDL_main.h is not enough to get a main()
-   function working. You must either link against SDL2main or, if not possible,
+   function working. You must either link against SDL3main or, if not possible,
    call the SDL_GDKRunApp function from your entry point.
 */
 #define SDL_MAIN_NEEDED

+ 1 - 1
include/SDL_test.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 #ifndef SDL_test_h_

+ 1 - 1
include/SDL_test_assert.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_common.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /* Ported from original test\common.h file. */

+ 1 - 1
include/SDL_test_compare.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_crc32.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_font.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 #ifndef SDL_test_font_h_

+ 1 - 1
include/SDL_test_fuzzer.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_harness.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_images.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_log.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_md5.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 1 - 1
include/SDL_test_memory.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 #ifndef SDL_test_memory_h_

+ 1 - 1
include/SDL_test_random.h

@@ -24,7 +24,7 @@
  *
  *  Include file for SDL test framework.
  *
- *  This code is a part of the SDL2_test library, not the main SDL library.
+ *  This code is a part of the SDL test library, not the main SDL library.
  */
 
 /*

+ 4 - 4
include/SDL_thread.h

@@ -94,15 +94,15 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
  *
  *  We compile SDL into a DLL. This means, that it's the DLL which
  *  creates a new thread for the calling process with the SDL_CreateThread()
- *  API. There is a problem with this, that only the RTL of the SDL2.DLL will
+ *  API. There is a problem with this, that only the RTL of the SDL3.DLL will
  *  be initialized for those threads, and not the RTL of the calling
  *  application!
  *
  *  To solve this, we make a little hack here.
  *
  *  We'll always use the caller's _beginthread() and _endthread() APIs to
- *  start a new thread. This way, if it's the SDL2.DLL which uses this API,
- *  then the RTL of SDL2.DLL will be used to create the new thread, and if it's
+ *  start a new thread. This way, if it's the SDL3.DLL which uses this API,
+ *  then the RTL of SDL3.DLL will be used to create the new thread, and if it's
  *  the application, then the RTL of the application will be used.
  *
  *  So, in short:
@@ -147,7 +147,7 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn,
 
 #elif defined(__OS2__)
 /*
- * just like the windows case above:  We compile SDL2
+ * just like the windows case above:  We compile SDL3
  * into a dll with Watcom's runtime statically linked.
  */
 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD

+ 3 - 3
include/SDL_version.h

@@ -57,8 +57,8 @@ typedef struct SDL_version
 
 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
 */
-#define SDL_MAJOR_VERSION   2
-#define SDL_MINOR_VERSION   26
+#define SDL_MAJOR_VERSION   3
+#define SDL_MINOR_VERSION   0
 #define SDL_PATCHLEVEL      0
 
 /**
@@ -84,7 +84,7 @@ typedef struct SDL_version
 }
 
 /* TODO: Remove this whole block in SDL 3 */
-#if SDL_MAJOR_VERSION < 3
+#if SDL_MAJOR_VERSION <= 3
 /**
  *  This macro turns the version numbers into a numeric value:
  *  \verbatim

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov