From 154452a72636ee7fd718c464e9d95860289db624 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 5 Sep 2024 23:36:16 -0400
Subject: [PATCH] winrt: Removed WinRT/Windows Phone/UWP support.
Fixes #10724.
---
.github/workflows/create-test-plan.py | 18 +-
CMakeLists.txt | 146 +--
VisualC-WinRT/SDL-UWP.sln | 69 --
VisualC-WinRT/SDL-UWP.vcxproj | 932 -----------------
VisualC-WinRT/SDL-UWP.vcxproj.filters | 979 ------------------
.../Assets/LockScreenLogo.scale-200.png | Bin 1430 -> 0 bytes
.../Assets/SplashScreen.scale-200.png | Bin 7700 -> 0 bytes
.../Assets/Square150x150Logo.scale-200.png | Bin 2937 -> 0 bytes
.../Assets/Square44x44Logo.scale-200.png | Bin 1647 -> 0 bytes
...x44Logo.targetsize-24_altform-unplated.png | Bin 1255 -> 0 bytes
VisualC-WinRT/testdraw/Assets/StoreLogo.png | Bin 1451 -> 0 bytes
.../Assets/Wide310x150Logo.scale-200.png | Bin 3204 -> 0 bytes
VisualC-WinRT/testdraw/Package.appxmanifest | 49 -
VisualC-WinRT/testdraw/testdraw.vcxproj | 335 ------
.../testdraw/testdraw.vcxproj.filters | 85 --
build-scripts/SDL_migration.cocci | 10 -
build-scripts/add-source-to-projects.pl | 1 -
build-scripts/rename_macros.py | 2 +-
cmake/test/CMakeLists.txt | 6 -
docs/README-migration.md | 17 +-
docs/README-porting.md | 2 +-
docs/README-windows.md | 6 +
docs/README-winrt.md | 483 ---------
docs/README.md | 1 -
examples/CMakeLists.txt | 63 +-
include/SDL3/SDL_begin_code.h | 4 +-
include/SDL3/SDL_filesystem.h | 26 +-
include/SDL3/SDL_hints.h | 113 --
include/SDL3/SDL_main.h | 18 +-
include/SDL3/SDL_main_impl.h | 64 --
include/SDL3/SDL_oldnames.h | 4 -
include/SDL3/SDL_platform_defines.h | 2 +-
include/SDL3/SDL_system.h | 84 --
include/SDL3/SDL_thread.h | 4 +-
include/SDL3/SDL_video.h | 6 -
include/build_config/SDL_build_config.h | 2 -
include/build_config/SDL_build_config.h.cmake | 2 -
.../build_config/SDL_build_config_windows.h | 2 -
include/build_config/SDL_build_config_winrt.h | 229 ----
src/SDL.c | 4 +-
src/SDL_log.c | 14 +-
src/atomic/SDL_spinlock.c | 2 +-
src/audio/wasapi/SDL_wasapi.c | 14 +-
src/audio/wasapi/SDL_wasapi.h | 6 +-
src/audio/wasapi/SDL_wasapi_win32.c | 13 +-
src/audio/wasapi/SDL_wasapi_winrt.cpp | 360 -------
src/core/SDL_core_unsupported.c | 21 +-
src/core/windows/SDL_hid.c | 8 +-
src/core/windows/SDL_hid.h | 5 -
src/core/windows/SDL_windows.c | 35 +-
src/core/windows/SDL_windows.h | 2 -
src/core/windows/SDL_xinput.c | 14 +-
src/core/winrt/SDL_winrtapp_common.cpp | 43 -
src/core/winrt/SDL_winrtapp_common.h | 31 -
src/core/winrt/SDL_winrtapp_direct3d.cpp | 758 --------------
src/core/winrt/SDL_winrtapp_direct3d.h | 92 --
src/core/winrt/SDL_winrtapp_xaml.cpp | 146 ---
src/core/winrt/SDL_winrtapp_xaml.h | 31 -
src/cpuinfo/SDL_cpuinfo.c | 2 +-
src/dynapi/SDL_dynapi.h | 2 -
src/dynapi/SDL_dynapi.sym | 2 -
src/dynapi/SDL_dynapi_overrides.h | 2 -
src/dynapi/SDL_dynapi_procs.h | 2 -
src/dynapi/SDL_dynapi_unsupported.h | 4 -
src/file/SDL_iostream.c | 37 +-
src/filesystem/winrt/SDL_sysfilesystem.cpp | 262 -----
src/gpu/d3d12/SDL_gpu_d3d12.c | 2 -
src/joystick/SDL_joystick.c | 4 -
src/joystick/windows/SDL_rawinputjoystick.c | 5 -
.../windows/SDL_windows_gaming_input.c | 15 +-
src/joystick/windows/SDL_windowsjoystick.c | 14 +-
src/loadso/windows/SDL_sysloadso.c | 16 +-
src/locale/winrt/SDL_syslocale.c | 54 -
.../winrt/SDL3-WinRTResource_BlankCursor.cur | Bin 326 -> 0 bytes
src/main/winrt/SDL3-WinRTResources.rc | 2 -
src/main/winrt/SDL_sysmain_runapp.cpp | 45 -
src/misc/winrt/SDL_sysurl.cpp | 38 -
src/power/SDL_power.c | 3 -
src/power/SDL_syspower.h | 1 -
src/power/winrt/SDL_syspower.cpp | 39 -
src/render/direct3d11/SDL_render_d3d11.c | 151 +--
src/render/direct3d11/SDL_render_winrt.cpp | 93 --
src/render/direct3d11/SDL_render_winrt.h | 36 -
src/render/opengles2/SDL_render_gles2.c | 10 -
src/thread/SDL_thread.c | 4 +-
src/thread/SDL_thread_c.h | 2 -
src/thread/stdcpp/SDL_syscond.cpp | 113 --
src/thread/stdcpp/SDL_sysmutex.cpp | 85 --
src/thread/stdcpp/SDL_sysmutex_c.h | 29 -
src/thread/stdcpp/SDL_sysrwlock.cpp | 118 ---
src/thread/stdcpp/SDL_systhread.cpp | 169 ---
src/thread/stdcpp/SDL_systhread_c.h | 24 -
src/thread/windows/SDL_syscond_cv.c | 14 -
src/thread/windows/SDL_sysmutex.c | 16 -
src/thread/windows/SDL_sysrwlock_srw.c | 23 +-
src/thread/windows/SDL_syssem.c | 20 -
src/thread/windows/SDL_systhread.c | 2 -
src/thread/windows/SDL_systls.c | 12 -
src/time/windows/SDL_systime.c | 4 -
src/timer/SDL_timer.c | 3 +-
src/timer/windows/SDL_systimer.c | 12 +-
src/video/SDL_egl.c | 10 +-
src/video/SDL_stretch.c | 2 +-
src/video/SDL_sysvideo.h | 1 -
src/video/SDL_video.c | 50 -
src/video/windows/SDL_windowsmodes.c | 4 -
src/video/winrt/SDL_winrtevents.cpp | 143 ---
src/video/winrt/SDL_winrtevents_c.h | 80 --
src/video/winrt/SDL_winrtgamebar.cpp | 185 ----
src/video/winrt/SDL_winrtgamebar_cpp.h | 33 -
src/video/winrt/SDL_winrtkeyboard.cpp | 199 ----
src/video/winrt/SDL_winrtmessagebox.cpp | 112 --
src/video/winrt/SDL_winrtmessagebox.h | 27 -
src/video/winrt/SDL_winrtmouse.cpp | 255 -----
src/video/winrt/SDL_winrtmouse_c.h | 38 -
src/video/winrt/SDL_winrtopengles.cpp | 207 ----
src/video/winrt/SDL_winrtopengles.h | 67 --
src/video/winrt/SDL_winrtpointerinput.cpp | 389 -------
src/video/winrt/SDL_winrtvideo.cpp | 846 ---------------
src/video/winrt/SDL_winrtvideo_cpp.h | 106 --
test/CMakeLists.txt | 72 +-
test/uwp/Package.appxmanifest.in | 52 -
test/uwp/logo-50x50.png | Bin 2421 -> 0 bytes
test/uwp/splash-620x300.png | Bin 30918 -> 0 bytes
test/uwp/square-150x150.png | Bin 10605 -> 0 bytes
test/uwp/square-44x44.png | Bin 2082 -> 0 bytes
126 files changed, 150 insertions(+), 9582 deletions(-)
delete mode 100644 VisualC-WinRT/SDL-UWP.sln
delete mode 100644 VisualC-WinRT/SDL-UWP.vcxproj
delete mode 100644 VisualC-WinRT/SDL-UWP.vcxproj.filters
delete mode 100644 VisualC-WinRT/testdraw/Assets/LockScreenLogo.scale-200.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/SplashScreen.scale-200.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/Square150x150Logo.scale-200.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/Square44x44Logo.scale-200.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/StoreLogo.png
delete mode 100644 VisualC-WinRT/testdraw/Assets/Wide310x150Logo.scale-200.png
delete mode 100644 VisualC-WinRT/testdraw/Package.appxmanifest
delete mode 100644 VisualC-WinRT/testdraw/testdraw.vcxproj
delete mode 100644 VisualC-WinRT/testdraw/testdraw.vcxproj.filters
delete mode 100644 docs/README-winrt.md
delete mode 100644 include/build_config/SDL_build_config_winrt.h
delete mode 100644 src/audio/wasapi/SDL_wasapi_winrt.cpp
delete mode 100644 src/core/winrt/SDL_winrtapp_common.cpp
delete mode 100644 src/core/winrt/SDL_winrtapp_common.h
delete mode 100644 src/core/winrt/SDL_winrtapp_direct3d.cpp
delete mode 100644 src/core/winrt/SDL_winrtapp_direct3d.h
delete mode 100644 src/core/winrt/SDL_winrtapp_xaml.cpp
delete mode 100644 src/core/winrt/SDL_winrtapp_xaml.h
delete mode 100644 src/filesystem/winrt/SDL_sysfilesystem.cpp
delete mode 100644 src/locale/winrt/SDL_syslocale.c
delete mode 100644 src/main/winrt/SDL3-WinRTResource_BlankCursor.cur
delete mode 100644 src/main/winrt/SDL3-WinRTResources.rc
delete mode 100644 src/main/winrt/SDL_sysmain_runapp.cpp
delete mode 100644 src/misc/winrt/SDL_sysurl.cpp
delete mode 100644 src/power/winrt/SDL_syspower.cpp
delete mode 100644 src/render/direct3d11/SDL_render_winrt.cpp
delete mode 100644 src/render/direct3d11/SDL_render_winrt.h
delete mode 100644 src/thread/stdcpp/SDL_syscond.cpp
delete mode 100644 src/thread/stdcpp/SDL_sysmutex.cpp
delete mode 100644 src/thread/stdcpp/SDL_sysmutex_c.h
delete mode 100644 src/thread/stdcpp/SDL_sysrwlock.cpp
delete mode 100644 src/thread/stdcpp/SDL_systhread.cpp
delete mode 100644 src/thread/stdcpp/SDL_systhread_c.h
delete mode 100644 src/video/winrt/SDL_winrtevents.cpp
delete mode 100644 src/video/winrt/SDL_winrtevents_c.h
delete mode 100644 src/video/winrt/SDL_winrtgamebar.cpp
delete mode 100644 src/video/winrt/SDL_winrtgamebar_cpp.h
delete mode 100644 src/video/winrt/SDL_winrtkeyboard.cpp
delete mode 100644 src/video/winrt/SDL_winrtmessagebox.cpp
delete mode 100644 src/video/winrt/SDL_winrtmessagebox.h
delete mode 100644 src/video/winrt/SDL_winrtmouse.cpp
delete mode 100644 src/video/winrt/SDL_winrtmouse_c.h
delete mode 100644 src/video/winrt/SDL_winrtopengles.cpp
delete mode 100644 src/video/winrt/SDL_winrtopengles.h
delete mode 100644 src/video/winrt/SDL_winrtpointerinput.cpp
delete mode 100644 src/video/winrt/SDL_winrtvideo.cpp
delete mode 100644 src/video/winrt/SDL_winrtvideo_cpp.h
delete mode 100644 test/uwp/Package.appxmanifest.in
delete mode 100644 test/uwp/logo-50x50.png
delete mode 100644 test/uwp/splash-620x300.png
delete mode 100644 test/uwp/square-150x150.png
delete mode 100644 test/uwp/square-44x44.png
diff --git a/.github/workflows/create-test-plan.py b/.github/workflows/create-test-plan.py
index 522ea54abd43c..4751383b34931 100755
--- a/.github/workflows/create-test-plan.py
+++ b/.github/workflows/create-test-plan.py
@@ -95,7 +95,6 @@ class JobSpec:
msvc_project: Optional[str] = None
msvc_arch: Optional[MsvcArch] = None
clang_cl: bool = False
- uwp: bool = False
gdk: bool = False
vita_gles: Optional[VitaGLES] = None
@@ -112,7 +111,6 @@ class JobSpec:
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
- "msvc-uwp-x64": JobSpec(name="UWP (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-UWP", msvc_arch=MsvcArch.X64, msvc_project="VisualC-WinRT/SDL-UWP.sln", uwp=True, ),
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
"ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", ),
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
@@ -358,10 +356,9 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
"-DCMAKE_SHARED_LINKER_FLAGS=-DEBUG",
))
- if spec.uwp:
- job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL'")
- else:
- job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
+
+ job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
+
if spec.clang_cl:
job.cmake_arguments.extend((
"-DCMAKE_C_COMPILER=clang-cl",
@@ -398,14 +395,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
case MsvcArch.Arm64:
job.msvc_vcvars = "x64_arm64"
job.run_tests = False
- if spec.uwp:
- job.build_tests = False
- job.cmake_arguments.extend((
- "-DCMAKE_SYSTEM_NAME=WindowsStore",
- "-DCMAKE_SYSTEM_VERSION=10.0",
- ))
- job.msvc_project_flags.append("-p:WindowsTargetPlatformVersion=10.0.17763.0")
- elif spec.gdk:
+ if spec.gdk:
job.setup_gdk_folder = "VisualC-GDK"
else:
match spec.msvc_arch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5716da4cefbe3..9660786a50ebc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -361,7 +361,7 @@ cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_
option(SDL_TEST_LIBRARY "Build the SDL3_test library" ON)
dep_option(SDL_TESTS "Build the test directory" OFF SDL_TEST_LIBRARY OFF)
-dep_option(SDL_INSTALL_TESTS "Install test-cases" OFF "NOT SDL_DISABLE_INSTALL;NOT SDL_FRAMEWORK;NOT WINDOWS_STORE" OFF)
+dep_option(SDL_INSTALL_TESTS "Install test-cases" OFF "NOT SDL_DISABLE_INSTALL;NOT SDL_FRAMEWORK" OFF)
dep_option(SDL_TESTS_LINK_SHARED "link tests to shared SDL library" "${SDL_SHARED}" "SDL_SHARED;SDL_STATIC" "${SDL_SHARED}")
set(SDL_TESTS_TIMEOUT_MULTIPLIER "1" CACHE STRING "Timeout multiplier to account for really slow machines")
@@ -428,11 +428,6 @@ if (LIBC_IS_GLIBC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
sdl_compile_definitions(PRIVATE "_TIME_BITS=64")
endif()
-if(WINDOWS_STORE)
- sdl_compile_definitions(PRIVATE "SDL_BUILDING_WINRT=1" "WINAPI_FAMILY=WINAPI_FAMILY_APP")
- sdl_compile_options(PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:/ZW>" "$<$<COMPILE_LANGUAGE:CXX>:-EHsc>")
-endif()
-
check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT)
if(HAVE_WL_VERSION_SCRIPT)
sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym")
@@ -1833,15 +1828,6 @@ elseif(WINDOWS)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/windows/*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/windows/*.c")
- if(WINDOWS_STORE)
- enable_language(CXX)
- sdl_glob_sources(
- "${SDL3_SOURCE_DIR}/src/core/winrt/*.c"
- "${SDL3_SOURCE_DIR}/src/core/winrt/*.cpp"
- "${SDL3_SOURCE_DIR}/src/main/winrt/*.cpp"
- )
- endif()
-
if(TARGET SDL3-shared AND MSVC AND NOT SDL_LIBC)
# Prevent codegen that would use the VC runtime libraries.
target_compile_options(SDL3-shared PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/GS-> $<$<COMPILE_LANGUAGE:C,CXX>:/Gs1048576>)
@@ -1850,11 +1836,8 @@ elseif(WINDOWS)
endif()
endif()
- if(WINDOWS_STORE)
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/winrt/*.cpp")
- else()
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/windows/*.c")
- endif()
+ sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/windows/*.c")
+
set(HAVE_SDL_MISC TRUE)
# Check for DirectX
@@ -1875,7 +1858,7 @@ elseif(WINDOWS)
check_include_file(ddraw.h HAVE_DDRAW_H)
check_include_file(dsound.h HAVE_DSOUND_H)
check_include_file(dinput.h HAVE_DINPUT_H)
- if(WINDOWS_STORE OR SDL_CPU_ARM32)
+ if(SDL_CPU_ARM32) # !!! FIXME: this should probably check if we're !(x86 or x86-64) instead of arm.
set(HAVE_DINPUT_H 0)
endif()
check_include_file(dxgi.h HAVE_DXGI_H)
@@ -1932,7 +1915,7 @@ elseif(WINDOWS)
)
if(SDL_AUDIO)
- if(HAVE_DSOUND_H AND NOT WINDOWS_STORE)
+ if(HAVE_DSOUND_H)
set(SDL_AUDIO_DRIVER_DSOUND 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/directsound/*.c")
set(HAVE_SDL_AUDIO TRUE)
@@ -1942,27 +1925,15 @@ elseif(WINDOWS)
set(SDL_AUDIO_DRIVER_WASAPI 1)
set(HAVE_WASAPI TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/wasapi/*.c")
- if(WINDOWS_STORE)
- sdl_sources("${SDL3_SOURCE_DIR}/src/audio/wasapi/SDL_wasapi_winrt.cpp")
- endif()
set(HAVE_SDL_AUDIO TRUE)
endif()
endif()
if(SDL_VIDEO)
- if(WINDOWS_STORE)
- set(SDL_VIDEO_DRIVER_WINRT 1)
- sdl_glob_sources(
- "${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)
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c")
- endif()
+ set(SDL_VIDEO_DRIVER_WINDOWS 1)
+ sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c")
- if(SDL_RENDER_D3D AND HAVE_D3D9_H AND NOT WINDOWS_STORE)
+ if(SDL_RENDER_D3D AND HAVE_D3D9_H)
set(SDL_VIDEO_RENDER_D3D 1)
set(HAVE_RENDER_D3D TRUE)
endif()
@@ -1970,7 +1941,7 @@ elseif(WINDOWS)
set(SDL_VIDEO_RENDER_D3D11 1)
set(HAVE_RENDER_D3D11 TRUE)
endif()
- if(SDL_RENDER_D3D12 AND NOT WINDOWS_STORE)
+ if(SDL_RENDER_D3D12)
set(SDL_VIDEO_RENDER_D3D12 1)
set(HAVE_RENDER_D3D12 TRUE)
endif()
@@ -1980,60 +1951,36 @@ elseif(WINDOWS)
set(SDL_THREAD_GENERIC_COND_SUFFIX 1)
set(SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1)
set(SDL_THREAD_WINDOWS 1)
- if(WINDOWS_STORE)
- sdl_sources(
- "${SDL3_SOURCE_DIR}/src/thread/stdcpp/SDL_syscond.cpp"
- "${SDL3_SOURCE_DIR}/src/thread/stdcpp/SDL_sysmutex.cpp"
- "${SDL3_SOURCE_DIR}/src/thread/stdcpp/SDL_sysrwlock.cpp"
- "${SDL3_SOURCE_DIR}/src/thread/stdcpp/SDL_systhread.cpp"
- "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syssem.c"
- )
- else()
- sdl_sources(
- "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
- "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.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_sysrwlock_srw.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"
- )
- endif()
+ sdl_sources(
+ "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
+ "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.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_sysrwlock_srw.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)
- if(SDL_SENSOR AND HAVE_SENSORSAPI_H AND NOT WINDOWS_STORE)
+ if(SDL_SENSOR AND HAVE_SENSORSAPI_H)
set(SDL_SENSOR_WINDOWS 1)
set(HAVE_SDL_SENSORS TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/windows/*.c")
endif()
if(SDL_POWER)
- if(WINDOWS_STORE)
- set(SDL_POWER_WINRT 1)
- sdl_sources("${SDL3_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp")
- else()
- set(SDL_POWER_WINDOWS 1)
- sdl_sources("${SDL3_SOURCE_DIR}/src/power/windows/SDL_syspower.c")
- set(HAVE_SDL_POWER TRUE)
- endif()
+ set(SDL_POWER_WINDOWS 1)
+ sdl_sources("${SDL3_SOURCE_DIR}/src/power/windows/SDL_syspower.c")
+ set(HAVE_SDL_POWER TRUE)
endif()
- if(WINDOWS_STORE)
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/winrt/*.c")
- else()
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/windows/*.c")
- endif()
+ sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/windows/*.c")
set(HAVE_SDL_LOCALE TRUE)
set(SDL_FILESYSTEM_WINDOWS 1)
- if(WINDOWS_STORE)
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/winrt/*.cpp")
- sdl_sources("${SDL3_SOURCE_DIR}/src/filesystem/windows/SDL_sysfsops.c")
- else()
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/windows/*.c")
- endif()
+ sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/windows/*.c")
set(HAVE_SDL_FILESYSTEM TRUE)
set(SDL_FSOPS_WINDOWS 1)
@@ -2041,27 +1988,12 @@ elseif(WINDOWS)
set(SDL_STORAGE_GENERIC 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/generic/*.c")
- if(NOT WINDOWS_STORE)
- set(SDL_STORAGE_STEAM 1)
- sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/steam/*.c")
- endif()
+ set(SDL_STORAGE_STEAM 1)
+ sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/steam/*.c")
set(HAVE_SDL_STORAGE 1)
# Libraries for Win32 native and MinGW
- if(NOT WINDOWS_STORE)
- sdl_link_dependency(base LIBS kernel32 user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
- endif()
-
- if(WINDOWS_STORE)
- sdl_link_dependency(windows
- LIBS
- vccorlib$<$<CONFIG:Debug>:d>.lib
- msvcrt$<$<CONFIG:Debug>:d>.lib
- LINK_OPTIONS
- /nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
- /nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
- )
- endif()
+ sdl_link_dependency(base LIBS kernel32 user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
set(SDL_TIME_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/time/windows/*.c")
@@ -2078,7 +2010,7 @@ elseif(WINDOWS)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/windows/*.c")
if(SDL_VIDEO)
- if(SDL_OPENGL AND NOT WINDOWS_STORE)
+ if(SDL_OPENGL)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_WGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
@@ -2109,18 +2041,14 @@ elseif(WINDOWS)
if(SDL_JOYSTICK)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/windows/*.c")
- if(NOT WINDOWS_STORE)
- set(SDL_JOYSTICK_RAWINPUT 1)
- endif()
+ set(SDL_JOYSTICK_RAWINPUT 1)
if(HAVE_DINPUT_H)
set(SDL_JOYSTICK_DINPUT 1)
sdl_link_dependency(joystick LIBS dinput8)
endif()
if(HAVE_XINPUT_H)
- if(NOT WINDOWS_STORE)
- set(SDL_JOYSTICK_XINPUT 1)
- set(HAVE_XINPUT TRUE)
- endif()
+ set(SDL_JOYSTICK_XINPUT 1)
+ set(HAVE_XINPUT TRUE)
endif()
if(HAVE_WINDOWS_GAMING_INPUT_H)
set(SDL_JOYSTICK_WGI 1)
@@ -2132,7 +2060,7 @@ elseif(WINDOWS)
set(HAVE_SDL_JOYSTICK TRUE)
if(SDL_HAPTIC)
- if(HAVE_DINPUT_H AND NOT WINDOWS_STORE)
+ if(HAVE_DINPUT_H)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/haptic/windows/*.c")
set(SDL_HAPTIC_DINPUT 1)
set(HAVE_SDL_HAPTIC TRUE)
@@ -2141,7 +2069,7 @@ elseif(WINDOWS)
endif()
if(SDL_CAMERA)
- if(HAVE_MFAPI_H AND NOT WINDOWS_STORE)
+ if(HAVE_MFAPI_H)
set(HAVE_CAMERA TRUE)
set(SDL_CAMERA_DRIVER_MEDIAFOUNDATION 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/camera/mediafoundation/*.c")
@@ -2922,7 +2850,7 @@ if (SDL_DIALOG)
elseif(HAIKU)
sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/haiku/SDL_haikudialog.cc)
set(HAVE_SDL_DIALOG TRUE)
- elseif(WINDOWS AND NOT WINDOWS_STORE)
+ elseif(WINDOWS)
sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/windows/SDL_windowsdialog.c)
set(HAVE_SDL_DIALOG TRUE)
elseif(MACOS)
@@ -2943,7 +2871,7 @@ if(SDL_VIDEO)
endif()
endif()
-if(SDL_GPU AND NOT WINDOWS_STORE)
+if(SDL_GPU)
if(HAVE_D3D11_H)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/gpu/d3d11/*.c")
set(SDL_GPU_D3D11 1)
@@ -3316,7 +3244,7 @@ if(SDL_SHARED)
)
endif()
if(NOT SDL_LIBC)
- if(MSVC AND (NOT MSVC_CLANG AND NOT WINDOWS_STORE))
+ if(MSVC AND NOT MSVC_CLANG)
# Don't try to link with the default set of libraries.
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
target_link_options(SDL3-shared PRIVATE "/NODEFAULTLIB")
diff --git a/VisualC-WinRT/SDL-UWP.sln b/VisualC-WinRT/SDL-UWP.sln
deleted file mode 100644
index 86bd92dea7694..0000000000000
--- a/VisualC-WinRT/SDL-UWP.sln
+++ /dev/null
@@ -1,69 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.33027.164
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw", "testdraw\testdraw.vcxproj", "{95943BBE-F378-4068-A3FD-DAE1B8309B6E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM = Debug|ARM
- Debug|ARM64 = Debug|ARM64
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|ARM = Release|ARM
- Release|ARM64 = Release|ARM64
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.ActiveCfg = Debug|ARM
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.Build.0 = Debug|ARM
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM64.Build.0 = Debug|ARM64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.ActiveCfg = Debug|x64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.Build.0 = Debug|x64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.ActiveCfg = Debug|Win32
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.Build.0 = Debug|Win32
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.ActiveCfg = Release|ARM
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.Build.0 = Release|ARM
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM64.ActiveCfg = Release|ARM64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM64.Build.0 = Release|ARM64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.ActiveCfg = Release|x64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.Build.0 = Release|x64
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.ActiveCfg = Release|Win32
- {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.Build.0 = Release|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM.ActiveCfg = Debug|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM.Build.0 = Debug|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM.Deploy.0 = Debug|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM64.Build.0 = Debug|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x64.ActiveCfg = Debug|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x64.Build.0 = Debug|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x64.Deploy.0 = Debug|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x86.ActiveCfg = Debug|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x86.Build.0 = Debug|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Debug|x86.Deploy.0 = Debug|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM.ActiveCfg = Release|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM.Build.0 = Release|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM.Deploy.0 = Release|ARM
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM64.ActiveCfg = Release|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM64.Build.0 = Release|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|ARM64.Deploy.0 = Release|ARM64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x64.ActiveCfg = Release|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x64.Build.0 = Release|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x64.Deploy.0 = Release|x64
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x86.ActiveCfg = Release|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x86.Build.0 = Release|Win32
- {95943BBE-F378-4068-A3FD-DAE1B8309B6E}.Release|x86.Deploy.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {30680F51-7BB9-41D0-A0D6-BC44A1557D87}
- EndGlobalSection
-EndGlobal
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj b/VisualC-WinRT/SDL-UWP.vcxproj
deleted file mode 100644
index a7147715000e3..0000000000000
--- a/VisualC-WinRT/SDL-UWP.vcxproj
+++ /dev/null
@@ -1,932 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|ARM64">
- <Configuration>Debug</Configuration>
- <Platform>ARM64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|ARM">
- <Configuration>Debug</Configuration>
- <Platform>ARM</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|ARM">
- <Configuration>Release</Configuration>
- <Platform>ARM</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|ARM64">
- <Configuration>Release</Configuration>
- <Platform>ARM64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\include\SDL3\SDL_begin_code.h" />
- <ClInclude Include="..\include\SDL3\SDL_camera.h" />
- <ClInclude Include="..\include\SDL3\SDL_close_code.h" />
- <ClInclude Include="..\include\SDL3\SDL.h" />
- <ClInclude Include="..\include\SDL3\SDL_assert.h" />
- <ClInclude Include="..\include\SDL3\SDL_atomic.h" />
- <ClInclude Include="..\include\SDL3\SDL_audio.h" />
- <ClInclude Include="..\include\SDL3\SDL_blendmode.h" />
(Patch may be truncated, please check the link at the top of this post.)