winrt: Removed WinRT/Windows Phone/UWP support.

Fixes #10724.
This commit is contained in:
Ryan C. Gordon 2024-09-05 23:36:16 -04:00
parent 6d7c211faf
commit 154452a726
126 changed files with 150 additions and 9582 deletions

View File

@ -95,7 +95,6 @@ class JobSpec:
msvc_project: Optional[str] = None msvc_project: Optional[str] = None
msvc_arch: Optional[MsvcArch] = None msvc_arch: Optional[MsvcArch] = None
clang_cl: bool = False clang_cl: bool = False
uwp: bool = False
gdk: bool = False gdk: bool = False
vita_gles: Optional[VitaGLES] = None vita_gles: Optional[VitaGLES] = None
@ -112,7 +111,6 @@ JOB_SPECS = {
"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-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-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-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, ), "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-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", ), "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_EXE_LINKER_FLAGS=-DEBUG",
"-DCMAKE_SHARED_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: if spec.clang_cl:
job.cmake_arguments.extend(( job.cmake_arguments.extend((
"-DCMAKE_C_COMPILER=clang-cl", "-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: case MsvcArch.Arm64:
job.msvc_vcvars = "x64_arm64" job.msvc_vcvars = "x64_arm64"
job.run_tests = False job.run_tests = False
if spec.uwp: if spec.gdk:
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:
job.setup_gdk_folder = "VisualC-GDK" job.setup_gdk_folder = "VisualC-GDK"
else: else:
match spec.msvc_arch: match spec.msvc_arch:

View File

@ -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) 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_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}") 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") 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") sdl_compile_definitions(PRIVATE "_TIME_BITS=64")
endif() 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) check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT)
if(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") 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/core/windows/*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/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) if(TARGET SDL3-shared AND MSVC AND NOT SDL_LIBC)
# Prevent codegen that would use the VC runtime libraries. # 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>) target_compile_options(SDL3-shared PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/GS-> $<$<COMPILE_LANGUAGE:C,CXX>:/Gs1048576>)
@ -1850,11 +1836,8 @@ elseif(WINDOWS)
endif() endif()
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") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/windows/*.c")
endif()
set(HAVE_SDL_MISC TRUE) set(HAVE_SDL_MISC TRUE)
# Check for DirectX # Check for DirectX
@ -1875,7 +1858,7 @@ elseif(WINDOWS)
check_include_file(ddraw.h HAVE_DDRAW_H) check_include_file(ddraw.h HAVE_DDRAW_H)
check_include_file(dsound.h HAVE_DSOUND_H) check_include_file(dsound.h HAVE_DSOUND_H)
check_include_file(dinput.h HAVE_DINPUT_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) set(HAVE_DINPUT_H 0)
endif() endif()
check_include_file(dxgi.h HAVE_DXGI_H) check_include_file(dxgi.h HAVE_DXGI_H)
@ -1932,7 +1915,7 @@ elseif(WINDOWS)
) )
if(SDL_AUDIO) if(SDL_AUDIO)
if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) if(HAVE_DSOUND_H)
set(SDL_AUDIO_DRIVER_DSOUND 1) set(SDL_AUDIO_DRIVER_DSOUND 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/directsound/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/directsound/*.c")
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
@ -1942,27 +1925,15 @@ elseif(WINDOWS)
set(SDL_AUDIO_DRIVER_WASAPI 1) set(SDL_AUDIO_DRIVER_WASAPI 1)
set(HAVE_WASAPI TRUE) set(HAVE_WASAPI TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/wasapi/*.c") 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) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
endif() endif()
if(SDL_VIDEO) 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) set(SDL_VIDEO_DRIVER_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c")
endif()
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(SDL_VIDEO_RENDER_D3D 1)
set(HAVE_RENDER_D3D TRUE) set(HAVE_RENDER_D3D TRUE)
endif() endif()
@ -1970,7 +1941,7 @@ elseif(WINDOWS)
set(SDL_VIDEO_RENDER_D3D11 1) set(SDL_VIDEO_RENDER_D3D11 1)
set(HAVE_RENDER_D3D11 TRUE) set(HAVE_RENDER_D3D11 TRUE)
endif() endif()
if(SDL_RENDER_D3D12 AND NOT WINDOWS_STORE) if(SDL_RENDER_D3D12)
set(SDL_VIDEO_RENDER_D3D12 1) set(SDL_VIDEO_RENDER_D3D12 1)
set(HAVE_RENDER_D3D12 TRUE) set(HAVE_RENDER_D3D12 TRUE)
endif() endif()
@ -1980,15 +1951,6 @@ elseif(WINDOWS)
set(SDL_THREAD_GENERIC_COND_SUFFIX 1) set(SDL_THREAD_GENERIC_COND_SUFFIX 1)
set(SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1) set(SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1)
set(SDL_THREAD_WINDOWS 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( sdl_sources(
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c"
@ -1999,41 +1961,26 @@ elseif(WINDOWS)
"${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systhread.c" "${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systhread.c"
"${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systls.c" "${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systls.c"
) )
endif()
set(HAVE_SDL_THREADS TRUE) 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(SDL_SENSOR_WINDOWS 1)
set(HAVE_SDL_SENSORS TRUE) set(HAVE_SDL_SENSORS TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/windows/*.c")
endif() endif()
if(SDL_POWER) 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) set(SDL_POWER_WINDOWS 1)
sdl_sources("${SDL3_SOURCE_DIR}/src/power/windows/SDL_syspower.c") sdl_sources("${SDL3_SOURCE_DIR}/src/power/windows/SDL_syspower.c")
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
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") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/windows/*.c")
endif()
set(HAVE_SDL_LOCALE TRUE) set(HAVE_SDL_LOCALE TRUE)
set(SDL_FILESYSTEM_WINDOWS 1) 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") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/windows/*.c")
endif()
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
set(SDL_FSOPS_WINDOWS 1) set(SDL_FSOPS_WINDOWS 1)
@ -2041,27 +1988,12 @@ elseif(WINDOWS)
set(SDL_STORAGE_GENERIC 1) set(SDL_STORAGE_GENERIC 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/generic/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/generic/*.c")
if(NOT WINDOWS_STORE)
set(SDL_STORAGE_STEAM 1) set(SDL_STORAGE_STEAM 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/steam/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/storage/steam/*.c")
endif()
set(HAVE_SDL_STORAGE 1) set(HAVE_SDL_STORAGE 1)
# Libraries for Win32 native and MinGW # 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) 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()
set(SDL_TIME_WINDOWS 1) set(SDL_TIME_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/time/windows/*.c") 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") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/windows/*.c")
if(SDL_VIDEO) if(SDL_VIDEO)
if(SDL_OPENGL AND NOT WINDOWS_STORE) if(SDL_OPENGL)
set(SDL_VIDEO_OPENGL 1) set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_WGL 1) set(SDL_VIDEO_OPENGL_WGL 1)
set(SDL_VIDEO_RENDER_OGL 1) set(SDL_VIDEO_RENDER_OGL 1)
@ -2109,19 +2041,15 @@ elseif(WINDOWS)
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/windows/*.c")
if(NOT WINDOWS_STORE)
set(SDL_JOYSTICK_RAWINPUT 1) set(SDL_JOYSTICK_RAWINPUT 1)
endif()
if(HAVE_DINPUT_H) if(HAVE_DINPUT_H)
set(SDL_JOYSTICK_DINPUT 1) set(SDL_JOYSTICK_DINPUT 1)
sdl_link_dependency(joystick LIBS dinput8) sdl_link_dependency(joystick LIBS dinput8)
endif() endif()
if(HAVE_XINPUT_H) if(HAVE_XINPUT_H)
if(NOT WINDOWS_STORE)
set(SDL_JOYSTICK_XINPUT 1) set(SDL_JOYSTICK_XINPUT 1)
set(HAVE_XINPUT TRUE) set(HAVE_XINPUT TRUE)
endif() endif()
endif()
if(HAVE_WINDOWS_GAMING_INPUT_H) if(HAVE_WINDOWS_GAMING_INPUT_H)
set(SDL_JOYSTICK_WGI 1) set(SDL_JOYSTICK_WGI 1)
endif() endif()
@ -2132,7 +2060,7 @@ elseif(WINDOWS)
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
if(SDL_HAPTIC) 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") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/haptic/windows/*.c")
set(SDL_HAPTIC_DINPUT 1) set(SDL_HAPTIC_DINPUT 1)
set(HAVE_SDL_HAPTIC TRUE) set(HAVE_SDL_HAPTIC TRUE)
@ -2141,7 +2069,7 @@ elseif(WINDOWS)
endif() endif()
if(SDL_CAMERA) if(SDL_CAMERA)
if(HAVE_MFAPI_H AND NOT WINDOWS_STORE) if(HAVE_MFAPI_H)
set(HAVE_CAMERA TRUE) set(HAVE_CAMERA TRUE)
set(SDL_CAMERA_DRIVER_MEDIAFOUNDATION 1) set(SDL_CAMERA_DRIVER_MEDIAFOUNDATION 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/camera/mediafoundation/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/camera/mediafoundation/*.c")
@ -2922,7 +2850,7 @@ if (SDL_DIALOG)
elseif(HAIKU) elseif(HAIKU)
sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/haiku/SDL_haikudialog.cc) sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/haiku/SDL_haikudialog.cc)
set(HAVE_SDL_DIALOG TRUE) set(HAVE_SDL_DIALOG TRUE)
elseif(WINDOWS AND NOT WINDOWS_STORE) elseif(WINDOWS)
sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/windows/SDL_windowsdialog.c) sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/windows/SDL_windowsdialog.c)
set(HAVE_SDL_DIALOG TRUE) set(HAVE_SDL_DIALOG TRUE)
elseif(MACOS) elseif(MACOS)
@ -2943,7 +2871,7 @@ if(SDL_VIDEO)
endif() endif()
endif() endif()
if(SDL_GPU AND NOT WINDOWS_STORE) if(SDL_GPU)
if(HAVE_D3D11_H) if(HAVE_D3D11_H)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/gpu/d3d11/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/gpu/d3d11/*.c")
set(SDL_GPU_D3D11 1) set(SDL_GPU_D3D11 1)
@ -3316,7 +3244,7 @@ if(SDL_SHARED)
) )
endif() endif()
if(NOT SDL_LIBC) 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. # Don't try to link with the default set of libraries.
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB. # Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
target_link_options(SDL3-shared PRIVATE "/NODEFAULTLIB") target_link_options(SDL3-shared PRIVATE "/NODEFAULTLIB")

View File

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

View File

@ -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" />
<ClInclude Include="..\include\SDL3\SDL_clipboard.h" />
<ClInclude Include="..\include\SDL3\SDL_copying.h" />
<ClInclude Include="..\include\SDL3\SDL_cpuinfo.h" />
<ClInclude Include="..\include\SDL3\SDL_egl.h" />
<ClInclude Include="..\include\SDL3\SDL_endian.h" />
<ClInclude Include="..\include\SDL3\SDL_error.h" />
<ClInclude Include="..\include\SDL3\SDL_events.h" />
<ClInclude Include="..\include\SDL3\SDL_filesystem.h" />
<ClInclude Include="..\include\SDL3\SDL_guid.h" />
<ClInclude Include="..\include\SDL3\SDL_haptic.h" />
<ClInclude Include="..\include\SDL3\SDL_hints.h" />
<ClInclude Include="..\include\SDL3\SDL_hidapi.h" />
<ClInclude Include="..\include\SDL3\SDL_input.h" />
<ClInclude Include="..\include\SDL3\SDL_joystick.h" />
<ClInclude Include="..\include\SDL3\SDL_keyboard.h" />
<ClInclude Include="..\include\SDL3\SDL_keycode.h" />
<ClInclude Include="..\include\SDL3\SDL_loadso.h" />
<ClInclude Include="..\include\SDL3\SDL_locale.h" />
<ClInclude Include="..\include\SDL3\SDL_log.h" />
<ClInclude Include="..\include\SDL3\SDL_main.h" />
<ClInclude Include="..\include\SDL3\SDL_main_impl.h" />
<ClInclude Include="..\include\SDL3\SDL_misc.h" />
<ClInclude Include="..\include\SDL3\SDL_mouse.h" />
<ClInclude Include="..\include\SDL3\SDL_mutex.h" />
<ClInclude Include="..\include\SDL3\SDL_opengles2.h" />
<ClInclude Include="..\include\SDL3\SDL_pen.h" />
<ClInclude Include="..\include\SDL3\SDL_pixels.h" />
<ClInclude Include="..\include\SDL3\SDL_platform.h" />
<ClInclude Include="..\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="..\include\SDL3\SDL_power.h" />
<ClInclude Include="..\include\SDL3\SDL_properties.h" />
<ClInclude Include="..\include\SDL3\SDL_rect.h" />
<ClInclude Include="..\include\SDL3\SDL_render.h" />
<ClInclude Include="..\include\SDL3\SDL_revision.h" />
<ClInclude Include="..\include\SDL3\SDL_iostream.h" />
<ClInclude Include="..\include\SDL3\SDL_scancode.h" />
<ClInclude Include="..\include\SDL3\SDL_sensor.h" />
<ClInclude Include="..\include\SDL3\SDL_stdinc.h" />
<ClInclude Include="..\include\SDL3\SDL_storage.h" />
<ClInclude Include="..\include\SDL3\SDL_surface.h" />
<ClInclude Include="..\include\SDL3\SDL_system.h" />
<ClInclude Include="..\include\SDL3\SDL_thread.h" />
<ClInclude Include="..\include\SDL3\SDL_time.h" />
<ClInclude Include="..\include\SDL3\SDL_timer.h" />
<ClInclude Include="..\include\SDL3\SDL_touch.h" />
<ClInclude Include="..\include\SDL3\SDL_types.h" />
<ClInclude Include="..\include\SDL3\SDL_version.h" />
<ClInclude Include="..\include\SDL3\SDL_video.h" />
<ClInclude Include="..\src\audio\disk\SDL_diskaudio.h" />
<ClInclude Include="..\src\audio\dummy\SDL_dummyaudio.h" />
<ClInclude Include="..\src\audio\SDL_audiodev_c.h" />
<ClInclude Include="..\src\audio\SDL_audio_c.h" />
<ClInclude Include="..\src\audio\SDL_sysaudio.h" />
<ClInclude Include="..\src\audio\SDL_audioqueue.h" />
<ClInclude Include="..\src\audio\SDL_audioresample.h" />
<ClInclude Include="..\src\audio\SDL_wave.h" />
<ClInclude Include="..\src\audio\wasapi\SDL_wasapi.h" />
<ClInclude Include="..\src\camera\SDL_camera_c.h" />
<ClInclude Include="..\src\camera\SDL_syscamera.h" />
<ClInclude Include="..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\src\core\windows\SDL_xinput.h" />
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_common.h" />
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_direct3d.h" />
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_xaml.h" />
<ClInclude Include="..\src\cpuinfo\SDL_cpuinfo_c.h" />
<ClInclude Include="..\src\dynapi\SDL_dynapi.h" />
<ClInclude Include="..\src\dynapi\SDL_dynapi_overrides.h" />
<ClInclude Include="..\src\dynapi\SDL_dynapi_procs.h" />
<ClInclude Include="..\src\events\blank_cursor.h" />
<ClInclude Include="..\src\events\default_cursor.h" />
<ClInclude Include="..\src\events\SDL_categories_c.h" />
<ClInclude Include="..\src\events\SDL_clipboardevents_c.h" />
<ClInclude Include="..\src\events\SDL_displayevents_c.h" />
<ClInclude Include="..\src\events\SDL_dropevents_c.h" />
<ClInclude Include="..\src\events\SDL_events_c.h" />
<ClInclude Include="..\src\events\SDL_keyboard_c.h" />
<ClInclude Include="..\src\events\SDL_keymap_c.h" />
<ClInclude Include="..\src\events\SDL_mouse_c.h" />
<ClInclude Include="..\src\events\SDL_touch_c.h" />
<ClInclude Include="..\src\events\SDL_windowevents_c.h" />
<ClInclude Include="..\src\filesystem\SDL_sysfilesystem.h" />
<ClInclude Include="..\src\gpu\SDL_sysgpu.h" />
<ClInclude Include="..\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="..\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\src\joystick\controller_type.h" />
<ClInclude Include="..\src\joystick\SDL_gamepad_c.h" />
<ClInclude Include="..\src\joystick\SDL_gamepad_db.h" />
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h" />
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\src\main\SDL_main_callbacks.h" />
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h" />
<ClInclude Include="..\src\render\direct3d11\SDL_shaders_d3d11.h" />
<ClInclude Include="..\src\render\opengles2\SDL_gles2funcs.h" />
<ClInclude Include="..\src\render\opengles2\SDL_shaders_gles2.h" />
<ClInclude Include="..\src\render\SDL_d3dmath.h" />
<ClInclude Include="..\src\render\SDL_sysrender.h" />
<ClInclude Include="..\src\render\SDL_yuv_sw_c.h" />
<ClInclude Include="..\src\render\software\SDL_blendfillrect.h" />
<ClInclude Include="..\src\render\software\SDL_blendline.h" />
<ClInclude Include="..\src\render\software\SDL_blendpoint.h" />
<ClInclude Include="..\src\render\software\SDL_draw.h" />
<ClInclude Include="..\src\render\software\SDL_drawline.h" />
<ClInclude Include="..\src\render\software\SDL_drawpoint.h" />
<ClInclude Include="..\src\render\software\SDL_render_sw_c.h" />
<ClInclude Include="..\src\render\software\SDL_rotate.h" />
<ClInclude Include="..\src\render\software\SDL_triangle.h" />
<ClInclude Include="..\src\SDL_assert_c.h" />
<ClInclude Include="..\src\SDL_error_c.h" />
<ClInclude Include="..\src\SDL_fatal.h" />
<ClInclude Include="..\src\SDL_hashtable.h" />
<ClInclude Include="..\src\SDL_hints_c.h" />
<ClInclude Include="..\src\SDL_internal.h" />
<ClInclude Include="..\src\SDL_list.h" />
<ClInclude Include="..\src\SDL_log_c.h" />
<ClInclude Include="..\src\SDL_properties_c.h" />
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\src\sensor\SDL_syssensor.h" />
<ClInclude Include="..\src\thread\SDL_systhread.h" />
<ClInclude Include="..\src\thread\SDL_thread_c.h" />
<ClInclude Include="..\src\thread\stdcpp\SDL_sysmutex_c.h" />
<ClInclude Include="..\src\thread\stdcpp\SDL_systhread_c.h" />
<ClInclude Include="..\src\timer\SDL_timer_c.h" />
<ClInclude Include="..\src\video\dummy\SDL_nullevents_c.h" />
<ClInclude Include="..\src\video\dummy\SDL_nullframebuffer_c.h" />
<ClInclude Include="..\src\video\dummy\SDL_nullvideo.h" />
<ClInclude Include="..\src\video\SDL_blit.h" />
<ClInclude Include="..\src\video\SDL_blit_auto.h" />
<ClInclude Include="..\src\video\SDL_blit_copy.h" />
<ClInclude Include="..\src\video\SDL_blit_slow.h" />
<ClInclude Include="..\src\video\SDL_clipboard_c.h" />
<ClInclude Include="..\src\video\SDL_egl_c.h" />
<ClInclude Include="..\src\video\SDL_pixels_c.h" />
<ClInclude Include="..\src\video\SDL_rect_c.h" />
<ClInclude Include="..\src\video\SDL_RLEaccel_c.h" />
<ClInclude Include="..\src\video\SDL_surface_c.h" />
<ClInclude Include="..\src\video\SDL_sysvideo.h" />
<ClInclude Include="..\src\video\SDL_sysvidocapture.h" />
<ClInclude Include="..\src\video\SDL_yuv_c.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtmessagebox.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtmouse_c.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h" />
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_common.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_internal.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std.h" />
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\atomic\SDL_atomic.c" />
<ClCompile Include="..\src\atomic\SDL_spinlock.c" />
<ClCompile Include="..\src\audio\disk\SDL_diskaudio.c" />
<ClCompile Include="..\src\audio\dummy\SDL_dummyaudio.c" />
<ClCompile Include="..\src\audio\SDL_audio.c" />
<ClCompile Include="..\src\audio\SDL_audiocvt.c" />
<ClCompile Include="..\src\audio\SDL_audiodev.c" />
<ClCompile Include="..\src\audio\SDL_audiotypecvt.c" />
<ClCompile Include="..\src\audio\SDL_audioqueue.c" />
<ClCompile Include="..\src\audio\SDL_audioresample.c" />
<ClCompile Include="..\src\audio\SDL_mixer.c" />
<ClCompile Include="..\src\audio\SDL_wave.c" />
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi.c" />
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi_winrt.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\core\windows\pch.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\src\core\windows\pch_cpp.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\camera\dummy\SDL_camera_dummy.c" />
<ClCompile Include="..\src\camera\SDL_camera.c" />
<ClCompile Include="..\src\core\SDL_core_unsupported.c" />
<ClCompile Include="..\src\core\windows\SDL_windows.c" />
<ClCompile Include="..\src\core\windows\SDL_xinput.c" />
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_common.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_direct3d.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_xaml.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\cpuinfo\SDL_cpuinfo.c" />
<ClCompile Include="..\src\dynapi\SDL_dynapi.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\src\dialog\SDL_dialog_utils.c" />
<ClCompile Include="..\src\events\SDL_categories.c" />
<ClCompile Include="..\src\events\SDL_clipboardevents.c" />
<ClCompile Include="..\src\events\SDL_displayevents.c" />
<ClCompile Include="..\src\events\SDL_dropevents.c" />
<ClCompile Include="..\src\events\SDL_events.c" />
<ClCompile Include="..\src\events\SDL_keyboard.c" />
<ClCompile Include="..\src\events\SDL_keymap.c" />
<ClCompile Include="..\src\events\SDL_mouse.c" />
<ClCompile Include="..\src\events\SDL_pen.c" />
<ClCompile Include="..\src\events\SDL_quit.c" />
<ClCompile Include="..\src\events\SDL_touch.c" />
<ClCompile Include="..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\src\filesystem\winrt\SDL_sysfilesystem.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\file\SDL_iostream.c" />
<ClCompile Include="..\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="..\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="..\src\gpu\SDL_gpu.c "/>
<ClCompile Include="..\src\gpu\d3d11\SDL_gpu_d3d11.c "/>
<ClCompile Include="..\src\gpu\d3d12\SDL_gpu_d3d12.c "/>
<ClCompile Include="..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\src\joystick\controller_type.c" />
<ClCompile Include="..\src\joystick\SDL_gamepad.c" />
<ClCompile Include="..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c" />
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\src\joystick\windows\SDL_windows_gaming_input.c" />
<ClCompile Include="..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\src\locale\SDL_locale.c" />
<ClCompile Include="..\src\locale\winrt\SDL_syslocale.c" />
<ClCompile Include="..\src\main\SDL_runapp.c" />
<ClCompile Include="..\src\main\generic\SDL_sysmain_callbacks.c" />
<ClCompile Include="..\src\main\SDL_main_callbacks.c" />
<ClCompile Include="..\src\main\winrt\SDL_sysmain_runapp.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\misc\SDL_url.c" />
<ClCompile Include="..\src\misc\winrt\SDL_sysurl.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\power\SDL_power.c" />
<ClCompile Include="..\src\power\winrt\SDL_syspower.cpp">
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\render\direct3d11\SDL_render_d3d11.c" />
<ClCompile Include="..\src\render\direct3d11\SDL_render_winrt.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\render\direct3d11\SDL_shaders_d3d11.c" />
<ClCompile Include="..\src\render\opengles2\SDL_render_gles2.c" />
<ClCompile Include="..\src\render\opengles2\SDL_shaders_gles2.c" />
<ClCompile Include="..\src\render\SDL_d3dmath.c" />
<ClCompile Include="..\src\render\SDL_render.c" />
<ClCompile Include="..\src\render\SDL_render_unsupported.c" />
<ClCompile Include="..\src\render\SDL_yuv_sw.c" />
<ClCompile Include="..\src\render\software\SDL_blendfillrect.c" />
<ClCompile Include="..\src\render\software\SDL_blendline.c" />
<ClCompile Include="..\src\render\software\SDL_blendpoint.c" />
<ClCompile Include="..\src\render\software\SDL_drawline.c" />
<ClCompile Include="..\src\render\software\SDL_drawpoint.c" />
<ClCompile Include="..\src\render\software\SDL_render_sw.c" />
<ClCompile Include="..\src\render\software\SDL_rotate.c" />
<ClCompile Include="..\src\render\software\SDL_triangle.c" />
<ClCompile Include="..\src\SDL.c" />
<ClCompile Include="..\src\SDL_assert.c" />
<ClCompile Include="..\src\SDL_hashtable.c" />
<ClCompile Include="..\src\SDL_list.c" />
<ClCompile Include="..\src\SDL_error.c" />
<ClCompile Include="..\src\SDL_guid.c" />
<ClCompile Include="..\src\SDL_hints.c" />
<ClCompile Include="..\src\SDL_log.c" />
<ClCompile Include="..\src\SDL_properties.c" />
<ClCompile Include="..\src\SDL_utils.c" />
<ClCompile Include="..\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="..\src\sensor\SDL_sensor.c" />
<ClCompile Include="..\src\stdlib\SDL_crc16.c" />
<ClCompile Include="..\src\stdlib\SDL_crc32.c" />
<ClCompile Include="..\src\stdlib\SDL_getenv.c" />
<ClCompile Include="..\src\stdlib\SDL_iconv.c" />
<ClCompile Include="..\src\stdlib\SDL_malloc.c" />
<ClCompile Include="..\src\stdlib\SDL_memcpy.c" />
<ClCompile Include="..\src\stdlib\SDL_memmove.c" />
<ClCompile Include="..\src\stdlib\SDL_memset.c" />
<ClCompile Include="..\src\stdlib\SDL_mslibc.c" />
<MASM Condition="'$(Platform)'=='x64'" Include="..\src\stdlib\SDL_mslibc_x64.masm" >
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</MASM>
<ClCompile Include="..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\src\stdlib\SDL_random.c" />
<ClCompile Include="..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\src\storage\generic\SDL_genericstorage.c" />
<ClCompile Include="..\src\storage\SDL_storage.c" />
<ClCompile Include="..\src\thread\generic\SDL_syssem.c" />
<ClCompile Include="..\src\thread\SDL_thread.c" />
<ClCompile Include="..\src\thread\stdcpp\SDL_syscond.cpp">
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_sysmutex.cpp">
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_sysrwlock.cpp">
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_systhread.cpp">
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\src\timer\SDL_timer.c" />
<ClCompile Include="..\src\timer\windows\SDL_systimer.c" />
<ClCompile Include="..\src\time\SDL_time.c" />
<ClCompile Include="..\src\time\windows\SDL_systime.c" />
<ClCompile Include="..\src\video\dummy\SDL_nullevents.c" />
<ClCompile Include="..\src\video\dummy\SDL_nullframebuffer.c" />
<ClCompile Include="..\src\video\dummy\SDL_nullvideo.c" />
<ClCompile Include="..\src\video\SDL_blit.c" />
<ClCompile Include="..\src\video\SDL_blit_0.c" />
<ClCompile Include="..\src\video\SDL_blit_1.c" />
<ClCompile Include="..\src\video\SDL_blit_A.c" />
<ClCompile Include="..\src\video\SDL_blit_auto.c" />
<ClCompile Include="..\src\video\SDL_blit_copy.c" />
<ClCompile Include="..\src\video\SDL_blit_N.c" />
<ClCompile Include="..\src\video\SDL_blit_slow.c" />
<ClCompile Include="..\src\video\SDL_bmp.c" />
<ClCompile Include="..\src\video\SDL_clipboard.c" />
<ClCompile Include="..\src\video\SDL_egl.c" />
<ClCompile Include="..\src\video\SDL_fillrect.c" />
<ClCompile Include="..\src\video\SDL_pixels.c" />
<ClCompile Include="..\src\video\SDL_rect.c" />
<ClCompile Include="..\src\video\SDL_RLEaccel.c" />
<ClCompile Include="..\src\video\SDL_stretch.c" />
<ClCompile Include="..\src\video\SDL_surface.c" />
<ClCompile Include="..\src\video\SDL_video.c" />
<ClCompile Include="..\src\video\SDL_video_unsupported.c" />
<ClCompile Include="..\src\video\SDL_yuv.c" />
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtgamebar.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtkeyboard.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtmessagebox.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtmouse.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtopengles.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtpointerinput.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_sse.c" />
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_std.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<ProjectName>SDL3-UWP</ProjectName>
<RootNamespace>SDL3</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL3</TargetName>
<IncludePath>$(SolutionDir)/../src;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)\..\include;$(ProjectDir)\..\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
<ClCompile>
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

View File

@ -1,979 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{fa0ff2df-c3d6-498a-96f1-1f88e7ce0da3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{68e1b30b-19ed-4612-93e4-6260c5a979e5}</UniqueIdentifier>
</Filter>
<Filter Include="main">
<UniqueIdentifier>{00004a2523fc69c7128c60648c860000}</UniqueIdentifier>
</Filter>
<Filter Include="main\generic">
<UniqueIdentifier>{0000318d975e0a2867ab1d5727bf0000}</UniqueIdentifier>
</Filter>
<Filter Include="camera">
<UniqueIdentifier>{00009e5236c2ac679fe0bc30beb90000}</UniqueIdentifier>
</Filter>
<Filter Include="camera\dummy">
<UniqueIdentifier>{000031d805439b865ff4550d2f620000}</UniqueIdentifier>
</Filter>
<Filter Include="filesystem">
<UniqueIdentifier>{00004389761f0ae646deb5a3d65f0000}</UniqueIdentifier>
</Filter>
<Filter Include="filesystem\windows">
<UniqueIdentifier>{0000bc587ef6c558d75ce2e620cb0000}</UniqueIdentifier>
</Filter>
<Filter Include="time">
<UniqueIdentifier>{0000948771d0040a6a55997a7f1e0000}</UniqueIdentifier>
</Filter>
<Filter Include="time\windows">
<UniqueIdentifier>{0000012051ca8361c8e1013aee1d0000}</UniqueIdentifier>
</Filter>
<Filter Include="dialog">
<UniqueIdentifier>{0000c99bfadbbcb05a474a8472910000}</UniqueIdentifier>
</Filter>
<Filter Include="main\winrt">
<UniqueIdentifier>{00006680a11742e2b280c6453be80000}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\SDL3\SDL_begin_code.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_camera.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_close_code.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_assert.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_atomic.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_audio.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_blendmode.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_clipboard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_copying.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_cpuinfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_egl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_error.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_events.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_filesystem.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_guid.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_haptic.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_hints.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_hidapi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_input.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_joystick.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_keyboard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_keycode.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_loadso.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_locale.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_log.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_main.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_mouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_mutex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_opengles2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_pen.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_pixels.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_platform.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_platform_defines.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_power.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_rect.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_render.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_revision.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_iostream.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_scancode.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_stdinc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_surface.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_system.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_thread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_timer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_touch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_version.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_video.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\camera\SDL_camera_c.h">
<Filter>camera</Filter>
</ClInclude>
<ClInclude Include="..\src\camera\SDL_syscamera.h">
<Filter>camera</Filter>
</ClInclude>
<ClInclude Include="..\src\filesystem\SDL_sysfilesystem.h">
<Filter>filesystem</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\SDL_gamepad_c.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\SDL_gamepad_db.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\disk\SDL_diskaudio.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\dummy\SDL_dummyaudio.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_audiodev_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_audio_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_sysaudio.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_audioqueue.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_audioresample.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\SDL_wave.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\windows\SDL_directx.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\windows\SDL_windows.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\windows\SDL_xinput.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_common.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_direct3d.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_xaml.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\cpuinfo\SDL_cpuinfo_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\dynapi\SDL_dynapi.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\dynapi\SDL_dynapi_overrides.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\dynapi\SDL_dynapi_procs.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\blank_cursor.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\default_cursor.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_clipboardevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_dropevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_events_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_keyboard_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_keymap_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_mouse_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_touch_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_windowevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\SDL_haptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\SDL_syshaptic.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\windows\SDL_windowsjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\main\SDL_main_callbacks.h">
<Filter>main</Filter>
</ClInclude>
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\opengles2\SDL_gles2funcs.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\opengles2\SDL_shaders_gles2.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\SDL_d3dmath.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\SDL_sysrender.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\SDL_yuv_sw_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_blendfillrect.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_blendline.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_blendpoint.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_draw.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_drawline.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_drawpoint.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_render_sw_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_rotate.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\software\SDL_triangle.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_assert_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_error_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_fatal.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_hashtable.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_hints_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_internal.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_log_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_properties_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\locale\SDL_syslocale.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\thread\SDL_systhread.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\thread\SDL_thread_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\thread\stdcpp\SDL_sysmutex_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\thread\stdcpp\SDL_systhread_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\timer\SDL_timer_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\dummy\SDL_nullevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\dummy\SDL_nullframebuffer_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\dummy\SDL_nullvideo.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_blit.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_blit_auto.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_blit_copy.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_blit_slow.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_egl_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_pixels_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_rect_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_RLEaccel_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_surface_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_sysvideo.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_sysvideocapture.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtmessagebox.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtmouse_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\audio\wasapi\SDL_wasapi.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_list.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\windows\SDL_dinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\windows\SDL_windowshaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_yuv_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\render\direct3d11\SDL_shaders_d3d11.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_sensor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\sensor\SDL_sensor_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\sensor\SDL_syssensor.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\events\SDL_displayevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_misc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClCompile Include="..\src\atomic\SDL_atomic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\atomic\SDL_spinlock.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\disk\SDL_diskaudio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\dummy\SDL_dummyaudio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audiocvt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audiodev.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audiotypecvt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audioqueue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_audioresample.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_mixer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\SDL_wave.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi_winrt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\camera\dummy\SDL_camera_dummy.c">
<Filter>camera\dummy</Filter>
</ClCompile>
<ClCompile Include="..\src\camera\SDL_camera.c">
<Filter>camera</Filter>
</ClCompile>
<ClCompile Include="..\src\core\SDL_core_unsupported.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\windows\SDL_windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\windows\SDL_xinput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_common.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_direct3d.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_xaml.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cpuinfo\SDL_cpuinfo.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\dialog\SDL_dialog_utils.c">
<Filter>dialog</Filter>
</ClCompile>
<ClCompile Include="..\src\dynapi\SDL_dynapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_clipboardevents.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_dropevents.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_events.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_keyboard.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_keymap.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_mouse.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_pen.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_quit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_touch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_windowevents.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\filesystem\SDL_filesystem.c">
<Filter>filesystem</Filter>
</ClCompile>
<ClCompile Include="..\src\filesystem\windows\SDL_sysfsops.c">
<Filter>filesystem\windows</Filter>
</ClCompile>
<ClCompile Include="..\src\filesystem\winrt\SDL_sysfilesystem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\file\SDL_iostream.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\dummy\SDL_syshaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\SDL_haptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\hidapi\SDL_hidapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\SDL_gamepad.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\SDL_joystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\windows\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\main\generic\SDL_sysmain_callbacks.c">
<Filter>main\generic</Filter>
</ClCompile>
<ClCompile Include="..\src\main\SDL_main_callbacks.c">
<Filter>main</Filter>
</ClCompile>
<ClCompile Include="..\src\main\SDL_runapp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\main\winrt\SDL_sysmain_runapp.cpp">
<Filter>main\winrt</Filter>
</ClCompile>
<ClCompile Include="..\src\power\SDL_power.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\power\winrt\SDL_syspower.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\direct3d11\SDL_render_d3d11.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\direct3d11\SDL_render_winrt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\opengles2\SDL_render_gles2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\opengles2\SDL_shaders_gles2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\SDL_d3dmath.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\SDL_render.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\SDL_render_unsupported.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\SDL_yuv_sw.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_blendfillrect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_blendline.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_blendpoint.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_drawline.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_drawpoint.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_render_sw.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_rotate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\software\SDL_triangle.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_assert.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_error.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_guid.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_hashtable.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_hints.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_list.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_log.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_utils.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_properties.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\locale\SDL_locale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\locale\winrt\SDL_syslocale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_crc16.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_crc32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_getenv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_iconv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_malloc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_memcpy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_memmove.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_memset.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_qsort.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_random.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_stdlib.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\generic\SDL_syssem.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\SDL_thread.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_syscond.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_sysmutex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_sysrwlock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\thread\stdcpp\SDL_systhread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\timer\SDL_timer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\timer\windows\SDL_systimer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\time\SDL_time.c">
<Filter>time</Filter>
</ClCompile>
<ClCompile Include="..\src\time\windows\SDL_systime.c">
<Filter>time\windows</Filter>
</ClCompile>
<ClCompile Include="..\src\video\dummy\SDL_nullevents.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\dummy\SDL_nullframebuffer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\dummy\SDL_nullvideo.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_0.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_A.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_auto.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_copy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_N.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_blit_slow.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_bmp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_clipboard.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_egl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_fillrect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_pixels.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_rect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_RLEaccel.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_stretch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_surface.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_video_unsupported.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtkeyboard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtmessagebox.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtmouse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtopengles.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtpointerinput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\winrt\SDL_winrtgamebar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\windows\SDL_windowshaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_yuv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\render\direct3d11\SDL_shaders_d3d11.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\sensor\SDL_sensor.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\sensor\dummy\SDL_dummysensor.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_displayevents.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\winrt\SDL_sysurl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\SDL_url.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClInclude Include="..\src\joystick\controller_type.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_main_impl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\video\SDL_clipboard_c.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\joystick\windows\SDL_windows_gaming_input.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\joystick\controller_type.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stdlib\SDL_mslibc.c">
<Filter>Source Files</Filter>
</ClCompile>
<MASM Include="..\src\stdlib\SDL_mslibc_x64.masm">
<Filter>stdlib</Filter>
</MASM>
<ClCompile Include="..\src\core\windows\pch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\core\windows\pch_cpp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="a430d85b-5cf1-4705-9fe1-7da520f91d4b"
Publisher="CN=Daniel"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="a430d85b-5cf1-4705-9fe1-7da520f91d4b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>testdraw</DisplayName>
<PublisherDisplayName>Daniel</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="testdraw.App">
<uap:VisualElements
DisplayName="testdraw"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="testdraw"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View File

@ -1,335 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{95943bbe-f378-4068-a3fd-dae1b8309b6e}</ProjectGuid>
<Keyword>DirectXApp</Keyword>
<RootNamespace>testdraw</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.props" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.props" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);..\..\include</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
<ClCompile>
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Image Include="Assets\LockScreenLogo.scale-200.png" />
<Image Include="Assets\SplashScreen.scale-200.png" />
<Image Include="Assets\Square150x150Logo.scale-200.png" />
<Image Include="Assets\Square44x44Logo.scale-200.png" />
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Image Include="Assets\StoreLogo.png" />
<Image Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL-UWP.vcxproj">
<Project>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
<ClCompile Include="..\..\src\test\SDL_test_compare.c" />
<ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
<ClCompile Include="..\..\src\test\SDL_test_font.c" />
<ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
<ClCompile Include="..\..\src\test\SDL_test_harness.c" />
<ClCompile Include="..\..\src\test\SDL_test_log.c" />
<ClCompile Include="..\..\src\test\SDL_test_md5.c" />
<ClCompile Include="..\..\src\test\SDL_test_memory.c" />
<ClCompile Include="..\..\test\main.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\test\testdraw.c">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsWinRT>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\main\winrt\SDL3-WinRTResource_BlankCursor.cur" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\main\winrt\SDL3-WinRTResources.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
</ImportGroup>
</Project>

View File

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>95943bbe-f378-4068-a3fd-dae1b8309b6e</UniqueIdentifier>
</Filter>
<Filter Include="Assets">
<UniqueIdentifier>dad3d573-ab33-428d-ae70-6098066c27e7</UniqueIdentifier>
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>
</Filter>
<Filter Include="Content">
<UniqueIdentifier>e4caa635-e149-44c2-8915-48ffa6ac48f7</UniqueIdentifier>
</Filter>
<Image Include="Assets\LockScreenLogo.scale-200.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-200.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-200.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-200.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-200.png">
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Image Include="Assets\StoreLogo.png">
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\test\main.cpp">
<Filter>Content</Filter>
</ClCompile>
<ClCompile Include="..\..\test\testdraw.c">
<Filter>Content</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_assert.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_common.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_compare.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_crc32.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_font.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_fuzzer.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_harness.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_log.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_md5.c">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\test\SDL_test_memory.c">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\main\winrt\SDL3-WinRTResource_BlankCursor.cur" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\main\winrt\SDL3-WinRTResources.rc" />
</ItemGroup>
</Project>

View File

@ -3117,11 +3117,6 @@ typedef SDL_Colour, SDL_Color;
+ SDL_Color + SDL_Color
@@ @@
@@ @@
- SDL_WinRTGetFSPathUTF8
+ SDL_GetWinRTFSPath
(...)
@@
@@
- SDL_iPhoneSetAnimationCallback - SDL_iPhoneSetAnimationCallback
+ SDL_SetiOSAnimationCallback + SDL_SetiOSAnimationCallback
(...) (...)
@ -3527,11 +3522,6 @@ typedef SDL_Colour, SDL_Color;
(...) (...)
@@ @@
@@ @@
- SDL_WinRTGetDeviceFamily
+ SDL_GetWinRTDeviceFamily
(...)
@@
@@
- SDL_LinuxSetThreadPriority - SDL_LinuxSetThreadPriority
+ SDL_SetLinuxThreadPriority + SDL_SetLinuxThreadPriority
(...) (...)

View File

@ -591,7 +591,6 @@ foreach (@ARGV) {
process_xcode($arg, 'Xcode/SDL/SDL.xcodeproj/project.pbxproj'); process_xcode($arg, 'Xcode/SDL/SDL.xcodeproj/project.pbxproj');
process_visualstudio($arg, 'VisualC/SDL/SDL.vcxproj'); process_visualstudio($arg, 'VisualC/SDL/SDL.vcxproj');
process_visualstudio($arg, 'VisualC-GDK/SDL/SDL.vcxproj'); process_visualstudio($arg, 'VisualC-GDK/SDL/SDL.vcxproj');
process_visualstudio($arg, 'VisualC-WinRT/SDL-UWP.vcxproj');
} }
print("Done. Please run `git diff` and make sure this looks okay!\n"); print("Done. Please run `git diff` and make sure this looks okay!\n");

View File

@ -129,7 +129,6 @@ RENAMED_MACROS = {
"__VITA__": "SDL_PLATFORM_VITA", "__VITA__": "SDL_PLATFORM_VITA",
"__3DS__": "SDL_PLATFORM_3DS", "__3DS__": "SDL_PLATFORM_3DS",
# "__unix__": "SDL_PLATFORM_UNIX, # "__unix__": "SDL_PLATFORM_UNIX,
"__WINRT__": "SDL_PLATFORM_WINRT",
"__XBOXSERIES__": "SDL_PLATFORM_XBOXSERIES", "__XBOXSERIES__": "SDL_PLATFORM_XBOXSERIES",
"__XBOXONE__": "SDL_PLATFORM_XBOXONE", "__XBOXONE__": "SDL_PLATFORM_XBOXONE",
"__WINDOWS__": "SDL_PLATFORM_WINDOWS", "__WINDOWS__": "SDL_PLATFORM_WINDOWS",
@ -145,6 +144,7 @@ DEPRECATED_PLATFORM_MACROS = {
"__NACL__", "__NACL__",
"__PNACL__", "__PNACL__",
"__WINDOWS__", "__WINDOWS__",
"__WINRT__",
"SDL_ALTIVEC_BLITTERS", "SDL_ALTIVEC_BLITTERS",
"SDL_ARM_NEON_BLITTERS", "SDL_ARM_NEON_BLITTERS",
"SDL_ARM_SIMD_BLITTERS", "SDL_ARM_SIMD_BLITTERS",

View File

@ -21,12 +21,6 @@ endif()
message(STATUS "CMAKE_SYSTEM_NAME= ${CMAKE_SYSTEM_NAME}") message(STATUS "CMAKE_SYSTEM_NAME= ${CMAKE_SYSTEM_NAME}")
message(STATUS "CMAKE_SYSTEM_PROCESSOR= ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_SYSTEM_PROCESSOR= ${CMAKE_SYSTEM_PROCESSOR}")
if(WINDOWS_STORE)
enable_language(CXX)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/ZW>")
set_source_files_properties(ain_cli.c main_gui.c PROPERTIES LANGUAGE CXX)
endif()
include(GenerateExportHeader) include(GenerateExportHeader)
if(ANDROID) if(ANDROID)

View File

@ -836,6 +836,9 @@ The following hints have been removed:
* SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING - SDL now properly handles the 0x406D1388 Exception if no debugger intercepts it, preventing its propagation. * SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING - SDL now properly handles the 0x406D1388 Exception if no debugger intercepts it, preventing its propagation.
* SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS - Slim Reader/Writer Locks are always used if available * SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS - Slim Reader/Writer Locks are always used if available
* SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 - replaced with SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, defaulting to SDL_TRUE * SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 - replaced with SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, defaulting to SDL_TRUE
* SDL_HINT_WINRT_HANDLE_BACK_BUTTON - WinRT support was removed in SDL3.
* SDL_HINT_WINRT_PRIVACY_POLICY_LABEL - WinRT support was removed in SDL3.
* SDL_HINT_WINRT_PRIVACY_POLICY_URL - WinRT support was removed in SDL3.
* SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING * SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING
* SDL_HINT_AUDIO_DEVICE_APP_NAME - replaced by either using the appname param to SDL_SetAppMetadata() or setting SDL_PROP_APP_METADATA_NAME_STRING with SDL_SetAppMetadataProperty() * SDL_HINT_AUDIO_DEVICE_APP_NAME - replaced by either using the appname param to SDL_SetAppMetadata() or setting SDL_PROP_APP_METADATA_NAME_STRING with SDL_SetAppMetadataProperty()
@ -1118,11 +1121,14 @@ Using it is really simple: Just `#include <SDL3/SDL_main.h>` in the source file
Several platform-specific entry point functions have been removed as unnecessary. If for some reason you explicitly need them, here are easy replacements: Several platform-specific entry point functions have been removed as unnecessary. If for some reason you explicitly need them, here are easy replacements:
```c ```c
#define SDL_WinRTRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
#define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL) #define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL)
#define SDL_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED) #define SDL_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
``` ```
The following functions have been removed:
* SDL_WinRTRunApp() - WinRT support was removed in SDL3.
## SDL_messagebox.h ## SDL_messagebox.h
The buttonid field of SDL_MessageBoxButtonData has been renamed buttonID. The buttonid field of SDL_MessageBoxButtonData has been renamed buttonID.
@ -1275,7 +1281,6 @@ The following platform preprocessor macros have been renamed:
| `__VITA__` | `SDL_PLATFORM_VITA` | | `__VITA__` | `SDL_PLATFORM_VITA` |
| `__WIN32__` | `SDL_PLATFORM_WIN32` | | `__WIN32__` | `SDL_PLATFORM_WIN32` |
| `__WINGDK__` | `SDL_PLATFORM_WINGDK` | | `__WINGDK__` | `SDL_PLATFORM_WINGDK` |
| `__WINRT__` | `SDL_PLATFORM_WINRT` |
| `__XBOXONE__` | `SDL_PLATFORM_XBOXONE` | | `__XBOXONE__` | `SDL_PLATFORM_XBOXONE` |
| `__XBOXSERIES__` | `SDL_PLATFORM_XBOXSERIES` | | `__XBOXSERIES__` | `SDL_PLATFORM_XBOXSERIES` |
@ -1288,6 +1293,8 @@ The following platform preprocessor macros have been removed:
* `__NACL__` * `__NACL__`
* `__PNACL__` * `__PNACL__`
* `__WINDOWS__` * `__WINDOWS__`
* `__WINRT__`
## SDL_quit.h ## SDL_quit.h
@ -1850,10 +1857,12 @@ SDL_RequestAndroidPermission is no longer a blocking call; the caller now provid
SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump() have been renamed to SDL_SetiOSAnimationCallback() and SDL_SetiOSEventPump(), respectively. SDL2 has had macros to provide this new name with the old symbol since the introduction of the iPad, but now the correctly-named symbol is the only option. SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump() have been renamed to SDL_SetiOSAnimationCallback() and SDL_SetiOSEventPump(), respectively. SDL2 has had macros to provide this new name with the old symbol since the introduction of the iPad, but now the correctly-named symbol is the only option.
The following functions have been removed: The following functions have been removed:
* SDL_GetWinRTFSPathUNICODE() - WinRT support was removed in SDL3.
* SDL_GetWinRTFSPathUTF8() - WinRT support was removed in SDL3.
* SDL_RenderGetD3D11Device() - replaced with the "SDL.renderer.d3d11.device" property * SDL_RenderGetD3D11Device() - replaced with the "SDL.renderer.d3d11.device" property
* SDL_RenderGetD3D12Device() - replaced with the "SDL.renderer.d3d12.device" property * SDL_RenderGetD3D12Device() - replaced with the "SDL.renderer.d3d12.device" property
* SDL_RenderGetD3D9Device() - replaced with the "SDL.renderer.d3d9.device" property * SDL_RenderGetD3D9Device() - replaced with the "SDL.renderer.d3d9.device" property
* SDL_GetWinRTFSPathUNICODE() - Use SDL_GetWinRTFSPath() and SDL_iconv_string to convert from UTF-8 to UTF-16. * SDL_WinRTGetDeviceFamily() - WinRT support was removed in SDL3.
The following functions have been renamed: The following functions have been renamed:
* SDL_AndroidBackButton() => SDL_SendAndroidBackButton() * SDL_AndroidBackButton() => SDL_SendAndroidBackButton()
@ -1874,8 +1883,6 @@ The following functions have been renamed:
* SDL_LinuxSetThreadPriorityAndPolicy() => SDL_SetLinuxThreadPriorityAndPolicy(), returns SDL_bool * SDL_LinuxSetThreadPriorityAndPolicy() => SDL_SetLinuxThreadPriorityAndPolicy(), returns SDL_bool
* SDL_OnApplicationDidBecomeActive() => SDL_OnApplicationDidEnterForeground() * SDL_OnApplicationDidBecomeActive() => SDL_OnApplicationDidEnterForeground()
* SDL_OnApplicationWillResignActive() => SDL_OnApplicationWillEnterBackground() * SDL_OnApplicationWillResignActive() => SDL_OnApplicationWillEnterBackground()
* SDL_WinRTGetDeviceFamily() => SDL_GetWinRTDeviceFamily()
* SDL_GetWinRTFSPathUTF8() => SDL_GetWinRTFSPath()
* SDL_iOSSetAnimationCallback() => SDL_SetiOSAnimationCallback(), returns SDL_bool * SDL_iOSSetAnimationCallback() => SDL_SetiOSAnimationCallback(), returns SDL_bool
* SDL_iOSSetEventPump() => SDL_SetiOSEventPump() * SDL_iOSSetEventPump() => SDL_SetiOSEventPump()
* SDL_iPhoneSetAnimationCallback() => SDL_SetiOSAnimationCallback(), returns SDL_bool * SDL_iPhoneSetAnimationCallback() => SDL_SetiOSAnimationCallback(), returns SDL_bool

View File

@ -5,7 +5,7 @@ Porting
The first thing you have to do when porting to a new platform, is look at The first thing you have to do when porting to a new platform, is look at
include/SDL_platform.h and create an entry there for your operating system. include/SDL_platform.h and create an entry there for your operating system.
The standard format is "__PLATFORM__", where PLATFORM is the name of the OS. The standard format is "SDL_PLATFORM_X", where X is the name of the OS.
Ideally SDL_platform_defines.h will be able to auto-detect the system it's building Ideally SDL_platform_defines.h will be able to auto-detect the system it's building
on based on C preprocessor symbols. on based on C preprocessor symbols.

View File

@ -1,5 +1,11 @@
# Windows # Windows
## Old systems
WinRT, Windows Phone, and UWP are no longer supported.
All desktop Windows versions, back to Windows XP, are still supported.
## LLVM and Intel C++ compiler support ## LLVM and Intel C++ compiler support
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++ SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++

View File

@ -1,483 +0,0 @@
WinRT
=====
This port allows SDL applications to run on Microsoft's platforms that require
use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases,
refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
In the past, SDL has supported Windows RT 8.x, Windows Phone, etc, but in
modern times this port is focused on UWP apps, which run on Windows 10,
and modern Xbox consoles.
Requirements
------------
* Microsoft Visual C++ (aka Visual Studio) 2019.
- Free, "Community" or "Express" editions may be used, so long as they
include support for either "Windows Store" or "Windows Phone" apps.
"Express" versions marked as supporting "Windows Desktop" development
typically do not include support for creating WinRT apps, to note.
(The "Community" editions of Visual C++ do, however, support both
desktop/Win32 and WinRT development).
* A valid Microsoft account - This requirement is not imposed by SDL, but
rather by Microsoft's Visual C++ toolchain. This is required to launch or
debug apps.
Status
------
Here is a rough list of what works, and what doesn't:
* What works:
* compilation via Visual C++ 2019.
* compile-time platform detection for SDL programs. The C/C++ #define,
`SDL_PLATFORM_WINRT`, will be set to 1 (by SDL) when compiling for WinRT.
* GPU-accelerated 2D rendering, via SDL_Renderer.
* OpenGL ES 2, via the ANGLE library (included separately from SDL)
* software rendering, via either SDL_Surface (optionally in conjunction with
SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the
SDL_Renderer APIs
* threads
* timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(),
SDL_GetPerformanceFrequency(), etc.)
* file I/O via SDL_IOStream
* mouse input (unsupported on Windows Phone)
* audio, via SDL's WASAPI backend (if you want to record, your app must
have "Microphone" capabilities enabled in its manifest, and the user must
not have blocked access. Otherwise, recording devices will fail to work,
presenting as a device disconnect shortly after opening it.)
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
anything outside of the app is not supported.
* system path retrieval via SDL's filesystem APIs
* game controllers. Support is provided via the SDL_Joystick and
SDL_Gamepad APIs, and is backed by Microsoft's XInput API. Please
note, however, that Windows limits game-controller support in UWP apps to,
"Xbox compatible controllers" (many controllers that work in Win32 apps,
do not work in UWP, due to restrictions in UWP itself.)
* multi-touch input
* app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as
appropriate.
* window events
* using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can
choose to render content directly via Direct3D, using SDL to manage the
internal WinRT window, as well as input and audio. (Use
the window properties to get the WinRT 'CoreWindow', and pass it into
IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.)
* What partially works:
* keyboard input. Most of WinRT's documented virtual keys are supported, as
well as many keys with documented hardware scancodes. Converting
SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs
(MapVirtualKey()) in Microsoft's Windows Store / UWP APIs.
* SDL_main. WinRT uses a different signature for each app's main() function
and requires it to be implemented in C++, so SDL_main.h must be #include'd
in a C++ source file, that also must be compiled with /ZW.
* What doesn't work:
* compilation with anything other than Visual C++
* programmatically-created custom cursors. These don't appear to be supported
by WinRT. Different OS-provided cursors can, however, be created via
SDL_CreateSystemCursor() (unsupported on Windows Phone)
* SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently
supported by WinRT itself.
* joysticks and game controllers that either are not supported by
Microsoft's XInput API, or are not supported within UWP apps (many
controllers that work in Win32, do not work in UWP, due to restrictions in
UWP itself).
* turning off VSync when rendering on Windows Phone. Attempts to turn VSync
off on Windows Phone result either in Direct3D not drawing anything, or it
forcing VSync back on. As such, vsync will always get turned-on on Windows
Phone. This limitation is not present in non-Phone WinRT (such as Windows 8.x),
where turning off VSync appears to work.
* probably anything else that's not listed as supported
Setup, High-Level Steps
-----------------------
The steps for setting up a project for an SDL/WinRT app looks like the
following, at a high-level:
1. create a new Visual C++ project using Microsoft's template for a,
"Direct3D App".
2. remove most of the files from the project.
3. make your app's project directly reference SDL/WinRT's own Visual C++
project file, via use of Visual C++'s "References" dialog. This will setup
the linker, and will copy SDL's .dll files to your app's final output.
4. adjust your app's build settings, at minimum, telling it where to find SDL's
header files.
5. add files that contains a WinRT-appropriate main function, along with some
data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls)
work properly.
6. add SDL-specific app code.
7. build and run your app.
Setup, Detailed Steps
---------------------
### 1. Create a new project ###
Create a new project using one of Visual C++'s templates for a plain, non-XAML,
"Direct3D App" (XAML support for SDL/WinRT is not yet ready for use). If you
don't see one of these templates, in Visual C++'s 'New Project' dialog, try
using the textbox titled, 'Search Installed Templates' to look for one.
### 2. Remove unneeded files from the project ###
In the new project, delete any file that has one of the following extensions:
- .cpp
- .h
- .hlsl
When you are done, you should be left with a few files, each of which will be a
necessary part of your app's project. These files will consist of:
- an .appxmanifest file, which contains metadata on your WinRT app. This is
similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android.
- a few .png files, one of which is a splash screen (displayed when your app
launches), others are app icons.
- a .pfx file, used for code signing purposes.
### 3. Add references to SDL's project files ###
SDL/WinRT can be built in multiple variations, spanning across three different
CPU architectures (x86, x64, and ARM) and two different configurations
(Debug and Release). WinRT and Visual C++ do not currently provide a means
for combining multiple variations of one library into a single file.
Furthermore, it does not provide an easy means for copying pre-built .dll files
into your app's final output (via Post-Build steps, for example). It does,
however, provide a system whereby an app can reference the MSVC projects of
libraries such that, when the app is built:
1. each library gets built for the appropriate CPU architecture(s) and WinRT
platform(s).
2. each library's output, such as .dll files, get copied to the app's build
output.
To set this up for SDL/WinRT, you'll need to run through the following steps:
1. open up the Solution Explorer inside Visual C++ (under the "View" menu, then
"Solution Explorer")
2. right click on your app's solution.
3. navigate to "Add", then to "Existing Project..."
4. find SDL/WinRT's Visual C++ project file and open it, in the `VisualC-WinRT`
directory.
5. once the project has been added, right-click on your app's project and
select, "References..."
6. click on the button titled, "Add New Reference..."
7. check the box next to SDL
8. click OK to close the dialog
9. SDL will now show up in the list of references. Click OK to close that
dialog.
Your project is now linked to SDL's project, insofar that when the app is
built, SDL will be built as well, with its build output getting included with
your app.
### 4. Adjust Your App's Build Settings ###
Some build settings need to be changed in your app's project. This guide will
outline the following:
- making sure that the compiler knows where to find SDL's header files
- **Optional for C++, but NECESSARY for compiling C code:** telling the
compiler not to use Microsoft's C++ extensions for WinRT development.
- **Optional:** telling the compiler not generate errors due to missing
precompiled header files.
To change these settings:
1. right-click on the project
2. choose "Properties"
3. in the drop-down box next to "Configuration", choose, "All Configurations"
4. in the drop-down box next to "Platform", choose, "All Platforms"
5. in the left-hand list, expand the "C/C++" section
**Note:** If you don't see this section, you may have to add a .c or .cpp
Source file to the Project first.
6. select "General"
7. edit the "Additional Include Directories" setting, and add a path to SDL's
"include" directory
8. **Optional: to enable compilation of C code:** change the setting for
"Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're
working with a completely C++ based project, this step can usually be
omitted.
9. **Optional: to disable precompiled headers (which can produce
'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand
list, select "Precompiled Headers", then change the setting for "Precompiled
Header" from "Use (/Yu)" to "Not Using Precompiled Headers".
10. close the dialog, saving settings, by clicking the "OK" button
### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ###
A few files should be included directly in your app's MSVC project, specifically:
1. a WinRT-appropriate main function (which is different than main() functions on
other platforms)
2. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor
(if and when the app needs to do so). *If this cursor resource is not
included, mouse-position reporting may fail if and when the cursor is
hidden, due to possible bugs/design-oddities in Windows itself.*
To include these files for C/C++ projects:
1. right-click on your project (again, in Visual C++'s Solution Explorer),
navigate to "Add", then choose "Existing Item...".
2. navigate to the directory containing SDL's source code, then into its
subdirectory, 'src/main/winrt/'. Select, then add, the following files:
- `SDL3-WinRTResources.rc`
- `SDL3-WinRTResource_BlankCursor.cur`
3. For the next step you need a C++ source file.
- If your standard main() function is implemented in a **C++** source file,
use that file.
- If your standard main() function is implemented in a **plain C** source file,
create an empty .cpp source file (e.g. `main.cpp`) that only contains the line
`#include <SDL3/SDL_main.h>` and use that file instead.
4. Right click on the C++ source file from step 3 (as listed in your project),
then click on "Properties...".
5. in the drop-down box next to "Configuration", choose, "All Configurations"
6. in the drop-down box next to "Platform", choose, "All Platforms"
7. in the left-hand list, click on "C/C++"
8. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)".
9. click the OK button. This will close the dialog.
**NOTE: C++/CX compilation is currently required in at least one file of your
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_RunApp from your language's
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.
### 6. Add app code and assets ###
At this point, you can add in SDL-specific source code. Be sure to include a
C-style main function (ie: `int main(int argc, char *argv[])`). From there you
should be able to create a single `SDL_Window` (WinRT apps can only have one
window, at present), as well as an `SDL_Renderer`. Direct3D will be used to
draw content. Events are received via SDL's usual event functions
(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets,
you can start adding them to the project now. If not, or if you would like to
make sure that you're setup correctly, some short and simple sample code is
provided below.
#### 6.A. ... when creating a new app ####
If you are creating a new app (rather than porting an existing SDL-based app),
or if you would just like a simple app to test SDL/WinRT with before trying to
get existing code working, some working SDL/WinRT code is provided below. To
set this up:
1. right click on your app's project
2. select Add, then New Item. An "Add New Item" dialog will show up.
3. from the left-hand list, choose "Visual C++"
4. from the middle/main list, choose "C++ File (.cpp)"
5. near the bottom of the dialog, next to "Name:", type in a name for your
source file, such as, "main.cpp".
6. click on the Add button. This will close the dialog, add the new file to
your project, and open the file in Visual C++'s text editor.
7. Copy and paste the following code into the new file, then save it.
```c
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char **argv)
{
SDL_Window *window = NULL;
SDL_Renderer *renderer = NULL;
SDL_Event evt;
SDL_bool keep_going = SDL_TRUE;
if (!SDL_Init(SDL_INIT_VIDEO)) {
return 1;
} else if (!SDL_CreateWindowAndRenderer("Hello SDL", 0, 0, SDL_WINDOW_FULLSCREEN, &window, &renderer)) {
return 1;
}
while (keep_going) {
while (SDL_PollEvent(&evt)) {
if ((evt.type == SDL_EVENT_KEY_DOWN) && (evt.key.keysym.sym == SDLK_ESCAPE)) {
keep_going = SDL_FALSE;
}
}
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
SDL_Quit();
return 0;
}
```
#### 6.B. Adding code and assets ####
If you have existing code and assets that you'd like to add, you should be able
to add them now. The process for adding a set of files is as such.
1. right click on the app's project
2. select Add, then click on "New Item..."
3. open any source, header, or asset files as appropriate. Support for C and
C++ is available.
Do note that WinRT only supports a subset of the APIs that are available to
Win32-based apps. Many portions of the Win32 API and the C runtime are not
available.
A list of unsupported C APIs can be found at
<http://msdn.microsoft.com/en-us/library/windows/apps/jj606124.aspx>
General information on using the C runtime in WinRT can be found at
<https://msdn.microsoft.com/en-us/library/hh972425.aspx>
A list of supported Win32 APIs for WinRT apps can be found at
<http://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx>. To note,
the list of supported Win32 APIs for Windows Phone 8.0 is different.
That list can be found at
<http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662956(v=vs.105).aspx>
### 7. Build and run your app ###
Your app project should now be setup, and you should be ready to build your app.
To run it on the local machine, open the Debug menu and choose "Start
Debugging". This will build your app, then run your app full-screen. To switch
out of your app, press the Windows key. Alternatively, you can choose to run
your app in a window. To do this, before building and running your app, find
the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand
this by clicking on the arrow on the right side of the list, then click on
Simulator. Once you do that, any time you build and run the app, the app will
launch in window, rather than full-screen.
#### 7.A. Running apps on older, ARM-based, "Windows RT" devices ####
**These instructions do not include Windows Phone, despite Windows Phone
typically running on ARM processors.** They are specifically for devices
that use the "Windows RT" operating system, which was a modified version of
Windows 8.x that ran primarily on ARM-based tablet computers.
To build and run the app on ARM-based, "Windows RT" devices, you'll need to:
- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and
debugs ARM-based apps via IP networks.
- change a few options on the development machine, both to make sure it builds
for ARM (rather than x86 or x64), and to make sure it knows how to find the
Windows RT device (on the network).
Microsoft's Remote Debugger can be found at
<https://msdn.microsoft.com/en-us/library/hh441469.aspx>. Please note
that separate versions of this debugger exist for different versions of Visual
C++, one each for MSVC 2015, 2013, and 2012.
To setup Visual C++ to launch your app on an ARM device:
1. make sure the Remote Debugger is running on your ARM device, and that it's on
the same IP network as your development machine.
2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click
it, then change the value to "ARM".
3. make sure Visual C++ knows the hostname or IP address of the ARM device. To
do this:
1. open the app project's properties
2. select "Debugging"
3. next to "Machine Name", enter the hostname or IP address of the ARM
device
4. if, and only if, you've turned off authentication in the Remote Debugger,
then change the setting for "Require Authentication" to No
5. click "OK"
4. build and run the app (from Visual C++). The first time you do this, a
prompt will show up on the ARM device, asking for a Microsoft Account. You
do, unfortunately, need to log in here, and will need to follow the
subsequent registration steps in order to launch the app. After you do so,
if the app didn't already launch, try relaunching it again from within Visual
C++.
Troubleshooting
---------------
#### Build fails with message, "error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'"
Try adding the following to your linker flags. In MSVC, this can be done by
right-clicking on the app project, navigating to Configuration Properties ->
Linker -> Command Line, then adding them to the Additional Options
section.
* For Release builds / MSVC-Configurations, add:
/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib
* For Debug builds / MSVC-Configurations, add:
/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib
#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values
This may be caused by a bug in Windows itself, whereby hiding the mouse
cursor can cause mouse-position reporting to fail.
SDL provides a workaround for this, but it requires that an app links to a
set of Win32-style cursor image-resource files. A copy of suitable resource
files can be found in `src/main/winrt/`. Adding them to an app's Visual C++
project file should be sufficient to get the app to use them.
#### SDL's Visual Studio project file fails to open, with message, "The system can't find the file specified."
This can be caused for any one of a few reasons, which Visual Studio can
report, but won't always do so in an up-front manner.
To help determine why this error comes up:
1. open a copy of Visual Studio without opening a project file. This can be
accomplished via Windows' Start Menu, among other means.
2. show Visual Studio's Output window. This can be done by going to VS'
menu bar, then to View, and then to Output.
3. try opening the SDL project file directly by going to VS' menu bar, then
to File, then to Open, then to Project/Solution. When a File-Open dialog
appears, open the SDL project (such as the one in SDL's source code, in its
directory, VisualC-WinRT/UWP_VS2015/).
4. after attempting to open SDL's Visual Studio project file, additional error
information will be output to the Output window.
If Visual Studio reports (via its Output window) that the project:
"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:
Microsoft.VisualStudio.ComponentGroup.UWP.VC"
... then you will need to re-launch Visual Studio's installer, and make sure that
the workflow for "Universal Windows Platform development" is checked, and that its
optional component, "C++ Universal Windows Platform tools" is also checked. While
you are there, if you are planning on targeting UWP / Windows 10, also make sure
that you check the optional component, "Windows 10 SDK (10.0.10240.0)". After
making sure these items are checked as-appropriate, install them.
Once you install these components, try re-launching Visual Studio, and re-opening
the SDL project file. If you still get the error dialog, try using the Output
window, again, seeing what Visual Studio says about it.
#### Game controllers / joysticks aren't working!
Windows only permits certain game controllers and joysticks to work within
WinRT / UWP apps. Even if a game controller or joystick works in a Win32
app, that device is not guaranteed to work inside a WinRT / UWP app.
According to Microsoft, "Xbox compatible controllers" should work inside
UWP apps, potentially with more working in the future. This includes, but
may not be limited to, Microsoft-made Xbox controllers and USB adapters.
(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop)

View File

@ -48,7 +48,6 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [Raspberry Pi](README-raspberrypi.md) - [Raspberry Pi](README-raspberrypi.md)
- [RISC OS](README-riscos.md) - [RISC OS](README-riscos.md)
- [Windows GDK](README-gdk.md) - [Windows GDK](README-gdk.md)
- [Windows UWP](README-winrt.md)
- [Windows](README-windows.md) - [Windows](README-windows.md)
If you need help with the library, or just want to discuss SDL related If you need help with the library, or just want to discuss SDL related

View File

@ -23,12 +23,6 @@ if(NOT (MSVC AND SDL_CPU_ARM64))
find_package(OpenGL) find_package(OpenGL)
endif() endif()
if(WINDOWS_STORE)
cmake_minimum_required(VERSION 3.19)
# CMP0112: Target file component generator expressions do not add target dependencies.
cmake_policy(SET CMP0112 NEW)
endif()
set(SDL_EXAMPLE_EXECUTABLES) set(SDL_EXAMPLE_EXECUTABLES)
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY) if(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
@ -62,15 +56,6 @@ add_custom_target(copy-sdl-example-resources
DEPENDS "${RESOURCE_FILES_BINDIR}" DEPENDS "${RESOURCE_FILES_BINDIR}"
) )
if(WINDOWS_STORE)
add_library(sdl_example_main_callbacks_uwp OBJECT ${CMAKE_CURRENT_SOURCE_DIR}/../test/main.cpp)
target_link_libraries(sdl_example_main_callbacks_uwp PRIVATE SDL3::Headers)
target_compile_options(sdl_example_main_callbacks_uwp PRIVATE "/ZW")
target_compile_definitions(sdl_example_main_callbacks_uwp PRIVATE "SDL_MAIN_USE_CALLBACKS")
set_source_files_properties(${RESOURCE_FILES} PROPERTIES VS_DEPLOYENT_LOCATION "Assets")
endif()
macro(add_sdl_example_executable TARGET) macro(add_sdl_example_executable TARGET)
cmake_parse_arguments(AST "BUILD_DEPENDENT" "" "SOURCES;DATAFILES" ${ARGN}) cmake_parse_arguments(AST "BUILD_DEPENDENT" "" "SOURCES;DATAFILES" ${ARGN})
if(AST_UNPARSED_ARGUMENTS) if(AST_UNPARSED_ARGUMENTS)
@ -80,28 +65,6 @@ macro(add_sdl_example_executable TARGET)
message(FATAL_ERROR "add_sdl_example_executable needs at least one source") message(FATAL_ERROR "add_sdl_example_executable needs at least one source")
endif() endif()
set(EXTRA_SOURCES "") set(EXTRA_SOURCES "")
if(WINDOWS_STORE)
set(uwp_bindir "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir")
if(NOT IS_DIRECTORY "${uwp_bindir}")
execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${uwp_bindir}")
endif()
string(REGEX REPLACE "[_]" "" SAFE_TARGET "${TARGET}")
file(GENERATE OUTPUT "${uwp_bindir}/${TARGET}.appxmanifest"
INPUT "${CMAKE_CURRENT_SOURCE_DIR}/../test/uwp/Package.appxmanifest.in"
TARGET "${TARGET}"
)
set_property(SOURCE "${uwp_bindir}/${TARGET}.appxmanifest" PROPERTY VS_DEPLOYMENT_CONTENT 1)
list(APPEND EXTRA_SOURCES "$<TARGET_OBJECTS:sdl_example_main_callbacks_uwp>")
list(APPEND EXTRA_SOURCES
"${uwp_bindir}/${TARGET}.appxmanifest"
"${CMAKE_CURRENT_SOURCE_DIR}/../test/uwp/logo-50x50.png"
"${CMAKE_CURRENT_SOURCE_DIR}/../test/uwp/square-44x44.png"
"${CMAKE_CURRENT_SOURCE_DIR}/../test/uwp/square-150x150.png"
"${CMAKE_CURRENT_SOURCE_DIR}/../test/uwp/splash-620x300.png"
)
endif()
if(AST_DATAFILES) if(AST_DATAFILES)
list(APPEND EXTRA_SOURCES ${DATAFILES}) list(APPEND EXTRA_SOURCES ${DATAFILES})
endif() endif()
@ -122,17 +85,6 @@ macro(add_sdl_example_executable TARGET)
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${AST_DATAFILES} $<TARGET_FILE_DIR:${TARGET}>/sdl-${TARGET} COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${AST_DATAFILES} $<TARGET_FILE_DIR:${TARGET}>/sdl-${TARGET}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
) )
elseif(WINDOWS_STORE)
# MSVC does build the dependent targets (or POST_BUILD commands) when building an application
# after starting to debug. By copying the resources in a custom target, the files can be copied afterwards.
# FIXME: find out proper way to add assets to UWP package
cmake_minimum_required(VERSION 3.19)
add_custom_target(zzz-resources-copy-${TARGET}
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:${TARGET}>/AppX"
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${AST_DATAFILES} "$<TARGET_FILE_DIR:${TARGET}>/AppX"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
add_dependencies(${TARGET} zzz-resources-copy-${TARGET})
else() else()
add_dependencies(${TARGET} copy-sdl-example-resources) add_dependencies(${TARGET} copy-sdl-example-resources)
endif() endif()
@ -156,20 +108,7 @@ macro(add_sdl_example_executable TARGET)
endif() endif()
elseif(PSP) elseif(PSP)
target_link_libraries(${TARGET} PRIVATE GL) target_link_libraries(${TARGET} PRIVATE GL)
endif() elseif(EMSCRIPTEN)
if(WINDOWS_STORE)
target_compile_definitions(${TARGET} PRIVATE "SDL_MAIN_NOIMPL")
set_property(TARGET ${TARGET} PROPERTY WIN32_EXECUTABLE TRUE)
set_property(TARGET ${TARGET} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${uwp_bindir}")
target_link_options(${TARGET} PRIVATE
-nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
-nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
vccorlib$<$<CONFIG:Debug>:d>.lib
msvcrt$<$<CONFIG:Debug>:d>.lib
)
endif()
if(EMSCRIPTEN)
set_property(TARGET ${TARGET} PROPERTY SUFFIX ".html") set_property(TARGET ${TARGET} PROPERTY SUFFIX ".html")
endif() endif()

View File

@ -53,7 +53,7 @@
/* Some compilers use a special export keyword */ /* Some compilers use a special export keyword */
#ifndef SDL_DECLSPEC #ifndef SDL_DECLSPEC
# if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_CYGWIN) || defined(SDL_PLATFORM_GDK) # if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_CYGWIN) || defined(SDL_PLATFORM_GDK)
# ifdef DLL_EXPORT # ifdef DLL_EXPORT
# define SDL_DECLSPEC __declspec(dllexport) # define SDL_DECLSPEC __declspec(dllexport)
# else # else
@ -70,7 +70,7 @@
/* By default SDL uses the C calling convention */ /* By default SDL uses the C calling convention */
#ifndef SDLCALL #ifndef SDLCALL
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK)) && !defined(__GNUC__) #if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(__GNUC__)
#define SDLCALL __cdecl #define SDLCALL __cdecl
#else #else
#define SDLCALL #define SDLCALL

View File

@ -143,19 +143,19 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrefPath(const char *org, const char *
* *
* The folders supported per platform are: * The folders supported per platform are:
* *
* | | Windows | WinRT/UWP |macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten | * | | Windows | macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten |
* | ----------- | ------- | --------- |--------- | ---- | ---------- | ----- | ---------- | * | ----------- | ------- | --------- | ---- | ---------- | ----- | ---------- |
* | HOME | X | X | X | | X | X | X | * | HOME | X | X | | X | X | X |
* | DESKTOP | X | X | X | | X | X | | * | DESKTOP | X | X | | X | X | |
* | DOCUMENTS | X | X | X | | X | | | * | DOCUMENTS | X | X | | X | | |
* | DOWNLOADS | Vista+ | X | X | | X | | | * | DOWNLOADS | Vista+ | X | | X | | |
* | MUSIC | X | X | X | | X | | | * | MUSIC | X | X | | X | | |
* | PICTURES | X | X | X | | X | | | * | PICTURES | X | X | | X | | |
* | PUBLICSHARE | | | X | | X | | | * | PUBLICSHARE | | X | | X | | |
* | SAVEDGAMES | Vista+ | | | | | | | * | SAVEDGAMES | Vista+ | | | | | |
* | SCREENSHOTS | Vista+ | X | | | | | | * | SCREENSHOTS | Vista+ | | | | | |
* | TEMPLATES | X | X | X | | X | | | * | TEMPLATES | X | X | | X | | |
* | VIDEOS | X | X | X* | | X | | | * | VIDEOS | X | X* | | X | | |
* *
* Note that on macOS/iOS, the Videos folder is called "Movies". * Note that on macOS/iOS, the Videos folder is called "Movies".
* *

View File

@ -3938,119 +3938,6 @@ extern "C" {
*/ */
#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE" #define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
/**
* A variable controlling whether back-button-press events on Windows Phone to
* be marked as handled.
*
* Windows Phone devices typically feature a Back button. When pressed, the OS
* will emit back-button-press events, which apps are expected to handle in an
* appropriate manner. If apps do not explicitly mark these events as
* 'Handled', then the OS will invoke its default behavior for unhandled
* back-button-press events, which on Windows Phone 8 and 8.1 is to terminate
* the app (and attempt to switch to the previous app, or to the device's home
* screen).
*
* Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL to
* mark back-button-press events as Handled, if and when one is sent to the
* app.
*
* Internally, Windows Phone sends back button events as parameters to special
* back-button-press callback functions. Apps that need to respond to
* back-button-press events are expected to register one or more callback
* functions for such, shortly after being launched (during the app's
* initialization phase). After the back button is pressed, the OS will invoke
* these callbacks. If the app's callback(s) do not explicitly mark the event
* as handled by the time they return, or if the app never registers one of
* these callback, the OS will consider the event un-handled, and it will
* apply its default back button behavior (terminate the app).
*
* SDL registers its own back-button-press callback with the Windows Phone OS.
* This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
* and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after
* which it will check the contents of the hint,
* SDL_HINT_WINRT_HANDLE_BACK_BUTTON. If the hint's value is set to "1", the
* back button event's Handled property will get set to 'true'. If the hint's
* value is set to something else, or if it is unset, SDL will leave the
* event's Handled property alone. (By default, the OS sets this property to
* 'false', to note.)
*
* SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
* back button is pressed, or can set it in direct-response to a back button
* being pressed.
*
* In order to get notified when a back button is pressed, SDL apps should
* register a callback function with SDL_AddEventWatch(), and have it listen
* for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
* (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
* either event type is suitable.) Any value of
* SDL_HINT_WINRT_HANDLE_BACK_BUTTON set by such a callback, will be applied
* to the OS' current back-button-press event.
*
* More details on back button behavior in Windows Phone apps can be found at
* the following page, on Microsoft's developer site:
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
/**
* A variable specifying the label text for a WinRT app's privacy policy link.
*
* Network-enabled WinRT apps must include a privacy policy. On Windows 8,
* 8.1, and RT, Microsoft mandates that this policy be available via the
* Windows Settings charm. SDL provides code to add a link there, with its
* label text being set via the optional hint,
* SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
*
* Please note that a privacy policy's contents are not set via this hint. A
* separate hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the
* actual text of the policy.
*
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy".
*
* For additional information on linking to a privacy policy, see the
* documentation for SDL_HINT_WINRT_PRIVACY_POLICY_URL.
*
* This hint should be set before SDL is initialized.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
/**
* A variable specifying the URL to a WinRT app's privacy policy.
*
* All network-enabled WinRT apps must make a privacy policy available to its
* users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
* available in the Windows Settings charm, as accessed from within the app.
* SDL provides code to add a URL-based link there, which can point to the
* app's privacy policy.
*
* To setup a URL to an app's privacy policy, set
* SDL_HINT_WINRT_PRIVACY_POLICY_URL before calling any SDL_Init() functions.
* The contents of the hint should be a valid URL. For example,
* "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy
* policy link to the Settings charm. This hint should only be set during app
* init.
*
* The label text of an app's "Privacy Policy" link may be customized via
* another hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
*
* Please note that on Windows Phone, Microsoft does not provide standard UI
* for displaying a privacy policy link, and as such,
* SDL_HINT_WINRT_PRIVACY_POLICY_URL will not get used on that platform.
* Network-enabled phone apps should display their privacy policy through some
* other, in-app means.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
/** /**
* A variable controlling whether X11 windows are marked as override-redirect. * A variable controlling whether X11 windows are marked as override-redirect.
* *

View File

@ -48,20 +48,6 @@
*/ */
#define SDL_MAIN_AVAILABLE #define SDL_MAIN_AVAILABLE
#elif defined(SDL_PLATFORM_WINRT)
/* On WinRT, SDL provides a main function that initializes CoreApplication,
creating an instance of IFrameworkView in the process.
Ideally, #include'ing SDL_main.h is enough to get a main() function working.
However, that requires the source file your main() is in to be compiled
as C++ *and* with the /ZW compiler flag. If that's not feasible, add an
otherwise empty .cpp file that only contains `#include <SDL3/SDL_main.h>`
and build that with /ZW (still include SDL_main.h in your other file with main()!).
In XAML apps, instead the function SDL_RunApp() must be called with a pointer
to the Direct3D-hosted XAML control passed in as the "reserved" argument.
*/
#define SDL_MAIN_NEEDED
#elif defined(SDL_PLATFORM_GDK) #elif defined(SDL_PLATFORM_GDK)
/* On GDK, SDL provides a main function that initializes the game runtime. /* On GDK, SDL provides a main function that initializes the game runtime.
@ -591,7 +577,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
/* platforms which main (-equivalent) can be implemented in plain C */ /* platforms which main (-equivalent) can be implemented in plain C */
#include <SDL3/SDL_main_impl.h> #include <SDL3/SDL_main_impl.h>
#elif defined(SDL_PLATFORM_WINRT) /* C++ platforms */ #elif 0 /* C++ platforms (currently none, this used to be here for WinRT, but is left for future platforms that might arrive. */
#ifdef __cplusplus #ifdef __cplusplus
#include <SDL3/SDL_main_impl.h> #include <SDL3/SDL_main_impl.h>
#else #else
@ -605,7 +591,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
#endif /* __GNUC__ */ #endif /* __GNUC__ */
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* C++ platforms like SDL_PLATFORM_WINRT etc */ #endif /* C++ platforms */
#endif #endif
#endif /* SDL_main_h_ */ #endif /* SDL_main_h_ */

View File

@ -126,70 +126,6 @@
/* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */ /* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */
#elif defined(SDL_PLATFORM_WINRT)
/* WinRT main based on SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14 */
#include <wrl.h>
/* At least one file in any SDL/WinRT app appears to require compilation
with C++/CX, otherwise a Windows Metadata file won't get created, and
an APPX0702 build error can appear shortly after linking.
The following set of preprocessor code forces this file to be compiled
as C++/CX, which appears to cause Visual C++ 2012's build tools to
create this .winmd file, and will help allow builds of SDL/WinRT apps
to proceed without error.
If other files in an app's project enable C++/CX compilation, then it might
be possible for the .cpp file including SDL_main.h to be compiled without /ZW,
for Visual C++'s build tools to create a winmd file, and for the app to
build without APPX0702 errors. In this case, if
SDL_WINRT_METADATA_FILE_AVAILABLE is defined as a C/C++ macro, then
the #error (to force C++/CX compilation) will be disabled.
Please note that /ZW can be specified on a file-by-file basis. To do this,
right click on the file in Visual C++, click Properties, then change the
setting through the dialog that comes up.
*/
#ifndef SDL_WINRT_METADATA_FILE_AVAILABLE
#if !defined(__cplusplus) || (!defined(__cplusplus_winrt) && _MSVC_LANG < 202002L)
#error The C++ file that includes SDL_main.h must be compiled as C++ code with /ZW, otherwise build errors due to missing .winmd files can occur.
#endif
#endif
/* Prevent MSVC++ from warning about threading models when defining our
custom WinMain. The threading model will instead be set via a direct
call to Windows::Foundation::Initialize (rather than via an attributed
function).
To note, this warning (C4447) does not seem to come up unless this file
is compiled with C++/CX enabled (via the /ZW compiler flag).
*/
#ifdef _MSC_VER
#pragma warning(disable : 4447)
/* Make sure the function to initialize the Windows Runtime gets linked in. */
#pragma comment(lib, "runtimeobject.lib")
#endif
#ifdef __cplusplus
extern "C" {
#endif
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
return SDL_RunApp(0, NULL, SDL_main, NULL);
}
#if _MSVC_LANG >= 202002L
int main(int argc, char** argv) {
return SDL_RunApp(argc, argv, SDL_main, NULL);
}
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
/* end of WinRT impl */
#elif defined(SDL_PLATFORM_NGAGE) #elif defined(SDL_PLATFORM_NGAGE)
/* same typedef as in ngage SDKs e32def.h */ /* same typedef as in ngage SDKs e32def.h */
typedef signed int TInt; typedef signed int TInt;

View File

@ -625,8 +625,6 @@
#define SDL_LinuxSetThreadPriorityAndPolicy SDL_SetLinuxThreadPriorityAndPolicy #define SDL_LinuxSetThreadPriorityAndPolicy SDL_SetLinuxThreadPriorityAndPolicy
#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidEnterForeground #define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidEnterForeground
#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillEnterBackground #define SDL_OnApplicationWillResignActive SDL_OnApplicationWillEnterBackground
#define SDL_WinRTGetDeviceFamily SDL_GetWinRTDeviceFamily
#define SDL_GetWinRTFSPathUTF8 SDL_GetWinRTFSPath
#define SDL_iOSSetAnimationCallback SDL_SetiOSAnimationCallback #define SDL_iOSSetAnimationCallback SDL_SetiOSAnimationCallback
#define SDL_iOSSetEventPump SDL_SetiOSEventPump #define SDL_iOSSetEventPump SDL_SetiOSEventPump
#define SDL_iPhoneSetAnimationCallback SDL_SetiOSAnimationCallback #define SDL_iPhoneSetAnimationCallback SDL_SetiOSAnimationCallback
@ -1251,8 +1249,6 @@
#define SDL_LinuxSetThreadPriorityAndPolicy SDL_LinuxSetThreadPriorityAndPolicy_renamed_SDL_SetLinuxThreadPriorityAndPolicy #define SDL_LinuxSetThreadPriorityAndPolicy SDL_LinuxSetThreadPriorityAndPolicy_renamed_SDL_SetLinuxThreadPriorityAndPolicy
#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_renamed_SDL_OnApplicationDidEnterForeground #define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_renamed_SDL_OnApplicationDidEnterForeground
#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillResignActive_renamed_SDL_OnApplicationWillEnterBackground #define SDL_OnApplicationWillResignActive SDL_OnApplicationWillResignActive_renamed_SDL_OnApplicationWillEnterBackground
#define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_renamed_SDL_GetWinRTDeviceFamily
#define SDL_GetWinRTFSPathUTF8 SDL_GetWinRTFSPathUTF8_renamed_SDL_GetWinRTFSPath
#define SDL_iOSSetAnimationCallback SDL_iOSSetAnimationCallback_renamed_SDL_SetiOSAnimationCallback #define SDL_iOSSetAnimationCallback SDL_iOSSetAnimationCallback_renamed_SDL_SetiOSAnimationCallback
#define SDL_iOSSetEventPump SDL_iOSSetEventPump_renamed_SDL_SetiOSEventPump #define SDL_iOSSetEventPump SDL_iOSSetEventPump_renamed_SDL_SetiOSEventPump
#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_renamed_SDL_iOSSetAnimationCallback #define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_renamed_SDL_iOSSetAnimationCallback

View File

@ -173,7 +173,7 @@
#endif #endif
#if WINAPI_FAMILY_WINRT #if WINAPI_FAMILY_WINRT
#define SDL_PLATFORM_WINRT 1 #error Windows RT/UWP is no longer supported in SDL
#elif defined(_GAMING_DESKTOP) /* GDK project configuration always defines _GAMING_XXX */ #elif defined(_GAMING_DESKTOP) /* GDK project configuration always defines _GAMING_XXX */
#define SDL_PLATFORM_WINGDK 1 #define SDL_PLATFORM_WINGDK 1
#elif defined(_GAMING_XBOX_XBOXONE) #elif defined(_GAMING_XBOX_XBOXONE)

View File

@ -559,90 +559,6 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int
#endif /* SDL_PLATFORM_ANDROID */ #endif /* SDL_PLATFORM_ANDROID */
/*
* Platform specific functions for WinRT
*/
#ifdef SDL_PLATFORM_WINRT
/**
* WinRT / Windows Phone path types
*
* \since This enum is available since SDL 3.0.0.
*/
typedef enum SDL_WinRT_Path
{
/** The installed app's root directory.
Files here are likely to be read-only. */
SDL_WINRT_PATH_INSTALLED_LOCATION,
/** The app's local data store. Files may be written here */
SDL_WINRT_PATH_LOCAL_FOLDER,
/** The app's roaming data store. Unsupported on Windows Phone.
Files written here may be copied to other machines via a network
connection.
*/
SDL_WINRT_PATH_ROAMING_FOLDER,
/** The app's temporary data store. Unsupported on Windows Phone.
Files written here may be deleted at any time. */
SDL_WINRT_PATH_TEMP_FOLDER
} SDL_WinRT_Path;
/**
* WinRT Device Family
*
* \since This enum is available since SDL 3.0.0.
*/
typedef enum SDL_WinRT_DeviceFamily
{
/** Unknown family */
SDL_WINRT_DEVICEFAMILY_UNKNOWN,
/** Desktop family*/
SDL_WINRT_DEVICEFAMILY_DESKTOP,
/** Mobile family (for example smartphone) */
SDL_WINRT_DEVICEFAMILY_MOBILE,
/** XBox family */
SDL_WINRT_DEVICEFAMILY_XBOX,
} SDL_WinRT_DeviceFamily;
/**
* Retrieve a WinRT defined path on the local file system.
*
* Not all paths are available on all versions of Windows. This is especially
* true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
* for more information on which path types are supported where.
*
* Documentation on most app-specific path types on WinRT can be found on
* MSDN, at the URL:
*
* https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
*
* \param pathType the type of path to retrieve, one of SDL_WinRT_Path.
* \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
* the path is not available for any reason; call SDL_GetError() for
* more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetWinRTFSPath(SDL_WinRT_Path pathType);
/**
* Detects the device family of WinRT platform at runtime.
*
* \returns a value from the SDL_WinRT_DeviceFamily enum.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_GetWinRTDeviceFamily();
#endif /* SDL_PLATFORM_WINRT */
/** /**
* Query if the current device is a tablet. * Query if the current device is a tablet.
* *

View File

@ -36,7 +36,7 @@
#include <SDL3/SDL_atomic.h> #include <SDL3/SDL_atomic.h>
#include <SDL3/SDL_mutex.h> #include <SDL3/SDL_mutex.h>
#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(SDL_PLATFORM_WINRT) #if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
#include <process.h> /* _beginthreadex() and _endthreadex() */ #include <process.h> /* _beginthreadex() and _endthreadex() */
#endif #endif
@ -263,7 +263,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop
/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */ /* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
#ifndef SDL_WIKI_DOCUMENTATION_SECTION #ifndef SDL_WIKI_DOCUMENTATION_SECTION
# if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(SDL_PLATFORM_WINRT) # if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
# ifndef SDL_BeginThreadFunction # ifndef SDL_BeginThreadFunction
# define SDL_BeginThreadFunction _beginthreadex # define SDL_BeginThreadFunction _beginthreadex
# endif # endif

View File

@ -1215,11 +1215,6 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window)
* - `SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER`: the EGLSurface associated with * - `SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER`: the EGLSurface associated with
* the window * the window
* *
* On UWP:
*
* - `SDL_PROP_WINDOW_WINRT_WINDOW_POINTER`: the IInspectable CoreWindow
* associated with the window
*
* On Windows: * On Windows:
* *
* - `SDL_PROP_WINDOW_WIN32_HWND_POINTER`: the HWND associated with the window * - `SDL_PROP_WINDOW_WIN32_HWND_POINTER`: the HWND associated with the window
@ -1286,7 +1281,6 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window
#define SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER "SDL.window.vivante.display" #define SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER "SDL.window.vivante.display"
#define SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER "SDL.window.vivante.window" #define SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER "SDL.window.vivante.window"
#define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER "SDL.window.vivante.surface" #define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER "SDL.window.vivante.surface"
#define SDL_PROP_WINDOW_WINRT_WINDOW_POINTER "SDL.window.winrt.window"
#define SDL_PROP_WINDOW_WIN32_HWND_POINTER "SDL.window.win32.hwnd" #define SDL_PROP_WINDOW_WIN32_HWND_POINTER "SDL.window.win32.hwnd"
#define SDL_PROP_WINDOW_WIN32_HDC_POINTER "SDL.window.win32.hdc" #define SDL_PROP_WINDOW_WIN32_HDC_POINTER "SDL.window.win32.hdc"
#define SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER "SDL.window.win32.instance" #define SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER "SDL.window.win32.instance"

View File

@ -33,8 +33,6 @@
/* Add any platform that doesn't build using the configure system. */ /* Add any platform that doesn't build using the configure system. */
#if defined(SDL_PLATFORM_WIN32) #if defined(SDL_PLATFORM_WIN32)
#include "SDL_build_config_windows.h" #include "SDL_build_config_windows.h"
#elif defined(SDL_PLATFORM_WINRT)
#include "SDL_build_config_winrt.h"
#elif defined(SDL_PLATFORM_WINGDK) #elif defined(SDL_PLATFORM_WINGDK)
#include "SDL_build_config_wingdk.h" #include "SDL_build_config_wingdk.h"
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES) #elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)

View File

@ -396,7 +396,6 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@ #cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
@ -457,7 +456,6 @@
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@ #cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@

View File

@ -242,9 +242,7 @@ typedef unsigned int uintptr_t;
#define SDL_JOYSTICK_GAMEINPUT 1 #define SDL_JOYSTICK_GAMEINPUT 1
#endif #endif
#define SDL_JOYSTICK_HIDAPI 1 #define SDL_JOYSTICK_HIDAPI 1
#ifndef SDL_PLATFORM_WINRT
#define SDL_JOYSTICK_RAWINPUT 1 #define SDL_JOYSTICK_RAWINPUT 1
#endif
#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_JOYSTICK_VIRTUAL 1
#ifdef HAVE_WINDOWS_GAMING_INPUT_H #ifdef HAVE_WINDOWS_GAMING_INPUT_H
#define SDL_JOYSTICK_WGI 1 #define SDL_JOYSTICK_WGI 1

View File

@ -1,229 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_build_config_winrt_h_
#define SDL_build_config_winrt_h_
#define SDL_build_config_h_
#include <SDL3/SDL_platform_defines.h>
/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used
by SDL to determine which version of the Windows SDK is being used.
*/
#include <sdkddkver.h>
/* Define possibly-undefined NTDDI values (used when compiling SDL against
older versions of the Windows SDK.
*/
#ifndef NTDDI_WINBLUE
#define NTDDI_WINBLUE 0x06030000
#endif
#ifndef NTDDI_WIN10
#define NTDDI_WIN10 0x0A000000
#endif
/* This is a set of defines to configure the SDL features */
#ifdef __clang__
# define HAVE_GCC_ATOMICS 1
#endif
/* Useful headers */
#define HAVE_DXGI_H 1
#if !SDL_WINAPI_FAMILY_PHONE
#define HAVE_XINPUT_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_LIBC 1
#define HAVE_FLOAT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_WCHAR_H 1
/* C library functions */
#define HAVE_LIBC 1
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ABS 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE_STRCHR 1
#define HAVE_STRPBRK 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
/* #undef HAVE_STRTOLL */
/* #undef HAVE_STRTOULL */
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_VSNPRINTF 1
/* TODO, WinRT: consider using ??_s versions of the following */
/* #undef HAVE__STRLWR */
/* #undef HAVE_ITOA */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */
/* #undef HAVE_SSCANF */
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
#define HAVE_ASINF 1
#define HAVE_ATAN 1
#define HAVE_ATANF 1
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEIL 1
#define HAVE_CEILF 1
#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1
#define HAVE_FABSF 1
#define HAVE_FLOOR 1
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_LROUND 1
#define HAVE_LROUNDF 1
#define HAVE_MODF 1
#define HAVE_MODFF 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1
#define HAVE__SCALB 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#define HAVE_TRUNC 1
#define HAVE_TRUNCF 1
#define HAVE__FSEEKI64 1
#define HAVE_ROAPI_H 1
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_WASAPI 1
#define SDL_AUDIO_DRIVER_DISK 1
#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
#if SDL_WINAPI_FAMILY_PHONE
#define SDL_JOYSTICK_DISABLED 1
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_VIRTUAL 1
#if (NTDDI_VERSION >= NTDDI_WIN10)
#define SDL_JOYSTICK_WGI 1
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_XINPUT 1
#endif /* WIN10 */
#endif
/* WinRT doesn't have HIDAPI available */
#define SDL_HIDAPI_DISABLED 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
#define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1
#define SDL_THREAD_WINDOWS 1
#else
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
#define SDL_THREAD_STDCPP 1
#endif
/* Enable RTC system */
#define SDL_TIME_WINDOWS 1
/* Enable various timer systems */
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_WINRT 1
#define SDL_VIDEO_DRIVER_DUMMY 1
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
#define SDL_VIDEO_OPENGL_ES2 1
#define SDL_VIDEO_OPENGL_EGL 1
/* Enable appropriate renderer(s) */
#define SDL_VIDEO_RENDER_D3D11 1
/* Disable D3D12 as it's not implemented for WinRT */
/* #undef SDL_VIDEO_RENDER_D3D12 */
#ifdef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif
/* Enable system power support */
#define SDL_POWER_WINRT 1
/* Enable filesystem support */
#define SDL_FILESYSTEM_WINDOWS 1
#define SDL_FSOPS_WINDOWS 1
/* Enable the camera driver (src/camera/dummy/\*.c) */ /* !!! FIXME */
#define SDL_CAMERA_DRIVER_DUMMY 1
#endif /* SDL_build_config_winrt_h_ */

View File

@ -23,7 +23,7 @@
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "core/windows/SDL_windows.h" #include "core/windows/SDL_windows.h"
#elif !defined(SDL_PLATFORM_WINRT) #else
#include <unistd.h> // _exit(), etc. #include <unistd.h> // _exit(), etc.
#endif #endif
@ -694,8 +694,6 @@ const char *SDL_GetPlatform(void)
return "Solaris"; return "Solaris";
#elif defined(SDL_PLATFORM_WIN32) #elif defined(SDL_PLATFORM_WIN32)
return "Windows"; return "Windows";
#elif defined(SDL_PLATFORM_WINRT)
return "WinRT";
#elif defined(SDL_PLATFORM_WINGDK) #elif defined(SDL_PLATFORM_WINGDK)
return "WinGDK"; return "WinGDK";
#elif defined(SDL_PLATFORM_XBOXONE) #elif defined(SDL_PLATFORM_XBOXONE)

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "core/windows/SDL_windows.h" #include "core/windows/SDL_windows.h"
#endif #endif
@ -511,7 +511,7 @@ void SDL_LogMessageV(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_S
} }
} }
#if defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_GDK)
enum { enum {
CONSOLE_UNATTACHED = 0, CONSOLE_UNATTACHED = 0,
CONSOLE_ATTACHED_CONSOLE = 1, CONSOLE_ATTACHED_CONSOLE = 1,
@ -526,7 +526,7 @@ static HANDLE stderrHandle = NULL;
static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
const char *message) const char *message)
{ {
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
// Way too many allocations here, urgh // Way too many allocations here, urgh
// Note: One can't call SDL_SetError here, since that function itself logs. // Note: One can't call SDL_SetError here, since that function itself logs.
{ {
@ -535,7 +535,7 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
LPTSTR tstr; LPTSTR tstr;
bool isstack; bool isstack;
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_GDK) #if !defined(SDL_PLATFORM_GDK)
BOOL attachResult; BOOL attachResult;
DWORD attachError; DWORD attachError;
DWORD consoleMode; DWORD consoleMode;
@ -574,7 +574,7 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
} }
} }
} }
#endif // !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_GDK) #endif // !defined(SDL_PLATFORM_GDK)
length = SDL_strlen(SDL_GetLogPriorityPrefix(priority)) + SDL_strlen(message) + 1 + 1 + 1; length = SDL_strlen(SDL_GetLogPriorityPrefix(priority)) + SDL_strlen(message) + 1 + 1 + 1;
output = SDL_small_alloc(char, length, &isstack); output = SDL_small_alloc(char, length, &isstack);
(void)SDL_snprintf(output, length, "%s%s\r\n", SDL_GetLogPriorityPrefix(priority), message); (void)SDL_snprintf(output, length, "%s%s\r\n", SDL_GetLogPriorityPrefix(priority), message);
@ -583,7 +583,7 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
// Output to debugger // Output to debugger
OutputDebugString(tstr); OutputDebugString(tstr);
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_GDK) #if !defined(SDL_PLATFORM_GDK)
// Screen output to stderr, if console was attached. // Screen output to stderr, if console was attached.
if (consoleAttached == CONSOLE_ATTACHED_CONSOLE) { if (consoleAttached == CONSOLE_ATTACHED_CONSOLE) {
if (!WriteConsole(stderrHandle, tstr, (DWORD)SDL_tcslen(tstr), &charsWritten, NULL)) { if (!WriteConsole(stderrHandle, tstr, (DWORD)SDL_tcslen(tstr), &charsWritten, NULL)) {
@ -598,7 +598,7 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
OutputDebugString(TEXT("Error calling WriteFile\r\n")); OutputDebugString(TEXT("Error calling WriteFile\r\n"));
} }
} }
#endif // !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_GDK) #endif // !defined(SDL_PLATFORM_GDK)
SDL_free(tstr); SDL_free(tstr);
SDL_small_free(output, isstack); SDL_small_free(output, isstack);

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "../core/windows/SDL_windows.h" #include "../core/windows/SDL_windows.h"
#endif #endif

View File

@ -325,12 +325,6 @@ static bool mgmtthrtask_CoTaskMemFree(void *userdata)
return true; return true;
} }
static bool mgmtthrtask_PlatformDeleteActivationHandler(void *userdata)
{
WASAPI_PlatformDeleteActivationHandler(userdata);
return true;
}
static bool mgmtthrtask_CloseHandle(void *userdata) static bool mgmtthrtask_CloseHandle(void *userdata)
{ {
CloseHandle((HANDLE) userdata); CloseHandle((HANDLE) userdata);
@ -370,12 +364,6 @@ static void ResetWasapiDevice(SDL_AudioDevice *device)
WASAPI_ProxyToManagementThread(mgmtthrtask_CoTaskMemFree, ptr, NULL); WASAPI_ProxyToManagementThread(mgmtthrtask_CoTaskMemFree, ptr, NULL);
} }
if (device->hidden->activation_handler) {
void *activation_handler = device->hidden->activation_handler;
device->hidden->activation_handler = NULL;
WASAPI_ProxyToManagementThread(mgmtthrtask_PlatformDeleteActivationHandler, activation_handler, NULL);
}
if (device->hidden->event) { if (device->hidden->event) {
HANDLE event = device->hidden->event; HANDLE event = device->hidden->event;
device->hidden->event = NULL; device->hidden->event = NULL;
@ -592,7 +580,7 @@ static bool mgmtthrtask_PrepDevice(void *userdata)
IAudioClient *client = device->hidden->client; IAudioClient *client = device->hidden->client;
SDL_assert(client != NULL); SDL_assert(client != NULL);
#if defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) // CreateEventEx() arrived in Vista, so we need an #ifdef for XP. #if defined(SDL_PLATFORM_GDK) // CreateEventEx() arrived in Vista, so we need an #ifdef for XP.
device->hidden->event = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS); device->hidden->event = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);
#else #else
device->hidden->event = CreateEventW(NULL, 0, 0, NULL); device->hidden->event = CreateEventW(NULL, 0, 0, NULL);

View File

@ -42,10 +42,9 @@ struct SDL_PrivateAudioData
int framesize; int framesize;
bool device_lost; bool device_lost;
bool device_dead; bool device_dead;
void *activation_handler;
}; };
// win32 and winrt implementations call into these. // win32 implementation calls into these.
bool WASAPI_PrepDevice(SDL_AudioDevice *device); bool WASAPI_PrepDevice(SDL_AudioDevice *device);
void WASAPI_DisconnectDevice(SDL_AudioDevice *device); // don't hold the device lock when calling this! void WASAPI_DisconnectDevice(SDL_AudioDevice *device); // don't hold the device lock when calling this!
@ -54,7 +53,7 @@ void WASAPI_DisconnectDevice(SDL_AudioDevice *device); // don't hold the device
typedef bool (*ManagementThreadTask)(void *userdata); typedef bool (*ManagementThreadTask)(void *userdata);
bool WASAPI_ProxyToManagementThread(ManagementThreadTask task, void *userdata, bool *wait_until_complete); bool WASAPI_ProxyToManagementThread(ManagementThreadTask task, void *userdata, bool *wait_until_complete);
// These are functions that are implemented differently for Windows vs WinRT. // These are functions that are (were...?) implemented differently for various Windows versions.
// UNLESS OTHERWISE NOTED THESE ALL HAPPEN ON THE MANAGEMENT THREAD. // UNLESS OTHERWISE NOTED THESE ALL HAPPEN ON THE MANAGEMENT THREAD.
bool WASAPI_PlatformInit(void); bool WASAPI_PlatformInit(void);
void WASAPI_PlatformDeinit(void); void WASAPI_PlatformDeinit(void);
@ -63,7 +62,6 @@ void WASAPI_EnumerateEndpoints(SDL_AudioDevice **default_playback, SDL_AudioDevi
bool WASAPI_ActivateDevice(SDL_AudioDevice *device); bool WASAPI_ActivateDevice(SDL_AudioDevice *device);
void WASAPI_PlatformThreadInit(SDL_AudioDevice *device); // this happens on the audio device thread, not the management thread. void WASAPI_PlatformThreadInit(SDL_AudioDevice *device); // this happens on the audio device thread, not the management thread.
void WASAPI_PlatformThreadDeinit(SDL_AudioDevice *device); // this happens on the audio device thread, not the management thread. void WASAPI_PlatformThreadDeinit(SDL_AudioDevice *device); // this happens on the audio device thread, not the management thread.
void WASAPI_PlatformDeleteActivationHandler(void *handler);
void WASAPI_PlatformFreeDeviceHandle(SDL_AudioDevice *device); void WASAPI_PlatformFreeDeviceHandle(SDL_AudioDevice *device);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -20,13 +20,14 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
/* This is code that Windows uses to talk to WASAPI-related system APIs. /* !!! FIXME: merge this all into SDL_wasapi.c, now that WinRT is gone.
This is code that Windows uses to talk to WASAPI-related system APIs.
This is for non-WinRT desktop apps. The C++/CX implementation of these This is for non-WinRT desktop apps. The C++/CX implementation of these
functions, exclusive to WinRT, are in SDL_wasapi_winrt.cpp. functions, exclusive to WinRT, are in SDL_wasapi_winrt.cpp.
The code in SDL_wasapi.c is used by both standard Windows and WinRT builds The code in SDL_wasapi.c is used by both standard Windows and WinRT builds
to deal with audio and calls into these functions. */ to deal with audio and calls into these functions. */
#if defined(SDL_AUDIO_DRIVER_WASAPI) && !defined(SDL_PLATFORM_WINRT) #if defined(SDL_AUDIO_DRIVER_WASAPI)
#include "../../core/windows/SDL_windows.h" #include "../../core/windows/SDL_windows.h"
#include "../../core/windows/SDL_immdevice.h" #include "../../core/windows/SDL_immdevice.h"
@ -191,15 +192,9 @@ void WASAPI_EnumerateEndpoints(SDL_AudioDevice **default_playback, SDL_AudioDevi
SDL_IMMDevice_EnumerateEndpoints(default_playback, default_recording); SDL_IMMDevice_EnumerateEndpoints(default_playback, default_recording);
} }
void WASAPI_PlatformDeleteActivationHandler(void *handler)
{
// not asynchronous.
SDL_assert(!"This function should have only been called on WinRT.");
}
void WASAPI_PlatformFreeDeviceHandle(SDL_AudioDevice *device) void WASAPI_PlatformFreeDeviceHandle(SDL_AudioDevice *device)
{ {
SDL_IMMDevice_FreeDeviceHandle(device); SDL_IMMDevice_FreeDeviceHandle(device);
} }
#endif // SDL_AUDIO_DRIVER_WASAPI && !defined(SDL_PLATFORM_WINRT) #endif // SDL_AUDIO_DRIVER_WASAPI

View File

@ -1,360 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
// This is C++/CX code that the WinRT port uses to talk to WASAPI-related
// system APIs. The C implementation of these functions, for non-WinRT apps,
// is in SDL_wasapi_win32.c. The code in SDL_wasapi.c is used by both standard
// Windows and WinRT builds to deal with audio and calls into these functions.
#if defined(SDL_AUDIO_DRIVER_WASAPI) && defined(SDL_PLATFORM_WINRT)
#include <Windows.h>
#include <windows.ui.core.h>
#include <windows.devices.enumeration.h>
#include <windows.media.devices.h>
#include <wrl/implements.h>
#include <collection.h>
extern "C" {
#include "../../core/windows/SDL_windows.h"
#include "../SDL_sysaudio.h"
}
#define COBJMACROS
#include <mmdeviceapi.h>
#include <audioclient.h>
#include "SDL_wasapi.h"
using namespace Windows::Devices::Enumeration;
using namespace Windows::Media::Devices;
using namespace Windows::Foundation;
using namespace Microsoft::WRL;
static Platform::String ^ SDL_PKEY_AudioEngine_DeviceFormat = L"{f19f064d-082c-4e27-bc73-6882a1bb8e4c} 0";
static bool FindWinRTAudioDeviceCallback(SDL_AudioDevice *device, void *userdata)
{
return (SDL_wcscmp((LPCWSTR) device->handle, (LPCWSTR) userdata) == 0);
}
static SDL_AudioDevice *FindWinRTAudioDevice(LPCWSTR devid)
{
return SDL_FindPhysicalAudioDeviceByCallback(FindWinRTAudioDeviceCallback, (void *) devid);
}
class SDL_WasapiDeviceEventHandler
{
public:
SDL_WasapiDeviceEventHandler(const bool _recording);
~SDL_WasapiDeviceEventHandler();
void OnDeviceAdded(DeviceWatcher ^ sender, DeviceInformation ^ args);
void OnDeviceRemoved(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args);
void OnDeviceUpdated(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args);
void OnEnumerationCompleted(DeviceWatcher ^ sender, Platform::Object ^ args);
void OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args);
void OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args);
void WaitForCompletion();
private:
SDL_Semaphore *completed_semaphore;
const bool recording;
DeviceWatcher ^ watcher;
Windows::Foundation::EventRegistrationToken added_handler;
Windows::Foundation::EventRegistrationToken removed_handler;
Windows::Foundation::EventRegistrationToken updated_handler;
Windows::Foundation::EventRegistrationToken completed_handler;
Windows::Foundation::EventRegistrationToken default_changed_handler;
};
SDL_WasapiDeviceEventHandler::SDL_WasapiDeviceEventHandler(const bool _recording)
: recording(_recording), completed_semaphore(SDL_CreateSemaphore(0))
{
if (!completed_semaphore) {
return; // uhoh.
}
Platform::String ^ selector = _recording ? MediaDevice::GetAudioCaptureSelector() : MediaDevice::GetAudioRenderSelector();
Platform::Collections::Vector<Platform::String ^> properties;
properties.Append(SDL_PKEY_AudioEngine_DeviceFormat);
watcher = DeviceInformation::CreateWatcher(selector, properties.GetView());
if (!watcher)
return; // uhoh.
// !!! FIXME: this doesn't need a lambda here, I think, if I make SDL_WasapiDeviceEventHandler a proper C++/CX class. --ryan.
added_handler = watcher->Added += ref new TypedEventHandler<DeviceWatcher ^, DeviceInformation ^>([this](DeviceWatcher ^ sender, DeviceInformation ^ args) { OnDeviceAdded(sender, args); });
removed_handler = watcher->Removed += ref new TypedEventHandler<DeviceWatcher ^, DeviceInformationUpdate ^>([this](DeviceWatcher ^ sender, DeviceInformationUpdate ^ args) { OnDeviceRemoved(sender, args); });
updated_handler = watcher->Updated += ref new TypedEventHandler<DeviceWatcher ^, DeviceInformationUpdate ^>([this](DeviceWatcher ^ sender, DeviceInformationUpdate ^ args) { OnDeviceUpdated(sender, args); });
completed_handler = watcher->EnumerationCompleted += ref new TypedEventHandler<DeviceWatcher ^, Platform::Object ^>([this](DeviceWatcher ^ sender, Platform::Object ^ args) { OnEnumerationCompleted(sender, args); });
if (recording) {
default_changed_handler = MediaDevice::DefaultAudioCaptureDeviceChanged += ref new TypedEventHandler<Platform::Object ^, DefaultAudioCaptureDeviceChangedEventArgs ^>([this](Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args) { OnDefaultCaptureDeviceChanged(sender, args); });
} else {
default_changed_handler = MediaDevice::DefaultAudioRenderDeviceChanged += ref new TypedEventHandler<Platform::Object ^, DefaultAudioRenderDeviceChangedEventArgs ^>([this](Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args) { OnDefaultRenderDeviceChanged(sender, args); });
}
watcher->Start();
}
SDL_WasapiDeviceEventHandler::~SDL_WasapiDeviceEventHandler()
{
if (watcher) {
watcher->Added -= added_handler;
watcher->Removed -= removed_handler;
watcher->Updated -= updated_handler;
watcher->EnumerationCompleted -= completed_handler;
watcher->Stop();
watcher = nullptr;
}
if (completed_semaphore) {
SDL_DestroySemaphore(completed_semaphore);
completed_semaphore = nullptr;
}
if (recording) {
MediaDevice::DefaultAudioCaptureDeviceChanged -= default_changed_handler;
} else {
MediaDevice::DefaultAudioRenderDeviceChanged -= default_changed_handler;
}
}
void SDL_WasapiDeviceEventHandler::OnDeviceAdded(DeviceWatcher ^ sender, DeviceInformation ^ info)
{
/* You can have multiple endpoints on a device that are mutually exclusive ("Speakers" vs "Line Out" or whatever).
In a perfect world, things that are unplugged won't be in this collection. The only gotcha is probably for
phones and tablets, where you might have an internal speaker and a headphone jack and expect both to be
available and switch automatically. (!!! FIXME...?) */
SDL_assert(sender == this->watcher);
char *utf8dev = WIN_StringToUTF8W(info->Name->Data());
if (utf8dev) {
SDL_AudioSpec spec;
SDL_zero(spec);
Platform::Object ^ obj = info->Properties->Lookup(SDL_PKEY_AudioEngine_DeviceFormat);
if (obj) {
IPropertyValue ^ property = (IPropertyValue ^) obj;
Platform::Array<unsigned char> ^ data;
property->GetUInt8Array(&data);
WAVEFORMATEXTENSIBLE fmt;
SDL_zero(fmt);
SDL_memcpy(&fmt, data->Data, SDL_min(data->Length, sizeof(WAVEFORMATEXTENSIBLE)));
spec.channels = (Uint8)fmt.Format.nChannels;
spec.freq = fmt.Format.nSamplesPerSec;
spec.format = SDL_WaveFormatExToSDLFormat((WAVEFORMATEX *)&fmt);
}
LPWSTR devid = SDL_wcsdup(info->Id->Data());
if (devid) {
SDL_AddAudioDevice(this->recording, utf8dev, spec.channels ? &spec : NULL, devid);
}
SDL_free(utf8dev);
}
}
void SDL_WasapiDeviceEventHandler::OnDeviceRemoved(DeviceWatcher ^ sender, DeviceInformationUpdate ^ info)
{
SDL_assert(sender == this->watcher);
WASAPI_DisconnectDevice(FindWinRTAudioDevice(info->Id->Data()));
}
void SDL_WasapiDeviceEventHandler::OnDeviceUpdated(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args)
{
SDL_assert(sender == this->watcher);
}
void SDL_WasapiDeviceEventHandler::OnEnumerationCompleted(DeviceWatcher ^ sender, Platform::Object ^ args)
{
SDL_assert(sender == this->watcher);
if (this->completed_semaphore) {
SDL_SignalSemaphore(this->completed_semaphore);
}
}
void SDL_WasapiDeviceEventHandler::OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args)
{
SDL_assert(!this->recording);
SDL_DefaultAudioDeviceChanged(FindWinRTAudioDevice(args->Id->Data()));
}
void SDL_WasapiDeviceEventHandler::OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args)
{
SDL_assert(this->recording);
SDL_DefaultAudioDeviceChanged(FindWinRTAudioDevice(args->Id->Data()));
}
void SDL_WasapiDeviceEventHandler::WaitForCompletion()
{
if (this->completed_semaphore) {
SDL_WaitSemaphore(this->completed_semaphore);
SDL_DestroySemaphore(this->completed_semaphore);
this->completed_semaphore = nullptr;
}
}
static SDL_WasapiDeviceEventHandler *playback_device_event_handler;
static SDL_WasapiDeviceEventHandler *recording_device_event_handler;
bool WASAPI_PlatformInit(void)
{
return true;
}
static void StopWasapiHotplug(void)
{
delete playback_device_event_handler;
playback_device_event_handler = nullptr;
delete recording_device_event_handler;
recording_device_event_handler = nullptr;
}
void WASAPI_PlatformDeinit(void)
{
StopWasapiHotplug();
}
void WASAPI_PlatformDeinitializeStart(void)
{
StopWasapiHotplug();
}
void WASAPI_EnumerateEndpoints(SDL_AudioDevice **default_playback, SDL_AudioDevice **default_recording)
{
Platform::String ^ defdevid;
// DeviceWatchers will fire an Added event for each existing device at
// startup, so we don't need to enumerate them separately before
// listening for updates.
playback_device_event_handler = new SDL_WasapiDeviceEventHandler(false);
playback_device_event_handler->WaitForCompletion();
defdevid = MediaDevice::GetDefaultAudioRenderId(AudioDeviceRole::Default);
if (defdevid) {
*default_playback = FindWinRTAudioDevice(defdevid->Data());
}
recording_device_event_handler = new SDL_WasapiDeviceEventHandler(true);
recording_device_event_handler->WaitForCompletion();
defdevid = MediaDevice::GetDefaultAudioCaptureId(AudioDeviceRole::Default);
if (defdevid) {
*default_recording = FindWinRTAudioDevice(defdevid->Data());
}
}
class SDL_WasapiActivationHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>, FtmBase, IActivateAudioInterfaceCompletionHandler>
{
public:
SDL_WasapiActivationHandler() : completion_semaphore(SDL_CreateSemaphore(0)) { SDL_assert(completion_semaphore != NULL); }
STDMETHOD(ActivateCompleted)(IActivateAudioInterfaceAsyncOperation *operation);
void WaitForCompletion();
private:
SDL_Semaphore *completion_semaphore;
};
void SDL_WasapiActivationHandler::WaitForCompletion()
{
if (completion_semaphore) {
SDL_WaitSemaphore(completion_semaphore);
SDL_DestroySemaphore(completion_semaphore);
completion_semaphore = NULL;
}
}
HRESULT
SDL_WasapiActivationHandler::ActivateCompleted(IActivateAudioInterfaceAsyncOperation *async)
{
// Just set a flag, since we're probably in a different thread. We'll pick it up and init everything on our own thread to prevent races.
SDL_SignalSemaphore(completion_semaphore);
return S_OK;
}
void WASAPI_PlatformDeleteActivationHandler(void *handler)
{
((SDL_WasapiActivationHandler *)handler)->Release();
}
bool WASAPI_ActivateDevice(SDL_AudioDevice *device)
{
LPCWSTR devid = (LPCWSTR) device->handle;
SDL_assert(devid != NULL);
ComPtr<SDL_WasapiActivationHandler> handler = Make<SDL_WasapiActivationHandler>();
if (handler == nullptr) {
return SDL_SetError("Failed to allocate WASAPI activation handler");
}
handler.Get()->AddRef(); // we hold a reference after ComPtr destructs on return, causing a Release, and Release ourselves in WASAPI_PlatformDeleteActivationHandler(), etc.
device->hidden->activation_handler = handler.Get();
IActivateAudioInterfaceAsyncOperation *async = nullptr;
const HRESULT ret = ActivateAudioInterfaceAsync(devid, __uuidof(IAudioClient), nullptr, handler.Get(), &async);
if (FAILED(ret) || async == nullptr) {
if (async != nullptr) {
async->Release();
}
handler.Get()->Release();
return WIN_SetErrorFromHRESULT("WASAPI can't activate requested audio endpoint", ret);
}
// !!! FIXME: the problems in SDL2 that needed this to be synchronous are _probably_ solved by SDL3, and this can block indefinitely if a user prompt is shown to get permission to use a microphone.
handler.Get()->WaitForCompletion(); // block here until we have an answer, so this is synchronous to us after all.
HRESULT activateRes = S_OK;
IUnknown *iunknown = nullptr;
const HRESULT getActivateRes = async->GetActivateResult(&activateRes, &iunknown);
async->Release();
if (FAILED(getActivateRes)) {
return WIN_SetErrorFromHRESULT("Failed to get WASAPI activate result", getActivateRes);
} else if (FAILED(activateRes)) {
return WIN_SetErrorFromHRESULT("Failed to activate WASAPI device", activateRes);
}
iunknown->QueryInterface(IID_PPV_ARGS(&device->hidden->client));
if (!device->hidden->client) {
return SDL_SetError("Failed to query WASAPI client interface");
}
if (!WASAPI_PrepDevice(device)) {
return false;
}
return true;
}
void WASAPI_PlatformThreadInit(SDL_AudioDevice *device)
{
// !!! FIXME: set this thread to "Pro Audio" priority.
SDL_SetThreadPriority(device->recording ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
}
void WASAPI_PlatformThreadDeinit(SDL_AudioDevice *device)
{
// !!! FIXME: set this thread to "Pro Audio" priority.
}
void WASAPI_PlatformFreeDeviceHandle(SDL_AudioDevice *device)
{
SDL_free(device->handle);
}
#endif // SDL_AUDIO_DRIVER_WASAPI && defined(SDL_PLATFORM_WINRT)

View File

@ -76,7 +76,7 @@ void SDL_GDKResumeGPU(SDL_GPUDevice *device)
#endif #endif
#if !(defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK)) #if !(defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
SDL_DECLSPEC SDL_bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst); SDL_DECLSPEC SDL_bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
SDL_bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst) SDL_bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
@ -103,25 +103,6 @@ void SDL_UnregisterApp(void)
#endif #endif
#ifndef SDL_PLATFORM_WINRT
// Returns SDL_WinRT_DeviceFamily enum
SDL_DECLSPEC int SDLCALL SDL_GetWinRTDeviceFamily(void);
int SDL_GetWinRTDeviceFamily(void)
{
SDL_Unsupported();
return 0; // SDL_WINRT_DEVICEFAMILY_UNKNOWN
}
SDL_DECLSPEC const char *SDLCALL SDL_GetWinRTFSPath(int pathType); // SDL_WinRT_Path pathType
const char *SDL_GetWinRTFSPath(int pathType)
{
(void)pathType;
SDL_Unsupported();
return NULL;
}
#endif
#ifndef SDL_PLATFORM_ANDROID #ifndef SDL_PLATFORM_ANDROID
SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void); SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);

View File

@ -20,8 +20,6 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#ifndef SDL_PLATFORM_WINRT
#include "SDL_hid.h" #include "SDL_hid.h"
HidD_GetString_t SDL_HidD_GetManufacturerString; HidD_GetString_t SDL_HidD_GetManufacturerString;
@ -82,9 +80,7 @@ void WIN_UnloadHIDDLL(void)
} }
} }
#endif // !SDL_PLATFORM_WINRT #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
// CM_Register_Notification definitions // CM_Register_Notification definitions
@ -253,4 +249,4 @@ void WIN_QuitDeviceNotification(void)
{ {
} }
#endif // !SDL_PLATFORM_WINRT && !SDL_PLATFORM_XBOXONE && !SDL_PLATFORM_XBOXSERIES #endif // !SDL_PLATFORM_XBOXONE && !SDL_PLATFORM_XBOXSERIES

View File

@ -25,8 +25,6 @@
#include "SDL_windows.h" #include "SDL_windows.h"
#ifndef SDL_PLATFORM_WINRT
typedef LONG NTSTATUS; typedef LONG NTSTATUS;
typedef USHORT USAGE; typedef USHORT USAGE;
typedef struct _HIDP_PREPARSED_DATA *PHIDP_PREPARSED_DATA; typedef struct _HIDP_PREPARSED_DATA *PHIDP_PREPARSED_DATA;
@ -208,9 +206,6 @@ extern HidP_GetValueCaps_t SDL_HidP_GetValueCaps;
extern HidP_MaxDataListLength_t SDL_HidP_MaxDataListLength; extern HidP_MaxDataListLength_t SDL_HidP_MaxDataListLength;
extern HidP_GetData_t SDL_HidP_GetData; extern HidP_GetData_t SDL_HidP_GetData;
#endif // !SDL_PLATFORM_WINRT
void WIN_InitDeviceNotification(void); void WIN_InitDeviceNotification(void);
Uint64 WIN_GetLastDeviceNotification(void); Uint64 WIN_GetLastDeviceNotification(void);
void WIN_QuitDeviceNotification(void); void WIN_QuitDeviceNotification(void);

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "SDL_windows.h" #include "SDL_windows.h"
@ -90,14 +90,7 @@ WIN_CoInitialize(void)
If you need multi-threaded mode, call CoInitializeEx() before SDL_Init() If you need multi-threaded mode, call CoInitializeEx() before SDL_Init()
*/ */
#ifdef SDL_PLATFORM_WINRT #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
/* DLudwig: On WinRT, it is assumed that COM was initialized in main().
CoInitializeEx is available (not CoInitialize though), however
on WinRT, main() is typically declared with the [MTAThread]
attribute, which, AFAIK, should initialize COM.
*/
return S_OK;
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
// On Xbox, there's no need to call CoInitializeEx (and it's not implemented) // On Xbox, there's no need to call CoInitializeEx (and it's not implemented)
return S_OK; return S_OK;
#else #else
@ -118,12 +111,9 @@ WIN_CoInitialize(void)
void WIN_CoUninitialize(void) void WIN_CoUninitialize(void)
{ {
#ifndef SDL_PLATFORM_WINRT
CoUninitialize(); CoUninitialize();
#endif
} }
#ifndef SDL_PLATFORM_WINRT
FARPROC WIN_LoadComBaseFunction(const char *name) FARPROC WIN_LoadComBaseFunction(const char *name)
{ {
static bool s_bLoaded; static bool s_bLoaded;
@ -139,14 +129,10 @@ FARPROC WIN_LoadComBaseFunction(const char *name)
return NULL; return NULL;
} }
} }
#endif
HRESULT HRESULT
WIN_RoInitialize(void) WIN_RoInitialize(void)
{ {
#ifdef SDL_PLATFORM_WINRT
return S_OK;
#else
typedef HRESULT(WINAPI * RoInitialize_t)(RO_INIT_TYPE initType); typedef HRESULT(WINAPI * RoInitialize_t)(RO_INIT_TYPE initType);
RoInitialize_t RoInitializeFunc = (RoInitialize_t)WIN_LoadComBaseFunction("RoInitialize"); RoInitialize_t RoInitializeFunc = (RoInitialize_t)WIN_LoadComBaseFunction("RoInitialize");
if (RoInitializeFunc) { if (RoInitializeFunc) {
@ -166,21 +152,18 @@ WIN_RoInitialize(void)
} else { } else {
return E_NOINTERFACE; return E_NOINTERFACE;
} }
#endif
} }
void WIN_RoUninitialize(void) void WIN_RoUninitialize(void)
{ {
#ifndef SDL_PLATFORM_WINRT
typedef void(WINAPI * RoUninitialize_t)(void); typedef void(WINAPI * RoUninitialize_t)(void);
RoUninitialize_t RoUninitializeFunc = (RoUninitialize_t)WIN_LoadComBaseFunction("RoUninitialize"); RoUninitialize_t RoUninitializeFunc = (RoUninitialize_t)WIN_LoadComBaseFunction("RoUninitialize");
if (RoUninitializeFunc) { if (RoUninitializeFunc) {
RoUninitializeFunc(); RoUninitializeFunc();
} }
#endif
} }
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor) static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
{ {
OSVERSIONINFOEXW osvi; OSVERSIONINFOEXW osvi;
@ -202,7 +185,7 @@ static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WO
#endif #endif
// apply some static variables so we only call into the Win32 API once per process for each check. // apply some static variables so we only call into the Win32 API once per process for each check.
#if defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES) #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
#define CHECKWINVER(notdesktop_platform_result, test) return (notdesktop_platform_result); #define CHECKWINVER(notdesktop_platform_result, test) return (notdesktop_platform_result);
#else #else
#define CHECKWINVER(notdesktop_platform_result, test) \ #define CHECKWINVER(notdesktop_platform_result, test) \
@ -265,8 +248,8 @@ WASAPI doesn't need this. This is just for DirectSound/WinMM.
*/ */
char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid) char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid)
{ {
#if defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES) #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
return WIN_StringToUTF8W(name); // No registry access on WinRT/UWP and Xbox, go with what we've got. return WIN_StringToUTF8W(name); // No registry access on Xbox, go with what we've got.
#else #else
static const GUID nullguid = { 0 }; static const GUID nullguid = { 0 };
const unsigned char *ptr; const unsigned char *ptr;
@ -318,7 +301,7 @@ char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid)
result = WIN_StringToUTF8(strw); result = WIN_StringToUTF8(strw);
SDL_free(strw); SDL_free(strw);
return result ? result : WIN_StringToUTF8(name); return result ? result : WIN_StringToUTF8(name);
#endif // if SDL_PLATFORM_WINRT / else #endif
} }
BOOL WIN_IsEqualGUID(const GUID *a, const GUID *b) BOOL WIN_IsEqualGUID(const GUID *a, const GUID *b)
@ -349,7 +332,7 @@ void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect)
BOOL WIN_IsRectEmpty(const RECT *rect) BOOL WIN_IsRectEmpty(const RECT *rect)
{ {
// Calculating this manually because UWP and Xbox do not support Win32 IsRectEmpty. // Calculating this manually because Xbox does not support Win32 IsRectEmpty.
return (rect->right <= rect->left) || (rect->bottom <= rect->top); return (rect->right <= rect->left) || (rect->bottom <= rect->top);
} }
@ -389,4 +372,4 @@ int WIN_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr,
return WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpDefaultChar, lpUsedDefaultChar); return WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpDefaultChar, lpUsedDefaultChar);
} }
#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)

View File

@ -122,10 +122,8 @@ extern bool WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr);
// Sets an error message based on GetLastError(). Always return -1. // Sets an error message based on GetLastError(). Always return -1.
extern bool WIN_SetError(const char *prefix); extern bool WIN_SetError(const char *prefix);
#ifndef SDL_PLATFORM_WINRT
// Load a function from combase.dll // Load a function from combase.dll
FARPROC WIN_LoadComBaseFunction(const char *name); FARPROC WIN_LoadComBaseFunction(const char *name);
#endif
// Wrap up the oddities of CoInitialize() into a common function. // Wrap up the oddities of CoInitialize() into a common function.
extern HRESULT WIN_CoInitialize(void); extern HRESULT WIN_CoInitialize(void);

View File

@ -37,21 +37,17 @@ DWORD SDL_XInputVersion = 0;
static HMODULE s_pXInputDLL = NULL; static HMODULE s_pXInputDLL = NULL;
static int s_XInputDLLRefCount = 0; static int s_XInputDLLRefCount = 0;
#if defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES) #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
bool WIN_LoadXInputDLL(void) bool WIN_LoadXInputDLL(void)
{ {
/* Getting handles to system dlls (via LoadLibrary and its variants) is not /* Getting handles to system dlls (via LoadLibrary and its variants) is not
* supported on WinRT, thus, pointers to XInput's functions can't be * supported on Xbox, thus, pointers to XInput's functions can't be
* retrieved via GetProcAddress. * retrieved via GetProcAddress.
* *
* When on WinRT, assume that XInput is already loaded, and directly map * When on Xbox, assume that XInput is already loaded, and directly map
* its XInput.h-declared functions to the SDL_XInput* set of function * its XInput.h-declared functions to the SDL_XInput* set of function
* pointers. * pointers.
*
* Side-note: XInputGetStateEx is not available for use in WinRT.
* This seems to mean that support for the guide button is not available
* in WinRT, unfortunately.
*/ */
SDL_XInputGetState = (XInputGetState_t)XInputGetState; SDL_XInputGetState = (XInputGetState_t)XInputGetState;
SDL_XInputSetState = (XInputSetState_t)XInputSetState; SDL_XInputSetState = (XInputSetState_t)XInputSetState;
@ -68,7 +64,7 @@ void WIN_UnloadXInputDLL(void)
{ {
} }
#else // !(defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)) #else // !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
bool WIN_LoadXInputDLL(void) bool WIN_LoadXInputDLL(void)
{ {
@ -136,7 +132,7 @@ void WIN_UnloadXInputDLL(void)
} }
} }
#endif // SDL_PLATFORM_WINRT #endif
// Ends C function definitions when using C++ // Ends C function definitions when using C++
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1,43 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include <wrl.h>
int (*WINRT_SDLAppEntryPoint)(int, char **) = NULL;
extern "C"
SDL_WinRT_DeviceFamily SDL_GetWinRTDeviceFamily()
{
#if NTDDI_VERSION >= NTDDI_WIN10 // !!! FIXME: I have no idea if this is the right test. This is a UWP API, I think. Older windows should...just return "mobile"? I don't know. --ryan.
Platform::String ^ deviceFamily = Windows::System::Profile::AnalyticsInfo::VersionInfo->DeviceFamily;
if (deviceFamily->Equals("Windows.Desktop")) {
return SDL_WINRT_DEVICEFAMILY_DESKTOP;
} else if (deviceFamily->Equals("Windows.Mobile")) {
return SDL_WINRT_DEVICEFAMILY_MOBILE;
} else if (deviceFamily->Equals("Windows.Xbox")) {
return SDL_WINRT_DEVICEFAMILY_XBOX;
}
#endif
return SDL_WINRT_DEVICEFAMILY_UNKNOWN;
}

View File

@ -1,31 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifndef SDL_winrtapp_common_h_
#define SDL_winrtapp_common_h_
/* A pointer to the app's C-style main() function (which is a different
function than the WinRT app's actual entry point).
*/
extern int (*WINRT_SDLAppEntryPoint)(int, char **);
#endif // SDL_winrtapp_common_h_

View File

@ -1,758 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
// Windows includes
#include "ppltasks.h"
using namespace concurrency;
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::Devices::Input;
using namespace Windows::Graphics::Display;
using namespace Windows::Foundation;
using namespace Windows::System;
using namespace Windows::UI::Core;
using namespace Windows::UI::Input;
#if SDL_WINAPI_FAMILY_PHONE
using namespace Windows::Phone::UI::Input;
#endif
// SDL includes
extern "C" {
#include "../../video/SDL_sysvideo.h"
#include "../../events/SDL_events_c.h"
#include "../../events/SDL_keyboard_c.h"
#include "../../events/SDL_mouse_c.h"
#include "../../events/SDL_windowevents_c.h"
#include "../../render/SDL_sysrender.h"
#include "../windows/SDL_windows.h"
}
#include "../../video/winrt/SDL_winrtevents_c.h"
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
#include "SDL_winrtapp_common.h"
#include "SDL_winrtapp_direct3d.h"
#ifdef SDL_VIDEO_RENDER_D3D11
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
* when Windows 8.1 apps are about to get suspended.
*/
extern "C" void D3D11_Trim(SDL_Renderer *);
#endif
// Compile-time debugging options:
// To enable, uncomment; to disable, comment them out.
// #define LOG_POINTER_EVENTS 1
// #define LOG_WINDOW_EVENTS 1
// #define LOG_ORIENTATION_EVENTS 1
// HACK, DLudwig: record a reference to the global, WinRT 'app'/view.
// SDL/WinRT will use this throughout its code.
//
// TODO, WinRT: consider replacing SDL_WinRTGlobalApp with something
// non-global, such as something created inside
// SDL_InitSubSystem(SDL_INIT_VIDEO), or something inside
// SDL_CreateWindow().
SDL_WinRTApp ^ SDL_WinRTGlobalApp = nullptr;
ref class SDLApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
{
public:
virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView();
};
IFrameworkView ^ SDLApplicationSource::CreateView()
{
// TODO, WinRT: see if this function (CreateView) can ever get called
// more than once. For now, just prevent it from ever assigning
// SDL_WinRTGlobalApp more than once.
SDL_assert(!SDL_WinRTGlobalApp);
SDL_WinRTApp ^ app = ref new SDL_WinRTApp();
if (!SDL_WinRTGlobalApp) {
SDL_WinRTGlobalApp = app;
}
return app;
}
bool SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **))
{
WINRT_SDLAppEntryPoint = mainFunction;
auto direct3DApplicationSource = ref new SDLApplicationSource();
CoreApplication::Run(direct3DApplicationSource);
return true;
}
static void WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identifying thing into WINRT_ProcessWindowSizeChange()
{
CoreWindow ^ coreWindow = CoreWindow::GetForCurrentThread();
if (coreWindow) {
if (WINRT_GlobalSDLWindow) {
SDL_Window *window = WINRT_GlobalSDLWindow;
SDL_WindowData *data = window->internal;
int x = (int)SDL_lroundf(data->coreWindow->Bounds.Left);
int y = (int)SDL_lroundf(data->coreWindow->Bounds.Top);
int w = (int)SDL_floorf(data->coreWindow->Bounds.Width);
int h = (int)SDL_floorf(data->coreWindow->Bounds.Height);
#if SDL_WINAPI_FAMILY_PHONE && NTDDI_VERSION == NTDDI_WIN8
/* WinPhone 8.0 always keeps its native window size in portrait,
regardless of orientation. This changes in WinPhone 8.1,
in which the native window's size changes along with
orientation.
Attempt to emulate WinPhone 8.1's behavior on WinPhone 8.0, with
regards to window size. This fixes a rendering bug that occurs
when a WinPhone 8.0 app is rotated to either 90 or 270 degrees.
*/
const DisplayOrientations currentOrientation = WINRT_DISPLAY_PROPERTY(CurrentOrientation);
switch (currentOrientation) {
case DisplayOrientations::Landscape:
case DisplayOrientations::LandscapeFlipped:
{
int tmp = w;
w = h;
h = tmp;
} break;
}
#endif
const SDL_WindowFlags latestFlags = WINRT_DetectWindowFlags(window);
if (latestFlags & SDL_WINDOW_MAXIMIZED) {
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_MAXIMIZED, 0, 0);
} else {
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESTORED, 0, 0);
}
WINRT_UpdateWindowFlags(window, SDL_WINDOW_FULLSCREEN);
/* The window can move during a resize event, such as when maximizing
or resizing from a corner */
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_MOVED, x, y);
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, w, h);
}
}
}
SDL_WinRTApp::SDL_WinRTApp() : m_windowClosed(false),
m_windowVisible(true)
{
}
void SDL_WinRTApp::Initialize(CoreApplicationView ^ applicationView)
{
applicationView->Activated +=
ref new TypedEventHandler<CoreApplicationView ^, IActivatedEventArgs ^>(this, &SDL_WinRTApp::OnAppActivated);
CoreApplication::Suspending +=
ref new EventHandler<SuspendingEventArgs ^>(this, &SDL_WinRTApp::OnSuspending);
CoreApplication::Resuming +=
ref new EventHandler<Platform::Object ^>(this, &SDL_WinRTApp::OnResuming);
CoreApplication::Exiting +=
ref new EventHandler<Platform::Object ^>(this, &SDL_WinRTApp::OnExiting);
#if NTDDI_VERSION >= NTDDI_WIN10
/* HACK ALERT! Xbox One doesn't seem to detect gamepads unless something
gets registered to receive Win10's Windows.Gaming.Input.Gamepad.GamepadAdded
events. We'll register an event handler for these events here, to make
sure that gamepad detection works later on, if requested.
*/
Windows::Gaming::Input::Gamepad::GamepadAdded +=
ref new Windows::Foundation::EventHandler<Windows::Gaming::Input::Gamepad ^>(
this, &SDL_WinRTApp::OnGamepadAdded);
#endif
}
#if NTDDI_VERSION > NTDDI_WIN8
void SDL_WinRTApp::OnOrientationChanged(DisplayInformation ^ sender, Object ^ args)
#else
void SDL_WinRTApp::OnOrientationChanged(Object ^ sender)
#endif
{
#if LOG_ORIENTATION_EVENTS == 1
{
CoreWindow ^ window = CoreWindow::GetForCurrentThread();
if (window) {
SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d, CoreWindow Bounds={%f,%f,%f,%f}\n",
__FUNCTION__,
WINRT_DISPLAY_PROPERTY(CurrentOrientation),
WINRT_DISPLAY_PROPERTY(NativeOrientation),
WINRT_DISPLAY_PROPERTY(AutoRotationPreferences),
window->Bounds.X,
window->Bounds.Y,
window->Bounds.Width,
window->Bounds.Height);
} else {
SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d\n",
__FUNCTION__,
WINRT_DISPLAY_PROPERTY(CurrentOrientation),
WINRT_DISPLAY_PROPERTY(NativeOrientation),
WINRT_DISPLAY_PROPERTY(AutoRotationPreferences));
}
}
#endif
WINRT_ProcessWindowSizeChange();
#if SDL_WINAPI_FAMILY_PHONE
// HACK: Make sure that orientation changes
// lead to the Direct3D renderer's viewport getting updated:
//
// For some reason, this doesn't seem to need to be done on Windows 8.x,
// even when going from Landscape to LandscapeFlipped. It only seems to
// be needed on Windows Phone, at least when I tested on my devices.
// I'm not currently sure why this is, but it seems to work fine. -- David L.
//
// TODO, WinRT: do more extensive research into why orientation changes on Win 8.x don't need D3D changes, or if they might, in some cases
SDL_Window *window = WINRT_GlobalSDLWindow;
if (window) {
SDL_WindowData *data = window->internal;
int w = (int)SDL_floorf(data->coreWindow->Bounds.Width);
int h = (int)SDL_floorf(data->coreWindow->Bounds.Height);
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_RESIZED, w, h);
}
#endif
}
void SDL_WinRTApp::SetWindow(CoreWindow ^ window)
{
#if LOG_WINDOW_EVENTS == 1
SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d, window bounds={%f, %f, %f,%f}\n",
__FUNCTION__,
WINRT_DISPLAY_PROPERTY(CurrentOrientation),
WINRT_DISPLAY_PROPERTY(NativeOrientation),
WINRT_DISPLAY_PROPERTY(AutoRotationPreferences),
window->Bounds.X,
window->Bounds.Y,
window->Bounds.Width,
window->Bounds.Height);
#endif
window->SizeChanged +=
ref new TypedEventHandler<CoreWindow ^, WindowSizeChangedEventArgs ^>(this, &SDL_WinRTApp::OnWindowSizeChanged);
window->VisibilityChanged +=
ref new TypedEventHandler<CoreWindow ^, VisibilityChangedEventArgs ^>(this, &SDL_WinRTApp::OnVisibilityChanged);
window->Activated +=
ref new TypedEventHandler<CoreWindow ^, WindowActivatedEventArgs ^>(this, &SDL_WinRTApp::OnWindowActivated);
window->Closed +=
ref new TypedEventHandler<CoreWindow ^, CoreWindowEventArgs ^>(this, &SDL_WinRTApp::OnWindowClosed);
#if !SDL_WINAPI_FAMILY_PHONE
window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0);
#endif
window->PointerPressed +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerPressed);
window->PointerMoved +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerMoved);
window->PointerReleased +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerReleased);
window->PointerEntered +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerEntered);
window->PointerExited +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerExited);
window->PointerWheelChanged +=
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerWheelChanged);
#if !SDL_WINAPI_FAMILY_PHONE
// Retrieves relative-only mouse movements:
Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved +=
ref new TypedEventHandler<MouseDevice ^, MouseEventArgs ^>(this, &SDL_WinRTApp::OnMouseMoved);
#endif
window->Dispatcher->AcceleratorKeyActivated +=
ref new TypedEventHandler<CoreDispatcher ^, AcceleratorKeyEventArgs ^>(this, &SDL_WinRTApp::OnAcceleratorKeyActivated);
window->CharacterReceived +=
ref new TypedEventHandler<CoreWindow ^, CharacterReceivedEventArgs ^>(this, &SDL_WinRTApp::OnCharacterReceived);
#if NTDDI_VERSION >= NTDDI_WIN10
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested +=
ref new EventHandler<BackRequestedEventArgs ^>(this, &SDL_WinRTApp::OnBackButtonPressed);
#elif SDL_WINAPI_FAMILY_PHONE
HardwareButtons::BackPressed +=
ref new EventHandler<BackPressedEventArgs ^>(this, &SDL_WinRTApp::OnBackButtonPressed);
#endif
#if NTDDI_VERSION > NTDDI_WIN8
DisplayInformation::GetForCurrentView()->OrientationChanged +=
ref new TypedEventHandler<Windows::Graphics::Display::DisplayInformation ^, Object ^>(this, &SDL_WinRTApp::OnOrientationChanged);
#else
DisplayProperties::OrientationChanged +=
ref new DisplayPropertiesEventHandler(this, &SDL_WinRTApp::OnOrientationChanged);
#endif
#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps)
// Make sure we know when a user has opened the app's settings pane.
// This is needed in order to display a privacy policy, which needs
// to be done for network-enabled apps, as per Windows Store requirements.
using namespace Windows::UI::ApplicationSettings;
SettingsPane::GetForCurrentView()->CommandsRequested +=
ref new TypedEventHandler<SettingsPane ^, SettingsPaneCommandsRequestedEventArgs ^>(this, &SDL_WinRTApp::OnSettingsPaneCommandsRequested);
#endif
}
void SDL_WinRTApp::Load(Platform::String ^ entryPoint)
{
}
void SDL_WinRTApp::Run()
{
SDL_SetMainReady();
if (WINRT_SDLAppEntryPoint) {
// TODO, WinRT: pass the C-style main() a reasonably realistic
// representation of command line arguments.
int argc = 1;
char **argv = (char **)SDL_malloc(2 * sizeof(*argv));
if (!argv) {
return;
}
argv[0] = SDL_strdup("WinRTApp");
argv[1] = NULL;
WINRT_SDLAppEntryPoint(argc, argv);
SDL_free(argv[0]);
SDL_free(argv);
}
}
static bool IsSDLWindowEventPending(SDL_EventType windowEventID)
{
SDL_Event events[128];
const int count = SDL_PeepEvents(events, sizeof(events) / sizeof(SDL_Event), SDL_PEEKEVENT, windowEventID, windowEventID);
return (count > 0);
}
bool SDL_WinRTApp::ShouldWaitForAppResumeEvents()
{
// Don't wait if the app is visible:
if (m_windowVisible) {
return false;
}
/* Don't wait until the window-hide events finish processing.
* Do note that if an app-suspend event is sent (as indicated
* by SDL_EVENT_WILL_ENTER_BACKGROUND and SDL_EVENT_DID_ENTER_BACKGROUND
* events), then this code may be a moot point, as WinRT's
* own event pump (aka ProcessEvents()) will pause regardless
* of what we do here. This happens on Windows Phone 8, to note.
* Windows 8.x apps, on the other hand, may get a chance to run
* these.
*/
if (IsSDLWindowEventPending(SDL_EVENT_WINDOW_HIDDEN)) {
return false;
} else if (IsSDLWindowEventPending(SDL_EVENT_WINDOW_FOCUS_LOST)) {
return false;
} else if (IsSDLWindowEventPending(SDL_EVENT_WINDOW_MINIMIZED)) {
return false;
}
return true;
}
void SDL_WinRTApp::PumpEvents()
{
if (!m_windowClosed) {
if (!ShouldWaitForAppResumeEvents()) {
/* This is the normal way in which events should be pumped.
* 'ProcessAllIfPresent' will make ProcessEvents() process anywhere
* from zero to N events, and will then return.
*/
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
} else {
/* This style of event-pumping, with 'ProcessOneAndAllPending',
* will cause anywhere from one to N events to be processed. If
* at least one event is processed, the call will return. If
* no events are pending, then the call will wait until one is
* available, and will not return (to the caller) until this
* happens! This should only occur when the app is hidden.
*/
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending);
}
}
}
void SDL_WinRTApp::Uninitialize()
{
}
#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10)
void SDL_WinRTApp::OnSettingsPaneCommandsRequested(
Windows::UI::ApplicationSettings::SettingsPane ^ p,
Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^ args)
{
using namespace Platform;
using namespace Windows::UI::ApplicationSettings;
using namespace Windows::UI::Popups;
String ^ privacyPolicyURL = nullptr; // a URL to an app's Privacy Policy
String ^ privacyPolicyLabel = nullptr; // label/link text
const char *tmpHintValue = NULL; // SDL_GetHint-retrieved value, used immediately
wchar_t *tmpStr = NULL; // used for UTF8 to UCS2 conversion
// Setup a 'Privacy Policy' link, if one is available (via SDL_GetHint):
tmpHintValue = SDL_GetHint(SDL_HINT_WINRT_PRIVACY_POLICY_URL);
if (tmpHintValue && tmpHintValue[0] != '\0') {
// Convert the privacy policy's URL to UCS2:
tmpStr = WIN_UTF8ToString(tmpHintValue);
privacyPolicyURL = ref new String(tmpStr);
SDL_free(tmpStr);
// Optionally retrieve custom label-text for the link. If this isn't
// available, a default value will be used instead.
tmpHintValue = SDL_GetHint(SDL_HINT_WINRT_PRIVACY_POLICY_LABEL);
if (tmpHintValue && tmpHintValue[0] != '\0') {
tmpStr = WIN_UTF8ToString(tmpHintValue);
privacyPolicyLabel = ref new String(tmpStr);
SDL_free(tmpStr);
} else {
privacyPolicyLabel = ref new String(L"Privacy Policy");
}
// Register the link, along with a handler to be called if and when it is
// clicked:
auto cmd = ref new SettingsCommand(L"privacyPolicy", privacyPolicyLabel,
ref new UICommandInvokedHandler([=](IUICommand ^) {
Windows::System::Launcher::LaunchUriAsync(ref new Uri(privacyPolicyURL));
}));
args->Request->ApplicationCommands->Append(cmd);
}
}
#endif // if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10)
void SDL_WinRTApp::OnWindowSizeChanged(CoreWindow ^ sender, WindowSizeChangedEventArgs ^ args)
{
#if LOG_WINDOW_EVENTS == 1
SDL_Log("%s, size={%f,%f}, bounds={%f,%f,%f,%f}, current orientation=%d, native orientation=%d, auto rot. pref=%d, WINRT_GlobalSDLWindow?=%s\n",
__FUNCTION__,
args->Size.Width, args->Size.Height,
sender->Bounds.X, sender->Bounds.Y, sender->Bounds.Width, sender->Bounds.Height,
WINRT_DISPLAY_PROPERTY(CurrentOrientation),
WINRT_DISPLAY_PROPERTY(NativeOrientation),
WINRT_DISPLAY_PROPERTY(AutoRotationPreferences),
(WINRT_GlobalSDLWindow ? "yes" : "no"));
#endif
WINRT_ProcessWindowSizeChange();
}
void SDL_WinRTApp::OnVisibilityChanged(CoreWindow ^ sender, VisibilityChangedEventArgs ^ args)
{
#if LOG_WINDOW_EVENTS == 1
SDL_Log("%s, visible?=%s, bounds={%f,%f,%f,%f}, WINRT_GlobalSDLWindow?=%s\n",
__FUNCTION__,
(args->Visible ? "yes" : "no"),
sender->Bounds.X, sender->Bounds.Y,
sender->Bounds.Width, sender->Bounds.Height,
(WINRT_GlobalSDLWindow ? "yes" : "no"));
#endif
m_windowVisible = args->Visible;
if (WINRT_GlobalSDLWindow) {
bool wasSDLWindowSurfaceValid = WINRT_GlobalSDLWindow->surface_valid;
SDL_WindowFlags latestWindowFlags = WINRT_DetectWindowFlags(WINRT_GlobalSDLWindow);
if (args->Visible) {
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_SHOWN, 0, 0);
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_FOCUS_GAINED, 0, 0);
if (latestWindowFlags & SDL_WINDOW_MAXIMIZED) {
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_MAXIMIZED, 0, 0);
} else {
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_RESTORED, 0, 0);
}
} else {
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_HIDDEN, 0, 0);
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_FOCUS_LOST, 0, 0);
SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_EVENT_WINDOW_MINIMIZED, 0, 0);
}
// HACK: Prevent SDL's window-hide handling code, which currently
// triggers a fake window resize (possibly erroneously), from
// marking the SDL window's surface as invalid.
//
// A better solution to this probably involves figuring out if the
// fake window resize can be prevented.
WINRT_GlobalSDLWindow->surface_valid = wasSDLWindowSurfaceValid;
}
}
void SDL_WinRTApp::OnWindowActivated(CoreWindow ^ sender, WindowActivatedEventArgs ^ args)
{
#if LOG_WINDOW_EVENTS == 1
SDL_Log("%s, WINRT_GlobalSDLWindow?=%s\n\n",
__FUNCTION__,
(WINRT_GlobalSDLWindow ? "yes" : "no"));
#endif
/* There's no property in Win 8.x to tell whether a window is active or
not. [De]activation events are, however, sent to the app. We'll just
record those, in case the CoreWindow gets wrapped by an SDL_Window at
some future time.
*/
sender->CustomProperties->Insert("SDLHelperWindowActivationState", args->WindowActivationState);
SDL_Window *window = WINRT_GlobalSDLWindow;
if (window) {
if (args->WindowActivationState != CoreWindowActivationState::Deactivated) {
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_SHOWN, 0, 0);
if (SDL_GetKeyboardFocus() != window) {
SDL_SetKeyboardFocus(window);
}
/* Send a mouse-motion event as appropriate.
This doesn't work when called from OnPointerEntered, at least
not in WinRT CoreWindow apps (as OnPointerEntered doesn't
appear to be called after window-reactivation, at least not
in Windows 10, Build 10586.3 (November 2015 update, non-beta).
Don't do it on WinPhone 8.0 though, as CoreWindow's 'PointerPosition'
property isn't available.
*/
#if !SDL_WINAPI_FAMILY_PHONE || NTDDI_VERSION >= NTDDI_WINBLUE
Point cursorPos = WINRT_TransformCursorPosition(window, sender->PointerPosition, TransformToSDLWindowSize);
SDL_SendMouseMotion(0, window, SDL_GLOBAL_MOUSE_ID, false, cursorPos.X, cursorPos.Y);
#endif
// TODO, WinRT: see if the Win32 bugfix from https://hg.libsdl.org/SDL/rev/d278747da408 needs to be applied (on window activation)
// WIN_CheckAsyncMouseRelease(data);
// TODO, WinRT: implement clipboard support, if possible
///*
// * FIXME: Update keyboard state
// */
// WIN_CheckClipboardUpdate(data->videodata);
// HACK: Resetting the mouse-cursor here seems to fix
// https://bugzilla.libsdl.org/show_bug.cgi?id=3217, whereby a
// WinRT app's mouse cursor may switch to Windows' 'wait' cursor,
// after a user alt-tabs back into a full-screened SDL app.
// This bug does not appear to reproduce 100% of the time.
// It may be a bug in Windows itself (v.10.0.586.36, as tested,
// and the most-recent as of this writing).
SDL_SetCursor(NULL);
} else {
if (SDL_GetKeyboardFocus() == window) {
SDL_SetKeyboardFocus(NULL);
}
}
}
}
void SDL_WinRTApp::OnWindowClosed(CoreWindow ^ sender, CoreWindowEventArgs ^ args)
{
#if LOG_WINDOW_EVENTS == 1
SDL_Log("%s\n", __FUNCTION__);
#endif
m_windowClosed = true;
}
void SDL_WinRTApp::OnAppActivated(CoreApplicationView ^ applicationView, IActivatedEventArgs ^ args)
{
CoreWindow::GetForCurrentThread()->Activate();
}
void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^ args)
{
// Save app state asynchronously after requesting a deferral. Holding a deferral
// indicates that the application is busy performing suspending operations. Be
// aware that a deferral may not be held indefinitely. After about five seconds,
// the app will be forced to exit.
// ... but first, let the app know it's about to go to the background.
// The separation of events may be important, given that the deferral
// runs in a separate thread. This'll make SDL_EVENT_WILL_ENTER_BACKGROUND
// the only event among the two that runs in the main thread. Given
// that a few WinRT operations can only be done from the main thread
// (things that access the WinRT CoreWindow are one example of this),
// this could be important.
SDL_SendAppEvent(SDL_EVENT_WILL_ENTER_BACKGROUND);
SuspendingDeferral ^ deferral = args->SuspendingOperation->GetDeferral();
create_task([this, deferral]() {
// Send an app did-enter-background event immediately to observers.
// CoreDispatcher::ProcessEvents, which is the backbone on which
// SDL_WinRTApp::PumpEvents is built, will not return to its caller
// once it sends out a suspend event. Any events posted to SDL's
// event queue won't get received until the WinRT app is resumed.
// SDL_AddEventWatch() may be used to receive app-suspend events on
// WinRT.
SDL_SendAppEvent(SDL_EVENT_DID_ENTER_BACKGROUND);
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
// This is necessary for Windows 8.1, possibly elsewhere in the future.
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
#ifdef SDL_VIDEO_RENDER_D3D11
if (WINRT_GlobalSDLWindow) {
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
if (renderer && (SDL_strcmp(renderer->name, "direct3d11") == 0)) {
D3D11_Trim(renderer);
}
}
#endif
deferral->Complete();
});
}
void SDL_WinRTApp::OnResuming(Platform::Object ^ sender, Platform::Object ^ args)
{
// Restore any data or state that was unloaded on suspend. By default, data
// and state are persisted when resuming from suspend. Note that these events
// do not occur if the app was previously terminated.
SDL_SendAppEvent(SDL_EVENT_WILL_ENTER_FOREGROUND);
SDL_SendAppEvent(SDL_EVENT_DID_ENTER_FOREGROUND);
}
void SDL_WinRTApp::OnExiting(Platform::Object ^ sender, Platform::Object ^ args)
{
SDL_SendAppEvent(SDL_EVENT_TERMINATING);
}
static void WINRT_LogPointerEvent(const char *header, Windows::UI::Core::PointerEventArgs ^ args, Windows::Foundation::Point transformedPoint)
{
Uint8 button, pressed;
Windows::UI::Input::PointerPoint ^ pt = args->CurrentPoint;
WINRT_GetSDLButtonForPointerPoint(pt, &button, &pressed);
SDL_Log("%s: Position={%f,%f}, Transformed Pos={%f, %f}, MouseWheelDelta=%d, FrameId=%d, PointerId=%d, SDL button=%d pressed=%d\n",
header,
pt->Position.X, pt->Position.Y,
transformedPoint.X, transformedPoint.Y,
pt->Properties->MouseWheelDelta,
pt->FrameId,
pt->PointerId,
button,
pressed);
}
void SDL_WinRTApp::OnPointerPressed(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer pressed", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerPressedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnPointerMoved(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer moved", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerMovedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnPointerReleased(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer released", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerReleasedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnPointerEntered(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer entered", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerEnteredEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnPointerExited(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer exited", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerExitedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnPointerWheelChanged(CoreWindow ^ sender, PointerEventArgs ^ args)
{
#if LOG_POINTER_EVENTS
WINRT_LogPointerEvent("pointer wheel changed", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize));
#endif
WINRT_ProcessPointerWheelChangedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint);
}
void SDL_WinRTApp::OnMouseMoved(MouseDevice ^ mouseDevice, MouseEventArgs ^ args)
{
WINRT_ProcessMouseMovedEvent(WINRT_GlobalSDLWindow, args);
}
void SDL_WinRTApp::OnAcceleratorKeyActivated(Windows::UI::Core::CoreDispatcher ^ sender, Windows::UI::Core::AcceleratorKeyEventArgs ^ args)
{
WINRT_ProcessAcceleratorKeyActivated(args);
}
void SDL_WinRTApp::OnCharacterReceived(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CharacterReceivedEventArgs ^ args)
{
WINRT_ProcessCharacterReceivedEvent(WINRT_GlobalSDLWindow, args);
}
template <typename BackButtonEventArgs>
static void WINRT_OnBackButtonPressed(BackButtonEventArgs ^ args)
{
SDL_SendKeyboardKey(0, SDL_GLOBAL_KEYBOARD_ID, 0, SDL_SCANCODE_AC_BACK, SDL_PRESSED);
SDL_SendKeyboardKey(0, SDL_GLOBAL_KEYBOARD_ID, 0, SDL_SCANCODE_AC_BACK, SDL_RELEASED);
if (SDL_GetHintBoolean(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, false)) {
args->Handled = true;
}
}
#if NTDDI_VERSION >= NTDDI_WIN10
void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::Core::BackRequestedEventArgs ^ args)
{
WINRT_OnBackButtonPressed(args);
}
#elif SDL_WINAPI_FAMILY_PHONE
void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args)
{
WINRT_OnBackButtonPressed(args);
}
#endif
#if NTDDI_VERSION >= NTDDI_WIN10
void SDL_WinRTApp::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ gamepad)
{
/* HACK ALERT: Nothing needs to be done here, as this method currently
only exists to allow something to be registered with Win10's
GamepadAdded event, an operation that seems to be necessary to get
Xinput-based detection to work on Xbox One.
*/
}
#endif

View File

@ -1,92 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <Windows.h>
extern bool SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **));
ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFrameworkView
{
public:
SDL_WinRTApp();
// IFrameworkView Methods.
virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView);
virtual void SetWindow(Windows::UI::Core::CoreWindow ^ window);
virtual void Load(Platform::String ^ entryPoint);
virtual void Run();
virtual void Uninitialize();
internal :
// SDL-specific methods
void
PumpEvents();
protected:
bool ShouldWaitForAppResumeEvents();
// Event Handlers.
#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps)
void OnSettingsPaneCommandsRequested(
Windows::UI::ApplicationSettings::SettingsPane ^ p,
Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^ args);
#endif // if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10)
#if NTDDI_VERSION > NTDDI_WIN8
void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation ^ sender, Platform::Object ^ args);
#else
void OnOrientationChanged(Platform::Object ^ sender);
#endif
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::WindowSizeChangedEventArgs ^ args);
void OnLogicalDpiChanged(Platform::Object ^ sender);
void OnAppActivated(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args);
void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ args);
void OnResuming(Platform::Object ^ sender, Platform::Object ^ args);
void OnExiting(Platform::Object ^ sender, Platform::Object ^ args);
void OnWindowActivated(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::WindowActivatedEventArgs ^ args);
void OnWindowClosed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CoreWindowEventArgs ^ args);
void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::VisibilityChangedEventArgs ^ args);
void OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnPointerWheelChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnPointerEntered(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnPointerExited(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args);
void OnMouseMoved(Windows::Devices::Input::MouseDevice ^ mouseDevice, Windows::Devices::Input::MouseEventArgs ^ args);
void OnAcceleratorKeyActivated(Windows::UI::Core::CoreDispatcher ^ sender, Windows::UI::Core::AcceleratorKeyEventArgs ^ args);
void OnCharacterReceived(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CharacterReceivedEventArgs ^ args);
#if NTDDI_VERSION >= NTDDI_WIN10
void OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::Core::BackRequestedEventArgs ^ args);
#elif SDL_WINAPI_FAMILY_PHONE
void OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args);
#endif
#if NTDDI_VERSION >= NTDDI_WIN10
void OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ gamepad);
#endif
private:
bool m_windowClosed;
bool m_windowVisible;
};
extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;

View File

@ -1,146 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
// Windows includes
#include <agile.h>
#include <Windows.h>
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include <windows.ui.xaml.media.dxinterop.h>
#endif
// SDL includes
#include "../../video/winrt/SDL_winrtevents_c.h"
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
#include "SDL_winrtapp_common.h"
#include "SDL_winrtapp_xaml.h"
// SDL-internal globals:
bool WINRT_XAMLWasEnabled = false;
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
extern "C" ISwapChainBackgroundPanelNative *WINRT_GlobalSwapChainBackgroundPanelNative = NULL;
static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken;
#endif
/*
* Input event handlers (XAML)
*/
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
static void WINRT_OnPointerPressedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args)
{
WINRT_ProcessPointerPressedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr));
}
static void WINRT_OnPointerMovedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args)
{
WINRT_ProcessPointerMovedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr));
}
static void WINRT_OnPointerReleasedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args)
{
WINRT_ProcessPointerReleasedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr));
}
static void WINRT_OnPointerWheelChangedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args)
{
WINRT_ProcessPointerWheelChangedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr));
}
#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP
/*
* XAML-to-SDL Rendering Callback
*/
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
static void WINRT_OnRenderViaXAML(_In_ Platform::Object ^ sender, _In_ Platform::Object ^ args)
{
WINRT_CycleXAMLThread();
}
#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP
/*
* SDL + XAML Initialization
*/
bool SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPanelAsIInspectable)
{
#if SDL_WINAPI_FAMILY_PHONE
return SDL_SetError("XAML support is not yet available in Windows Phone.");
#else
// Declare C++/CX namespaces:
using namespace Platform;
using namespace Windows::Foundation;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media;
// Make sure we have a valid XAML element (to draw onto):
if (!backgroundPanelAsIInspectable) {
return SDL_InvalidParamError("backgroundPanelAsIInspectable");
}
Platform::Object ^ backgroundPanel = reinterpret_cast<Object ^>((IInspectable *)backgroundPanelAsIInspectable);
SwapChainBackgroundPanel ^ swapChainBackgroundPanel = dynamic_cast<SwapChainBackgroundPanel ^>(backgroundPanel);
if (!swapChainBackgroundPanel) {
return SDL_SetError("An unknown or unsupported type of XAML control was specified.");
}
// Setup event handlers:
swapChainBackgroundPanel->PointerPressed += ref new PointerEventHandler(WINRT_OnPointerPressedViaXAML);
swapChainBackgroundPanel->PointerReleased += ref new PointerEventHandler(WINRT_OnPointerReleasedViaXAML);
swapChainBackgroundPanel->PointerWheelChanged += ref new PointerEventHandler(WINRT_OnPointerWheelChangedViaXAML);
swapChainBackgroundPanel->PointerMoved += ref new PointerEventHandler(WINRT_OnPointerMovedViaXAML);
// Setup for rendering:
IInspectable *panelInspectable = (IInspectable *)reinterpret_cast<IInspectable *>(swapChainBackgroundPanel);
panelInspectable->QueryInterface(__uuidof(ISwapChainBackgroundPanelNative), (void **)&WINRT_GlobalSwapChainBackgroundPanelNative);
WINRT_XAMLAppEventToken = CompositionTarget::Rendering::add(ref new EventHandler<Object ^>(WINRT_OnRenderViaXAML));
// Make sure the app is ready to call the SDL-centric main() function:
WINRT_SDLAppEntryPoint = mainFunction;
SDL_SetMainReady();
// Make sure video-init knows that we're initializing XAML:
bool oldXAMLWasEnabledValue = WINRT_XAMLWasEnabled;
WINRT_XAMLWasEnabled = true;
// Make sure video modes are detected now, while we still have access to the WinRT
// CoreWindow. WinRT will not allow the app's CoreWindow to be accessed via the
// SDL/WinRT thread.
if (!SDL_InitSubSystem(SDL_INIT_VIDEO)) {
// SDL_InitSubSystem will, on error, set the SDL error. Let that propagate to
// the caller to here:
WINRT_XAMLWasEnabled = oldXAMLWasEnabledValue;
return false;
}
// All done, for now.
return true;
#endif // SDL_WINAPI_FAMILY_PHONE
}

View File

@ -1,31 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifndef SDL_winrtapp_xaml_h_
#define SDL_winrtapp_xaml_h_
#ifdef __cplusplus
extern bool WINRT_XAMLWasEnabled;
extern bool SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPanelAsIInspectable);
#endif // ifdef __cplusplus
#endif // SDL_winrtapp_xaml_h_

View File

@ -23,7 +23,7 @@
#include "SDL_cpuinfo_c.h" #include "SDL_cpuinfo_c.h"
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINRT) || defined(SDL_PLATFORM_GDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "../core/windows/SDL_windows.h" #include "../core/windows/SDL_windows.h"
#endif #endif

View File

@ -49,8 +49,6 @@
#define SDL_DYNAMIC_API 0 #define SDL_DYNAMIC_API 0
#elif defined(SDL_PLATFORM_EMSCRIPTEN) // probably not useful on Emscripten. #elif defined(SDL_PLATFORM_EMSCRIPTEN) // probably not useful on Emscripten.
#define SDL_DYNAMIC_API 0 #define SDL_DYNAMIC_API 0
#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT // probably not useful on WinRT, given current .dll loading restrictions
#define SDL_DYNAMIC_API 0
#elif defined(SDL_PLATFORM_PS2) && SDL_PLATFORM_PS2 #elif defined(SDL_PLATFORM_PS2) && SDL_PLATFORM_PS2
#define SDL_DYNAMIC_API 0 #define SDL_DYNAMIC_API 0
#elif defined(SDL_PLATFORM_PSP) && SDL_PLATFORM_PSP #elif defined(SDL_PLATFORM_PSP) && SDL_PLATFORM_PSP

View File

@ -504,8 +504,6 @@ SDL3_0.0.0 {
SDL_GetUserFolder; SDL_GetUserFolder;
SDL_GetVersion; SDL_GetVersion;
SDL_GetVideoDriver; SDL_GetVideoDriver;
SDL_GetWinRTDeviceFamily;
SDL_GetWinRTFSPath;
SDL_GetWindowAspectRatio; SDL_GetWindowAspectRatio;
SDL_GetWindowBordersSize; SDL_GetWindowBordersSize;
SDL_GetWindowDisplayScale; SDL_GetWindowDisplayScale;

View File

@ -529,8 +529,6 @@
#define SDL_GetUserFolder SDL_GetUserFolder_REAL #define SDL_GetUserFolder SDL_GetUserFolder_REAL
#define SDL_GetVersion SDL_GetVersion_REAL #define SDL_GetVersion SDL_GetVersion_REAL
#define SDL_GetVideoDriver SDL_GetVideoDriver_REAL #define SDL_GetVideoDriver SDL_GetVideoDriver_REAL
#define SDL_GetWinRTDeviceFamily SDL_GetWinRTDeviceFamily_REAL
#define SDL_GetWinRTFSPath SDL_GetWinRTFSPath_REAL
#define SDL_GetWindowAspectRatio SDL_GetWindowAspectRatio_REAL #define SDL_GetWindowAspectRatio SDL_GetWindowAspectRatio_REAL
#define SDL_GetWindowBordersSize SDL_GetWindowBordersSize_REAL #define SDL_GetWindowBordersSize SDL_GetWindowBordersSize_REAL
#define SDL_GetWindowDisplayScale SDL_GetWindowDisplayScale_REAL #define SDL_GetWindowDisplayScale SDL_GetWindowDisplayScale_REAL

View File

@ -549,8 +549,6 @@ SDL_DYNAPI_PROC(SDL_Finger**,SDL_GetTouchFingers,(SDL_TouchID a, int *b),(a,b),r
SDL_DYNAPI_PROC(const char*,SDL_GetUserFolder,(SDL_Folder a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetUserFolder,(SDL_Folder a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetVersion,(void),(),return) SDL_DYNAPI_PROC(int,SDL_GetVersion,(void),(),return)
SDL_DYNAPI_PROC(const char*,SDL_GetVideoDriver,(int a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetVideoDriver,(int a),(a),return)
SDL_DYNAPI_PROC(SDL_WinRT_DeviceFamily,SDL_GetWinRTDeviceFamily,(void),(),return)
SDL_DYNAPI_PROC(const char*,SDL_GetWinRTFSPath,(SDL_WinRT_Path a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowAspectRatio,(SDL_Window *a, float *b, float *c),(a,b,c),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowAspectRatio,(SDL_Window *a, float *b, float *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowBordersSize,(SDL_Window *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowBordersSize,(SDL_Window *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(float,SDL_GetWindowDisplayScale,(SDL_Window *a),(a),return) SDL_DYNAPI_PROC(float,SDL_GetWindowDisplayScale,(SDL_Window *a),(a),return)

View File

@ -37,10 +37,6 @@ typedef struct IDirect3DDevice9 IDirect3DDevice9;
typedef struct XTaskQueueHandle XTaskQueueHandle; typedef struct XTaskQueueHandle XTaskQueueHandle;
#endif #endif
#ifndef SDL_PLATFORM_WINRT
typedef int SDL_WinRT_DeviceFamily;
typedef int SDL_WinRT_Path;
#endif
#ifndef SDL_PLATFORM_GDK #ifndef SDL_PLATFORM_GDK
typedef struct XUserHandle XUserHandle; typedef struct XUserHandle XUserHandle;
#endif #endif

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) || defined(SDL_PLATFORM_WINRT) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "../core/windows/SDL_windows.h" #include "../core/windows/SDL_windows.h"
#endif #endif
@ -54,7 +54,7 @@ struct SDL_IOStream
#include "../core/android/SDL_android.h" #include "../core/android/SDL_android.h"
#endif #endif
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) || defined(SDL_PLATFORM_WINRT) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
typedef struct IOStreamWindowsData typedef struct IOStreamWindowsData
{ {
@ -75,7 +75,7 @@ typedef struct IOStreamWindowsData
static bool SDLCALL windows_file_open(IOStreamWindowsData *iodata, const char *filename, const char *mode) static bool SDLCALL windows_file_open(IOStreamWindowsData *iodata, const char *filename, const char *mode)
{ {
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) && !defined(SDL_PLATFORM_WINRT) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
UINT old_error_mode; UINT old_error_mode;
#endif #endif
HANDLE h; HANDLE h;
@ -108,7 +108,7 @@ static bool SDLCALL windows_file_open(IOStreamWindowsData *iodata, const char *f
if (!iodata->data) { if (!iodata->data) {
return false; return false;
} }
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) && !defined(SDL_PLATFORM_WINRT) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
// Do not open a dialog box if failure // Do not open a dialog box if failure
old_error_mode = old_error_mode =
SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS); SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
@ -116,17 +116,6 @@ static bool SDLCALL windows_file_open(IOStreamWindowsData *iodata, const char *f
{ {
LPWSTR str = WIN_UTF8ToStringW(filename); LPWSTR str = WIN_UTF8ToStringW(filename);
#if defined(SDL_PLATFORM_WINRT)
CREATEFILE2_EXTENDED_PARAMETERS extparams;
SDL_zero(extparams);
extparams.dwSize = sizeof(extparams);
extparams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
h = CreateFile2(str,
(w_right | r_right),
(w_right) ? 0 : FILE_SHARE_READ,
(must_exist | truncate | a_mode),
&extparams);
#else
h = CreateFileW(str, h = CreateFileW(str,
(w_right | r_right), (w_right | r_right),
(w_right) ? 0 : FILE_SHARE_READ, (w_right) ? 0 : FILE_SHARE_READ,
@ -134,11 +123,10 @@ static bool SDLCALL windows_file_open(IOStreamWindowsData *iodata, const char *f
(must_exist | truncate | a_mode), (must_exist | truncate | a_mode),
FILE_ATTRIBUTE_NORMAL, FILE_ATTRIBUTE_NORMAL,
NULL); NULL);
#endif
SDL_free(str); SDL_free(str);
} }
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) && !defined(SDL_PLATFORM_WINRT) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
// restore old behavior // restore old behavior
SetErrorMode(old_error_mode); SetErrorMode(old_error_mode);
#endif #endif
@ -522,18 +510,10 @@ static SDL_bool SDLCALL mem_close(void *userdata)
#if defined(HAVE_STDIO_H) && !defined(SDL_PLATFORM_WINDOWS) #if defined(HAVE_STDIO_H) && !defined(SDL_PLATFORM_WINDOWS)
static bool IsRegularFileOrPipe(FILE *f) static bool IsRegularFileOrPipe(FILE *f)
{ {
#ifdef SDL_PLATFORM_WINRT
struct __stat64 st;
if (_fstat64(_fileno(f), &st) < 0 ||
!((st.st_mode & _S_IFMT) == _S_IFREG || (st.st_mode & _S_IFMT) == _S_IFIFO)) {
return false;
}
#else
struct stat st; struct stat st;
if (fstat(fileno(f), &st) < 0 || !(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode))) { if (fstat(fileno(f), &st) < 0 || !(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode))) {
return false; return false;
} }
#endif
return true; return true;
} }
#endif #endif
@ -624,7 +604,7 @@ SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)
} }
} }
#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) || defined(SDL_PLATFORM_WINRT) #elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
IOStreamWindowsData *iodata = (IOStreamWindowsData *) SDL_malloc(sizeof (*iodata)); IOStreamWindowsData *iodata = (IOStreamWindowsData *) SDL_malloc(sizeof (*iodata));
if (!iodata) { if (!iodata) {
return NULL; return NULL;
@ -655,10 +635,7 @@ SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)
#elif defined(HAVE_STDIO_H) #elif defined(HAVE_STDIO_H)
{ {
#if defined(SDL_PLATFORM_WINRT) #if defined(SDL_PLATFORM_3DS)
FILE *fp = NULL;
fopen_s(&fp, file, mode);
#elif defined(SDL_PLATFORM_3DS)
FILE *fp = N3DS_FileOpen(file, mode); FILE *fp = N3DS_FileOpen(file, mode);
#else #else
FILE *fp = fopen(file, mode); FILE *fp = fopen(file, mode);

View File

@ -1,262 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
/* TODO, WinRT: remove the need to compile this with C++/CX (/ZW) extensions, and if possible, without C++ at all
*/
#ifdef SDL_PLATFORM_WINRT
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// System dependent filesystem routines
extern "C" {
#include "../../core/windows/SDL_windows.h"
#include "../SDL_sysfilesystem.h"
}
#include <string>
#include <unordered_map>
using namespace std;
using namespace Windows::Storage;
static const wchar_t *SDL_GetWinRTFSPathUNICODE(SDL_WinRT_Path pathType)
{
switch (pathType) {
case SDL_WINRT_PATH_INSTALLED_LOCATION:
{
static wstring path;
if (path.empty()) {
#if defined(NTDDI_WIN10_19H1) && (NTDDI_VERSION >= NTDDI_WIN10_19H1) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // Only PC supports mods
// Windows 1903 supports mods, via the EffectiveLocation API
if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) {
path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data();
} else {
path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
}
#else
path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
#endif
}
return path.c_str();
}
case SDL_WINRT_PATH_LOCAL_FOLDER:
{
static wstring path;
if (path.empty()) {
path = ApplicationData::Current->LocalFolder->Path->Data();
}
return path.c_str();
}
#if !SDL_WINAPI_FAMILY_PHONE || NTDDI_VERSION > NTDDI_WIN8
case SDL_WINRT_PATH_ROAMING_FOLDER:
{
static wstring path;
if (path.empty()) {
path = ApplicationData::Current->RoamingFolder->Path->Data();
}
return path.c_str();
}
case SDL_WINRT_PATH_TEMP_FOLDER:
{
static wstring path;
if (path.empty()) {
path = ApplicationData::Current->TemporaryFolder->Path->Data();
}
return path.c_str();
}
#endif
default:
break;
}
SDL_Unsupported();
return NULL;
}
extern "C" const char *SDL_GetWinRTFSPath(SDL_WinRT_Path pathType)
{
typedef unordered_map<SDL_WinRT_Path, string> UTF8PathMap;
static UTF8PathMap utf8Paths;
UTF8PathMap::iterator searchResult = utf8Paths.find(pathType);
if (searchResult != utf8Paths.end()) {
return searchResult->second.c_str();
}
const wchar_t *ucs2Path = SDL_GetWinRTFSPathUNICODE(pathType);
if (!ucs2Path) {
return NULL;
}
char *utf8Path = WIN_StringToUTF8W(ucs2Path);
utf8Paths[pathType] = utf8Path;
SDL_free(utf8Path);
return SDL_GetPersistentString(utf8Paths[pathType].c_str());
}
extern "C" char *SDL_SYS_GetBasePath(void)
{
const char *srcPath = SDL_GetWinRTFSPath(SDL_WINRT_PATH_INSTALLED_LOCATION);
size_t destPathLen;
char *destPath = NULL;
if (!srcPath) {
SDL_SetError("Couldn't locate our basepath: %s", SDL_GetError());
return NULL;
}
destPathLen = SDL_strlen(srcPath) + 2;
destPath = (char *)SDL_malloc(destPathLen);
if (!destPath) {
return NULL;
}
SDL_snprintf(destPath, destPathLen, "%s\\", srcPath);
return destPath;
}
extern "C" char *SDL_SYS_GetPrefPath(const char *org, const char *app)
{
/* WinRT note: The 'SHGetFolderPath' API that is used in Windows 7 and
* earlier is not available on WinRT or Windows Phone. WinRT provides
* a similar API, but SHGetFolderPath can't be called, at least not
* without violating Microsoft's app-store requirements.
*/
const WCHAR *srcPath = NULL;
WCHAR path[MAX_PATH];
char *result = NULL;
WCHAR *worg = NULL;
WCHAR *wapp = NULL;
size_t new_wpath_len = 0;
BOOL api_result = FALSE;
if (!app) {
SDL_InvalidParamError("app");
return NULL;
}
if (!org) {
org = "";
}
srcPath = SDL_GetWinRTFSPathUNICODE(SDL_WINRT_PATH_LOCAL_FOLDER);
if (!srcPath) {
SDL_SetError("Unable to find a source path");
return NULL;
}
if (SDL_wcslen(srcPath) >= MAX_PATH) {
SDL_SetError("Path too long.");
return NULL;
}
SDL_wcslcpy(path, srcPath, SDL_arraysize(path));
worg = WIN_UTF8ToStringW(org);
if (!worg) {
return NULL;
}
wapp = WIN_UTF8ToStringW(app);
if (!wapp) {
SDL_free(worg);
return NULL;
}
new_wpath_len = SDL_wcslen(worg) + SDL_wcslen(wapp) + SDL_wcslen(path) + 3;
if ((new_wpath_len + 1) > MAX_PATH) {
SDL_free(worg);
SDL_free(wapp);
SDL_SetError("Path too long.");
return NULL;
}
if (*worg) {
SDL_wcslcat(path, L"\\", new_wpath_len + 1);
SDL_wcslcat(path, worg, new_wpath_len + 1);
SDL_free(worg);
}
api_result = CreateDirectoryW(path, NULL);
if (api_result == FALSE) {
if (GetLastError() != ERROR_ALREADY_EXISTS) {
SDL_free(wapp);
WIN_SetError("Couldn't create a prefpath.");
return NULL;
}
}
SDL_wcslcat(path, L"\\", new_wpath_len + 1);
SDL_wcslcat(path, wapp, new_wpath_len + 1);
SDL_free(wapp);
api_result = CreateDirectoryW(path, NULL);
if (api_result == FALSE) {
if (GetLastError() != ERROR_ALREADY_EXISTS) {
WIN_SetError("Couldn't create a prefpath.");
return NULL;
}
}
SDL_wcslcat(path, L"\\", new_wpath_len + 1);
result = WIN_StringToUTF8W(path);
return result;
}
char *SDL_SYS_GetUserFolder(SDL_Folder folder)
{
wstring wpath;
switch (folder) {
#define CASEPATH(sym, var) case sym: wpath = Windows::Storage::UserDataPaths::GetDefault()->var->Data(); break
CASEPATH(SDL_FOLDER_HOME, Profile);
CASEPATH(SDL_FOLDER_DESKTOP, Desktop);
CASEPATH(SDL_FOLDER_DOCUMENTS, Documents);
CASEPATH(SDL_FOLDER_DOWNLOADS, Downloads);
CASEPATH(SDL_FOLDER_MUSIC, Music);
CASEPATH(SDL_FOLDER_PICTURES, Pictures);
CASEPATH(SDL_FOLDER_SCREENSHOTS, Screenshots);
CASEPATH(SDL_FOLDER_TEMPLATES, Templates);
CASEPATH(SDL_FOLDER_VIDEOS, Videos);
#undef CASEPATH
#define UNSUPPPORTED_CASEPATH(sym) SDL_SetError("The %s folder is unsupported on WinRT", #sym); return NULL;
UNSUPPPORTED_CASEPATH(SDL_FOLDER_PUBLICSHARE);
UNSUPPPORTED_CASEPATH(SDL_FOLDER_SAVEDGAMES);
#undef UNSUPPPORTED_CASEPATH
default:
SDL_SetError("Invalid SDL_Folder: %d", (int)folder);
return NULL;
};
wpath += L"\\";
return WIN_StringToUTF8W(wpath.c_str());
}
#endif // SDL_PLATFORM_WINRT

View File

@ -6248,11 +6248,9 @@ static bool D3D12_INTERNAL_CreateSwapchain(
swapchainDesc.Flags = 0; swapchainDesc.Flags = 0;
} }
#ifndef SDL_PLATFORM_WINRT
if (!IsWindow(dxgiHandle)) { if (!IsWindow(dxgiHandle)) {
return false; return false;
} }
#endif
// Create the swapchain! // Create the swapchain!
res = IDXGIFactory4_CreateSwapChainForHwnd( res = IDXGIFactory4_CreateSwapChainForHwnd(

View File

@ -832,9 +832,6 @@ int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id)
*/ */
static bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) static bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick)
{ {
#ifdef SDL_PLATFORM_WINRT
return true;
#else
// printf("JOYSTICK '%s' VID/PID 0x%.4x/0x%.4x AXES: %d\n", joystick->name, vendor, product, joystick->naxes); // printf("JOYSTICK '%s' VID/PID 0x%.4x/0x%.4x AXES: %d\n", joystick->name, vendor, product, joystick->naxes);
if (joystick->naxes == 2) { if (joystick->naxes == 2) {
@ -843,7 +840,6 @@ static bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick)
} }
return SDL_VIDPIDInList(SDL_GetJoystickVendor(joystick), SDL_GetJoystickProduct(joystick), &zero_centered_devices); return SDL_VIDPIDInList(SDL_GetJoystickVendor(joystick), SDL_GetJoystickProduct(joystick), &zero_centered_devices);
#endif // SDL_PLATFORM_WINRT
} }
static bool IsROGAlly(SDL_Joystick *joystick) static bool IsROGAlly(SDL_Joystick *joystick)

View File

@ -686,13 +686,8 @@ static void RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx)
typedef HRESULT(WINAPI * WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER * hstringHeader, HSTRING * string); typedef HRESULT(WINAPI * WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER * hstringHeader, HSTRING * string);
typedef HRESULT(WINAPI * RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory); typedef HRESULT(WINAPI * RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory);
#ifdef SDL_PLATFORM_WINRT
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = WindowsCreateStringReference;
RoGetActivationFactory_t RoGetActivationFactoryFunc = RoGetActivationFactory;
#else
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference"); WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference");
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory"); RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory");
#endif
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
PCWSTR pNamespace = L"Windows.Gaming.Input.Gamepad"; PCWSTR pNamespace = L"Windows.Gaming.Input.Gamepad";
HSTRING_HEADER hNamespaceStringHeader; HSTRING_HEADER hNamespaceStringHeader;

View File

@ -88,9 +88,8 @@ static struct
WindowsGamingInputControllerState *controllers; WindowsGamingInputControllerState *controllers;
} wgi; } wgi;
/* WinRT headers in official Windows SDK contain only declarations, and we have to define these GUIDs ourselves. // WinRT headers in official Windows SDK contain only declarations, and we have to define these GUIDs ourselves.
* https://stackoverflow.com/a/55605485/1795050 // https://stackoverflow.com/a/55605485/1795050
*/
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CRawGameController, 0x00621c22, 0x42e8, 0x529f, 0x92, 0x70, 0x83, 0x6b, 0x32, 0x93, 0x1d, 0x72); DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CRawGameController, 0x00621c22, 0x42e8, 0x529f, 0x92, 0x70, 0x83, 0x6b, 0x32, 0x93, 0x1d, 0x72);
DEFINE_GUID(IID___x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics, 0x5c37b8c8, 0x37b1, 0x4ad8, 0x94, 0x58, 0x20, 0x0f, 0x1a, 0x30, 0x01, 0x8e); DEFINE_GUID(IID___x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics, 0x5c37b8c8, 0x37b1, 0x4ad8, 0x94, 0x58, 0x20, 0x0f, 0x1a, 0x30, 0x01, 0x8e);
DEFINE_GUID(IID___x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics2, 0x52b5d744, 0xbb86, 0x445a, 0xb5, 0x9c, 0x59, 0x6f, 0x0e, 0x2a, 0x49, 0xdf); DEFINE_GUID(IID___x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics2, 0x52b5d744, 0xbb86, 0x445a, 0xb5, 0x9c, 0x59, 0x6f, 0x0e, 0x2a, 0x49, 0xdf);
@ -592,13 +591,6 @@ static bool WGI_JoystickInit(void)
return SDL_SetError("RoInitialize() failed"); return SDL_SetError("RoInitialize() failed");
} }
#ifdef SDL_PLATFORM_WINRT
wgi.CoIncrementMTAUsage = CoIncrementMTAUsage;
wgi.RoGetActivationFactory = RoGetActivationFactory;
wgi.WindowsCreateStringReference = WindowsCreateStringReference;
wgi.WindowsDeleteString = WindowsDeleteString;
wgi.WindowsGetStringRawBuffer = WindowsGetStringRawBuffer;
#else
#define RESOLVE(x) wgi.x = (x##_t)WIN_LoadComBaseFunction(#x); if (!wgi.x) return WIN_SetError("GetProcAddress failed for " #x); #define RESOLVE(x) wgi.x = (x##_t)WIN_LoadComBaseFunction(#x); if (!wgi.x) return WIN_SetError("GetProcAddress failed for " #x);
RESOLVE(CoIncrementMTAUsage); RESOLVE(CoIncrementMTAUsage);
RESOLVE(RoGetActivationFactory); RESOLVE(RoGetActivationFactory);
@ -606,9 +598,7 @@ static bool WGI_JoystickInit(void)
RESOLVE(WindowsDeleteString); RESOLVE(WindowsDeleteString);
RESOLVE(WindowsGetStringRawBuffer); RESOLVE(WindowsGetStringRawBuffer);
#undef RESOLVE #undef RESOLVE
#endif // SDL_PLATFORM_WINRT
#ifndef SDL_PLATFORM_WINRT
{ {
/* There seems to be a bug in Windows where a dependency of WGI can be unloaded from memory prior to WGI itself. /* There seems to be a bug in Windows where a dependency of WGI can be unloaded from memory prior to WGI itself.
* This results in Windows_Gaming_Input!GameController::~GameController() invoking an unloaded DLL and crashing. * This results in Windows_Gaming_Input!GameController::~GameController() invoking an unloaded DLL and crashing.
@ -623,7 +613,6 @@ static bool WGI_JoystickInit(void)
} }
} }
} }
#endif
WGI_LoadRawGameControllerStatics(); WGI_LoadRawGameControllerStatics();

View File

@ -36,7 +36,7 @@
#include "../../thread/SDL_systhread.h" #include "../../thread/SDL_systhread.h"
#include "../../core/windows/SDL_windows.h" #include "../../core/windows/SDL_windows.h"
#include "../../core/windows/SDL_hid.h" #include "../../core/windows/SDL_hid.h"
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#include <dbt.h> #include <dbt.h>
#endif #endif
@ -79,7 +79,7 @@ void WINDOWS_RAWINPUTEnabledChanged(void)
SetWindowsDeviceChanged(); SetWindowsDeviceChanged();
} }
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
typedef struct typedef struct
{ {
@ -211,9 +211,7 @@ static bool SDL_WaitForDeviceNotification(SDL_DeviceNotificationData *data, SDL_
return (lastret != -1); return (lastret != -1);
} }
#endif // !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #endif // !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#ifndef SDL_PLATFORM_WINRT
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
static SDL_DeviceNotificationData s_notification_data; static SDL_DeviceNotificationData s_notification_data;
@ -320,8 +318,6 @@ static void SDL_StopJoystickThread(void)
s_joystickThread = NULL; s_joystickThread = NULL;
} }
#endif // !defined(SDL_PLATFORM_WINRT)
void WINDOWS_AddJoystickDevice(JoyStick_DeviceData *device) void WINDOWS_AddJoystickDevice(JoyStick_DeviceData *device)
{ {
device->send_add_event = true; device->send_add_event = true;
@ -348,7 +344,7 @@ static bool WINDOWS_JoystickInit(void)
WIN_InitDeviceNotification(); WIN_InitDeviceNotification();
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
s_bJoystickThread = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_THREAD, false); s_bJoystickThread = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_THREAD, false);
if (s_bJoystickThread) { if (s_bJoystickThread) {
if (!SDL_StartJoystickThread()) { if (!SDL_StartJoystickThread()) {
@ -639,7 +635,7 @@ void WINDOWS_JoystickQuit(void)
} }
SYS_Joystick = NULL; SYS_Joystick = NULL;
#if !defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
if (s_bJoystickThread) { if (s_bJoystickThread) {
SDL_StopJoystickThread(); SDL_StopJoystickThread();
} else { } else {

View File

@ -29,23 +29,13 @@
void *SDL_LoadObject(const char *sofile) void *SDL_LoadObject(const char *sofile)
{ {
void *handle;
LPWSTR wstr;
if (!sofile) { if (!sofile) {
SDL_InvalidParamError("sofile"); SDL_InvalidParamError("sofile");
return NULL; return NULL;
} }
wstr = WIN_UTF8ToStringW(sofile);
#ifdef SDL_PLATFORM_WINRT LPWSTR wstr = WIN_UTF8ToStringW(sofile);
/* WinRT only publicly supports LoadPackagedLibrary() for loading .dll void *handle = (void *)LoadLibrary(wstr);
files. LoadLibrary() is a private API, and not available for apps
(that can be published to MS' Windows Store.)
*/
handle = (void *)LoadPackagedLibrary(wstr, 0);
#else
handle = (void *)LoadLibrary(wstr);
#endif
SDL_free(wstr); SDL_free(wstr);
// Generate an error message if all loads failed // Generate an error message if all loads failed

View File

@ -1,54 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include <windows.h>
#include "../SDL_syslocale.h"
// using namespace Windows::Graphics::Display;
#include <wchar.h>
bool SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
{
WCHAR wbuffer[128] = L"";
int rc = 0;
// !!! FIXME: do we not have GetUserPreferredUILanguages on WinPhone or UWP?
#if SDL_WINAPI_FAMILY_PHONE
rc = GetLocaleInfoEx(LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_SNAME, wbuffer, SDL_arraysize(wbuffer));
#else
rc = GetSystemDefaultLocaleName(wbuffer, SDL_arraysize(wbuffer));
#endif
if (rc > 0) {
// Need to convert LPWSTR to LPSTR, that is wide char to char.
int i;
if (((size_t)rc) >= (buflen - 1)) {
rc = (int)(buflen - 1);
}
for (i = 0; i < rc; i++) {
buf[i] = (char)wbuffer[i]; // assume this was ASCII anyhow.
}
}
return true;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

View File

@ -1,2 +0,0 @@
#include "winres.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 5000 CURSOR "SDL3-WinRTResource_BlankCursor.cur"

View File

@ -1,45 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include "../../core/winrt/SDL_winrtapp_direct3d.h"
#include "../../core/winrt/SDL_winrtapp_xaml.h"
#include <wrl.h>
extern "C"
int SDL_RunApp(int, char**, SDL_main_func mainFunction, void * xamlBackgroundPanel)
{
if (xamlBackgroundPanel) {
if (!SDL_WinRTInitXAMLApp(mainFunction, xamlBackgroundPanel)) {
return 1;
}
} else {
if (FAILED(Windows::Foundation::Initialize(RO_INIT_MULTITHREADED))) {
return 1;
}
if (!SDL_WinRTInitNonXAMLApp(mainFunction)) {
return 1;
}
}
return 0;
}

View File

@ -1,38 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include "../SDL_sysurl.h"
#include "../../core/windows/SDL_windows.h"
bool SDL_SYS_OpenURL(const char *url)
{
WCHAR *wurl = WIN_UTF8ToStringW(url);
if (!wurl) {
return false;
}
auto strurl = ref new Platform::String(wurl);
SDL_free(wurl);
auto uri = ref new Windows::Foundation::Uri(strurl);
Windows::System::Launcher::LaunchUriAsync(uri);
return true; // oh well, we're not waiting on an async task here.
}

View File

@ -71,9 +71,6 @@ static SDL_GetPowerInfo_Impl implementations[] = {
#ifdef SDL_POWER_N3DS // handles N3DS. #ifdef SDL_POWER_N3DS // handles N3DS.
SDL_GetPowerInfo_N3DS, SDL_GetPowerInfo_N3DS,
#endif #endif
#ifdef SDL_POWER_WINRT // handles WinRT
SDL_GetPowerInfo_WinRT,
#endif
#ifdef SDL_POWER_EMSCRIPTEN // handles Emscripten #ifdef SDL_POWER_EMSCRIPTEN // handles Emscripten
SDL_GetPowerInfo_Emscripten, SDL_GetPowerInfo_Emscripten,
#endif #endif

View File

@ -38,7 +38,6 @@ bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *);
bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *); bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *);
bool SDL_GetPowerInfo_VITA(SDL_PowerState *, int *, int *); bool SDL_GetPowerInfo_VITA(SDL_PowerState *, int *, int *);
bool SDL_GetPowerInfo_N3DS(SDL_PowerState *, int *, int *); bool SDL_GetPowerInfo_N3DS(SDL_PowerState *, int *, int *);
bool SDL_GetPowerInfo_WinRT(SDL_PowerState *, int *, int *);
bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *); bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *);
// this one is static in SDL_power.c // this one is static in SDL_power.c

View File

@ -1,39 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifndef SDL_POWER_DISABLED
#if SDL_POWER_WINRT
extern "C" bool
SDL_GetPowerInfo_WinRT(SDL_PowerState *state, int *seconds, int *percent)
{
// TODO, WinRT: Battery info is available on at least one WinRT platform (Windows Phone 8). Implement SDL_GetPowerInfo_WinRT as appropriate.
/* Notes:
- the Win32 function, GetSystemPowerStatus, is not available for use on WinRT
- Windows Phone 8 has a 'Battery' class, which is documented as available for C++
- More info on WP8's Battery class can be found at http://msdn.microsoft.com/library/windowsphone/develop/jj207231
*/
return false;
}
#endif // SDL_POWER_WINRT
#endif // SDL_POWER_DISABLED

View File

@ -24,9 +24,7 @@
#define COBJMACROS #define COBJMACROS
#include "../../core/windows/SDL_windows.h" #include "../../core/windows/SDL_windows.h"
#ifndef SDL_PLATFORM_WINRT
#include "../../video/windows/SDL_windowswindow.h" #include "../../video/windows/SDL_windowswindow.h"
#endif
#include "../SDL_sysrender.h" #include "../SDL_sysrender.h"
#include "../SDL_d3dmath.h" #include "../SDL_d3dmath.h"
#include "../../video/SDL_pixels_c.h" #include "../../video/SDL_pixels_c.h"
@ -37,22 +35,6 @@
#include "SDL_shaders_d3d11.h" #include "SDL_shaders_d3d11.h"
#ifdef SDL_PLATFORM_WINRT
#if NTDDI_VERSION > NTDDI_WIN8
#include <dxgi1_3.h>
#endif
#include "SDL_render_winrt.h"
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include <windows.ui.xaml.media.dxinterop.h>
// TODO, WinRT, XAML: get the ISwapChainBackgroundPanelNative from something other than a global var
extern ISwapChainBackgroundPanelNative *WINRT_GlobalSwapChainBackgroundPanelNative;
#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP
#endif // SDL_PLATFORM_WINRT
#if defined(_MSC_VER) && !defined(__clang__) #if defined(_MSC_VER) && !defined(__clang__)
#define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str #define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str
#else #else
@ -222,14 +204,7 @@ typedef struct
int currentVertexBuffer; int currentVertexBuffer;
} D3D11_RenderData; } D3D11_RenderData;
/* Define D3D GUIDs here so we don't have to include uuid.lib. // Define D3D GUIDs here so we don't have to include uuid.lib.
*
* Fix for SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3437:
* The extra 'SDL_' was added to the start of each IID's name, in order
* to prevent build errors on both MinGW-w64 and WinRT/UWP.
* (SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3336 led to
* linker errors in WinRT/UWP builds.)
*/
#ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA #ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -238,9 +213,6 @@ typedef struct
static const GUID SDL_IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; static const GUID SDL_IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } };
static const GUID SDL_IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; static const GUID SDL_IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } };
#if defined(SDL_PLATFORM_WINRT) && NTDDI_VERSION > NTDDI_WIN8
static const GUID SDL_IID_IDXGIDevice3 = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } };
#endif
static const GUID SDL_IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } }; static const GUID SDL_IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } };
static const GUID SDL_IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; static const GUID SDL_IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } };
static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { 0x8e, 0x6b, 0x38, 0x8b, 0x8c, 0xfa, 0x90, 0xe1 } }; static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { 0x8e, 0x6b, 0x38, 0x8b, 0x8c, 0xfa, 0x90, 0xe1 } };
@ -555,10 +527,6 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
// See if we need debug interfaces // See if we need debug interfaces
createDebug = SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D11_DEBUG, false); createDebug = SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D11_DEBUG, false);
#ifdef SDL_PLATFORM_WINRT
CreateDXGIFactory2Func = CreateDXGIFactory2;
D3D11CreateDeviceFunc = D3D11CreateDevice;
#else
data->hDXGIMod = SDL_LoadObject("dxgi.dll"); data->hDXGIMod = SDL_LoadObject("dxgi.dll");
if (!data->hDXGIMod) { if (!data->hDXGIMod) {
result = E_FAIL; result = E_FAIL;
@ -585,7 +553,6 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
result = E_FAIL; result = E_FAIL;
goto done; goto done;
} }
#endif // SDL_PLATFORM_WINRT
if (createDebug) { if (createDebug) {
#ifdef __IDXGIInfoQueue_INTERFACE_DEFINED__ #ifdef __IDXGIInfoQueue_INTERFACE_DEFINED__
@ -897,13 +864,7 @@ static bool D3D11_GetViewportAlignedD3DRect(SDL_Renderer *renderer, const SDL_Re
static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h) static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
{ {
D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal; D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal;
#ifdef SDL_PLATFORM_WINRT
IUnknown *coreWindow = D3D11_GetCoreWindowFromSDLRenderer(renderer);
const BOOL usingXAML = (!coreWindow);
#else
IUnknown *coreWindow = NULL; IUnknown *coreWindow = NULL;
const BOOL usingXAML = FALSE;
#endif
IDXGISwapChain3 *swapChain3 = NULL; IDXGISwapChain3 *swapChain3 = NULL;
HRESULT result = S_OK; HRESULT result = S_OK;
@ -928,27 +889,17 @@ static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
swapChainDesc.SampleDesc.Quality = 0; swapChainDesc.SampleDesc.Quality = 0;
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
swapChainDesc.BufferCount = 2; // Use double-buffering to minimize latency. swapChainDesc.BufferCount = 2; // Use double-buffering to minimize latency.
#if SDL_WINAPI_FAMILY_PHONE
swapChainDesc.Scaling = DXGI_SCALING_STRETCH; // On phone, only stretch and aspect-ratio stretch scaling are allowed.
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; // On phone, no swap effects are supported.
// TODO, WinRT: see if Win 8.x DXGI_SWAP_CHAIN_DESC1 settings are available on Windows Phone 8.1, and if there's any advantage to having them on
#else
if (usingXAML) {
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
} else {
if (WIN_IsWindows8OrGreater()) { if (WIN_IsWindows8OrGreater()) {
swapChainDesc.Scaling = DXGI_SCALING_NONE; swapChainDesc.Scaling = DXGI_SCALING_NONE;
} else { } else {
swapChainDesc.Scaling = DXGI_SCALING_STRETCH; swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
} }
}
if (SDL_GetWindowFlags(renderer->window) & SDL_WINDOW_TRANSPARENT) { if (SDL_GetWindowFlags(renderer->window) & SDL_WINDOW_TRANSPARENT) {
swapChainDesc.Scaling = DXGI_SCALING_STRETCH; swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
} else { } else {
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // All Windows Store apps must use this SwapEffect. swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // All Windows Store apps must use this SwapEffect.
} }
#endif
swapChainDesc.Flags = 0; swapChainDesc.Flags = 0;
if (coreWindow) { if (coreWindow) {
@ -962,28 +913,6 @@ static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForCoreWindow"), result); WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForCoreWindow"), result);
goto done; goto done;
} }
} else if (usingXAML) {
result = IDXGIFactory2_CreateSwapChainForComposition(data->dxgiFactory,
(IUnknown *)data->d3dDevice,
&swapChainDesc,
NULL,
&data->swapChain);
if (FAILED(result)) {
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForComposition"), result);
goto done;
}
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
result = ISwapChainBackgroundPanelNative_SetSwapChain(WINRT_GlobalSwapChainBackgroundPanelNative, (IDXGISwapChain *)data->swapChain);
if (FAILED(result)) {
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ISwapChainBackgroundPanelNative::SetSwapChain"), result);
goto done;
}
#else
SDL_SetError(SDL_COMPOSE_ERROR("XAML support is not yet available for Windows Phone"));
result = E_FAIL;
goto done;
#endif
} else { } else {
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
HWND hwnd = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(renderer->window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL); HWND hwnd = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(renderer->window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
@ -1102,11 +1031,7 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
/* The width and height of the swap chain must be based on the display's /* The width and height of the swap chain must be based on the display's
* non-rotated size. * non-rotated size.
*/ */
#ifdef SDL_PLATFORM_WINRT
SDL_GetWindowSize(renderer->window, &w, &h);
#else
SDL_GetWindowSizeInPixels(renderer->window, &w, &h); SDL_GetWindowSizeInPixels(renderer->window, &w, &h);
#endif
data->rotation = D3D11_GetCurrentRotation(); data->rotation = D3D11_GetCurrentRotation();
// SDL_Log("%s: windowSize={%d,%d}, orientation=%d\n", __FUNCTION__, w, h, (int)data->rotation); // SDL_Log("%s: windowSize={%d,%d}, orientation=%d\n", __FUNCTION__, w, h, (int)data->rotation);
if (D3D11_IsDisplayRotated90Degrees(data->rotation)) { if (D3D11_IsDisplayRotated90Degrees(data->rotation)) {
@ -1116,8 +1041,6 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
} }
if (data->swapChain) { if (data->swapChain) {
// IDXGISwapChain::ResizeBuffers is not available on Windows Phone 8.
#if !defined(SDL_PLATFORM_WINRT) || !SDL_WINAPI_FAMILY_PHONE
// If the swap chain already exists, resize it. // If the swap chain already exists, resize it.
result = IDXGISwapChain_ResizeBuffers(data->swapChain, result = IDXGISwapChain_ResizeBuffers(data->swapChain,
0, 0,
@ -1136,7 +1059,6 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGISwapChain::ResizeBuffers"), result); WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGISwapChain::ResizeBuffers"), result);
goto done; goto done;
} }
#endif
} else { } else {
result = D3D11_CreateSwapChain(renderer, w, h); result = D3D11_CreateSwapChain(renderer, w, h);
if (FAILED(result) || !data->swapChain) { if (FAILED(result) || !data->swapChain) {
@ -1144,23 +1066,7 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
} }
} }
#if !SDL_WINAPI_FAMILY_PHONE // Set the proper rotation for the swap chain.
/* Set the proper rotation for the swap chain.
*
* To note, the call for this, IDXGISwapChain1::SetRotation, is not necessary
* on Windows Phone 8.0, nor is it supported there.
*
* IDXGISwapChain1::SetRotation does seem to be available on Windows Phone 8.1,
* however I've yet to find a way to make it work. It might have something to
* do with IDXGISwapChain::ResizeBuffers appearing to not being available on
* Windows Phone 8.1 (it wasn't on Windows Phone 8.0), but I'm not 100% sure of this.
* The call doesn't appear to be entirely necessary though, and is a performance-related
* call, at least according to the following page on MSDN:
* http://code.msdn.microsoft.com/windowsapps/DXGI-swap-chain-rotation-21d13d71
* -- David L.
*
* TODO, WinRT: reexamine the docs for IDXGISwapChain1::SetRotation, see if might be available, usable, and prudent-to-call on WinPhone 8.1
*/
if (WIN_IsWindows8OrGreater()) { if (WIN_IsWindows8OrGreater()) {
if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) { if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) {
result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation); result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation);
@ -1170,7 +1076,6 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
} }
} }
} }
#endif
result = IDXGISwapChain_GetBuffer(data->swapChain, result = IDXGISwapChain_GetBuffer(data->swapChain,
0, 0,
@ -1213,26 +1118,6 @@ static HRESULT D3D11_UpdateForWindowSizeChange(SDL_Renderer *renderer)
return D3D11_CreateWindowSizeDependentResources(renderer); return D3D11_CreateWindowSizeDependentResources(renderer);
} }
void D3D11_Trim(SDL_Renderer *renderer)
{
#ifdef SDL_PLATFORM_WINRT
#if NTDDI_VERSION > NTDDI_WIN8
D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal;
HRESULT result = S_OK;
IDXGIDevice3 *dxgiDevice = NULL;
result = ID3D11Device_QueryInterface(data->d3dDevice, &SDL_IID_IDXGIDevice3, &dxgiDevice);
if (FAILED(result)) {
// WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to IDXGIDevice3", result);
return;
}
IDXGIDevice3_Trim(dxgiDevice);
SAFE_RELEASE(dxgiDevice);
#endif
#endif
}
static void D3D11_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) static void D3D11_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event)
{ {
D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal; D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal;
@ -1835,8 +1720,6 @@ static bool D3D11_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
* have the ability to write a CPU-bound pixel buffer to a rectangular * have the ability to write a CPU-bound pixel buffer to a rectangular
* subrect of a texture. Direct3D 11.1 can, however, write a pixel * subrect of a texture. Direct3D 11.1 can, however, write a pixel
* buffer to an entire texture, hence the use of a staging texture. * buffer to an entire texture, hence the use of a staging texture.
*
* TODO, WinRT: consider avoiding the use of a staging texture in D3D11_LockTexture if/when the entire texture is being updated
*/ */
ID3D11Texture2D_GetDesc(textureData->mainTexture, &stagingTextureDesc); ID3D11Texture2D_GetDesc(textureData->mainTexture, &stagingTextureDesc);
stagingTextureDesc.Width = rect->w; stagingTextureDesc.Width = rect->w;
@ -2183,7 +2066,6 @@ static bool D3D11_UpdateViewport(SDL_Renderer *renderer)
orientationAlignedViewport.w = (float)viewport->w; orientationAlignedViewport.w = (float)viewport->w;
orientationAlignedViewport.h = (float)viewport->h; orientationAlignedViewport.h = (float)viewport->h;
} }
// TODO, WinRT: get custom viewports working with non-Landscape modes (Portrait, PortraitFlipped, and LandscapeFlipped)
d3dviewport.TopLeftX = orientationAlignedViewport.x; d3dviewport.TopLeftX = orientationAlignedViewport.x;
d3dviewport.TopLeftY = orientationAlignedViewport.y; d3dviewport.TopLeftY = orientationAlignedViewport.y;
@ -2736,15 +2618,10 @@ static bool D3D11_RenderPresent(SDL_Renderer *renderer)
SDL_zero(parameters); SDL_zero(parameters);
#if SDL_WINAPI_FAMILY_PHONE
result = IDXGISwapChain_Present(data->swapChain, data->syncInterval, data->presentFlags);
#else
/* The application may optionally specify "dirty" or "scroll" /* The application may optionally specify "dirty" or "scroll"
* rects to improve efficiency in certain scenarios. * rects to improve efficiency in certain scenarios.
* This option is not available on Windows Phone 8, to note.
*/ */
result = IDXGISwapChain1_Present1(data->swapChain, data->syncInterval, data->presentFlags, &parameters); result = IDXGISwapChain1_Present1(data->swapChain, data->syncInterval, data->presentFlags, &parameters);
#endif
/* Discard the contents of the render target. /* Discard the contents of the render target.
* This is a valid operation only when the existing contents will be entirely * This is a valid operation only when the existing contents will be entirely
@ -2758,8 +2635,6 @@ static bool D3D11_RenderPresent(SDL_Renderer *renderer)
if (FAILED(result) && result != DXGI_ERROR_WAS_STILL_DRAWING) { if (FAILED(result) && result != DXGI_ERROR_WAS_STILL_DRAWING) {
/* If the device was removed either by a disconnect or a driver upgrade, we /* If the device was removed either by a disconnect or a driver upgrade, we
* must recreate all device resources. * must recreate all device resources.
*
* TODO, WinRT: consider throwing an exception if D3D11_RenderPresent fails, especially if there is a way to salvage debug info from users' machines
*/ */
if (result == DXGI_ERROR_DEVICE_REMOVED) { if (result == DXGI_ERROR_DEVICE_REMOVED) {
D3D11_HandleDeviceLost(renderer); D3D11_HandleDeviceLost(renderer);
@ -2778,22 +2653,6 @@ static bool D3D11_SetVSync(SDL_Renderer *renderer, const int vsync)
{ {
D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal; D3D11_RenderData *data = (D3D11_RenderData *)renderer->internal;
#if SDL_WINAPI_FAMILY_PHONE
/* VSync is required in Windows Phone, at least for Win Phone 8.0 and 8.1.
* Failure to use it seems to either result in:
*
* - with the D3D11 debug runtime turned OFF, vsync seemingly gets turned
* off (framerate doesn't get capped), but nothing appears on-screen
*
* - with the D3D11 debug runtime turned ON, vsync gets automatically
* turned back on, and the following gets output to the debug console:
*
* DXGI ERROR: IDXGISwapChain::Present: Interval 0 is not supported, changed to Interval 1. [ UNKNOWN ERROR #1024: ]
*/
if (vsync == 0) {
return SDL_Unsupported();
}
#endif
if (vsync < 0) { if (vsync < 0) {
return SDL_Unsupported(); return SDL_Unsupported();
} }

View File

@ -1,93 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifdef SDL_VIDEO_RENDER_D3D11
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
extern "C" {
#include "../SDL_sysrender.h"
}
#include <windows.ui.core.h>
#include <windows.graphics.display.h>
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include <windows.ui.xaml.media.dxinterop.h>
#endif
using namespace Windows::UI::Core;
using namespace Windows::Graphics::Display;
#include <DXGI.h>
#include "SDL_render_winrt.h"
extern "C" void *
D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer *renderer)
{
IInspectable *window = (IInspectable *)SDL_GetPointerProperty(SDL_GetWindowProperties(renderer->window), SDL_PROP_WINDOW_WINRT_WINDOW_POINTER, NULL);
ABI::Windows::UI::Core::ICoreWindow *coreWindow = NULL;
if (!window || FAILED(window->QueryInterface(&coreWindow))) {
return NULL;
}
IUnknown *coreWindowAsIUnknown = NULL;
coreWindow->QueryInterface(&coreWindowAsIUnknown);
coreWindow->Release();
return coreWindowAsIUnknown;
}
extern "C" DXGI_MODE_ROTATION
D3D11_GetCurrentRotation()
{
const DisplayOrientations currentOrientation = WINRT_DISPLAY_PROPERTY(CurrentOrientation);
switch (currentOrientation) {
#if SDL_WINAPI_FAMILY_PHONE
// Windows Phone rotations
case DisplayOrientations::Landscape:
return DXGI_MODE_ROTATION_ROTATE90;
case DisplayOrientations::Portrait:
return DXGI_MODE_ROTATION_IDENTITY;
case DisplayOrientations::LandscapeFlipped:
return DXGI_MODE_ROTATION_ROTATE270;
case DisplayOrientations::PortraitFlipped:
return DXGI_MODE_ROTATION_ROTATE180;
#else
// Non-Windows-Phone rotations (ex: Windows 8, Windows RT)
case DisplayOrientations::Landscape:
return DXGI_MODE_ROTATION_IDENTITY;
case DisplayOrientations::Portrait:
return DXGI_MODE_ROTATION_ROTATE270;
case DisplayOrientations::LandscapeFlipped:
return DXGI_MODE_ROTATION_ROTATE180;
case DisplayOrientations::PortraitFlipped:
return DXGI_MODE_ROTATION_ROTATE90;
#endif // SDL_WINAPI_FAMILY_PHONE
}
return DXGI_MODE_ROTATION_IDENTITY;
}
#endif // SDL_VIDEO_RENDER_D3D11

View File

@ -1,36 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifdef SDL_VIDEO_RENDER_D3D11
#ifdef __cplusplus
extern "C" {
#endif
void *D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer *renderer);
DXGI_MODE_ROTATION D3D11_GetCurrentRotation();
#ifdef __cplusplus
}
#endif
#endif // SDL_VIDEO_RENDER_D3D11

View File

@ -2040,16 +2040,6 @@ static bool GLES2_SetVSync(SDL_Renderer *renderer, const int vsync)
{ {
int interval = 0; int interval = 0;
#ifdef SDL_PLATFORM_WINRT
/* DLudwig, 2013-11-29: ANGLE for WinRT doesn't seem to work unless VSync
* is turned on. Not doing so will freeze the screen's contents to that
* of the first drawn frame.
*/
if (vsync == 0) {
return SDL_Unsupported();
}
#endif
if (!SDL_GL_SetSwapInterval(vsync)) { if (!SDL_GL_SetSwapInterval(vsync)) {
return false; return false;
} }

View File

@ -339,8 +339,8 @@ SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props,
SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnBeginThread,
SDL_FunctionPointer pfnEndThread) SDL_FunctionPointer pfnEndThread)
{ {
// rather than check this in every backend, just make sure it's correct upfront. Only allow non-NULL if non-WinRT Windows, or Microsoft GDK. // rather than check this in every backend, just make sure it's correct upfront. Only allow non-NULL if Windows, or Microsoft GDK.
#if (!defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_GDK)) || defined(SDL_PLATFORM_WINRT) #if (!defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_GDK))
if (pfnBeginThread || pfnEndThread) { if (pfnBeginThread || pfnEndThread) {
SDL_SetError("_beginthreadex/_endthreadex not supported on this platform"); SDL_SetError("_beginthreadex/_endthreadex not supported on this platform");
return NULL; return NULL;

View File

@ -38,8 +38,6 @@
#include "vita/SDL_systhread_c.h" #include "vita/SDL_systhread_c.h"
#elif defined(SDL_THREAD_N3DS) #elif defined(SDL_THREAD_N3DS)
#include "n3ds/SDL_systhread_c.h" #include "n3ds/SDL_systhread_c.h"
#elif defined(SDL_THREAD_STDCPP)
#include "stdcpp/SDL_systhread_c.h"
#elif defined(SDL_THREAD_NGAGE) #elif defined(SDL_THREAD_NGAGE)
#include "ngage/SDL_systhread_c.h" #include "ngage/SDL_systhread_c.h"
#else #else

View File

@ -1,113 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
extern "C" {
}
#include <chrono>
#include <condition_variable>
#include <ratio>
#include <system_error>
#include "SDL_sysmutex_c.h"
struct SDL_Condition
{
std::condition_variable_any cpp_cond;
};
// Create a condition variable
extern "C"
SDL_Condition *SDL_CreateCondition(void)
{
// Allocate and initialize the condition variable
try {
SDL_Condition *cond = new SDL_Condition;
return cond;
} catch (std::system_error &ex) {
SDL_SetError("unable to create a C++ condition variable: code=%d; %s", ex.code(), ex.what());
return NULL;
} catch (std::bad_alloc &) {
SDL_OutOfMemory();
return NULL;
}
}
// Destroy a condition variable
extern "C"
void SDL_DestroyCondition(SDL_Condition *cond)
{
if (cond) {
delete cond;
}
}
// Restart one of the threads that are waiting on the condition variable
extern "C"
void SDL_SignalCondition(SDL_Condition *cond)
{
if (!cond) {
return;
}
cond->cpp_cond.notify_one();
}
// Restart all threads that are waiting on the condition variable
extern "C"
void SDL_BroadcastCondition(SDL_Condition *cond)
{
if (!cond) {
return;
}
cond->cpp_cond.notify_all();
}
extern "C"
SDL_bool SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS)
{
if (!cond || !mutex) {
return true;
}
try {
std::unique_lock<std::recursive_mutex> cpp_lock(mutex->cpp_mutex, std::adopt_lock_t());
if (timeoutNS < 0) {
cond->cpp_cond.wait(cpp_lock);
cpp_lock.release();
return true;
} else {
auto wait_result = cond->cpp_cond.wait_for(
cpp_lock,
std::chrono::duration<Sint64, std::nano>(timeoutNS));
cpp_lock.release();
if (wait_result == std::cv_status::timeout) {
return false;
} else {
return true;
}
}
} catch (std::system_error &) {
return false;
}
}

View File

@ -1,85 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
extern "C" {
#include "SDL_systhread_c.h"
}
#include <system_error>
#include "SDL_sysmutex_c.h"
#include <windows.h>
extern "C"
SDL_Mutex * SDL_CreateMutex(void)
{
// Allocate and initialize the mutex
try {
SDL_Mutex *mutex = new SDL_Mutex;
return mutex;
} catch (std::system_error &ex) {
SDL_SetError("unable to create a C++ mutex: code=%d; %s", ex.code(), ex.what());
} catch (std::bad_alloc &) {
SDL_OutOfMemory();
}
return NULL;
}
extern "C"
void SDL_DestroyMutex(SDL_Mutex *mutex)
{
if (mutex) {
delete mutex;
}
}
extern "C"
void SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
{
if (mutex) {
try {
mutex->cpp_mutex.lock();
} catch (std::system_error &/*ex*/) {
SDL_assert(!"Error trying to lock mutex"); // assume we're in a lot of trouble if this assert fails.
}
}
}
extern "C"
SDL_bool SDL_TryLockMutex(SDL_Mutex *mutex)
{
bool result = true;
if (mutex) {
result = mutex->cpp_mutex.try_lock();
}
return result;
}
// Unlock the mutex
extern "C"
void SDL_UnlockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
{
if (mutex) {
mutex->cpp_mutex.unlock();
}
}

View File

@ -1,29 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include <mutex>
struct SDL_Mutex
{
std::recursive_mutex cpp_mutex;
};

View File

@ -1,118 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include <shared_mutex>
#include <system_error>
#include <Windows.h>
struct SDL_RWLock
{
std::shared_mutex cpp_mutex;
SDL_ThreadID write_owner;
};
extern "C"
SDL_RWLock *SDL_CreateRWLock(void)
{
try {
SDL_RWLock *rwlock = new SDL_RWLock;
return rwlock;
} catch (std::system_error &ex) {
SDL_SetError("unable to create a C++ rwlock: code=%d; %s", ex.code(), ex.what());
return NULL;
} catch (std::bad_alloc &) {
SDL_OutOfMemory();
return NULL;
}
}
extern "C"
void SDL_DestroyRWLock(SDL_RWLock *rwlock)
{
if (rwlock) {
delete rwlock;
}
}
extern "C"
void SDL_LockRWLockForReading(SDL_RWLock *rwlock) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
{
if (rwlock) {
try {
rwlock->cpp_mutex.lock_shared();
} catch (std::system_error &/*ex*/) {
SDL_assert(!"Error trying to lock rwlock for reading"); // assume we're in a lot of trouble if this assert fails.
//return SDL_SetError("unable to lock a C++ rwlock: code=%d; %s", ex.code(), ex.what());
}
}
}
extern "C"
void SDL_LockRWLockForWriting(SDL_RWLock *rwlock) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
{
if (rwlock) {
try {
rwlock->cpp_mutex.lock();
rwlock->write_owner = SDL_GetCurrentThreadID();
} catch (std::system_error &/*ex*/) {
SDL_assert(!"Error trying to lock rwlock for writing"); // assume we're in a lot of trouble if this assert fails.
//return SDL_SetError("unable to lock a C++ rwlock: code=%d; %s", ex.code(), ex.what());
}
}
}
extern "C"
SDL_bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
{
bool result = true;
if (rwlock) {
result = rwlock->cpp_mutex.try_lock_shared();
}
return result;
}
extern "C"
SDL_bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
{
bool result = true;
if (rwlock) {
result = rwlock->cpp_mutex.try_lock();
if (result) {
rwlock->write_owner = SDL_GetCurrentThreadID();
}
}
return result;
}
extern "C"
void SDL_UnlockRWLock(SDL_RWLock *rwlock) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
{
if (rwlock) {
if (rwlock->write_owner == SDL_GetCurrentThreadID()) {
rwlock->write_owner = 0;
rwlock->cpp_mutex.unlock();
} else {
rwlock->cpp_mutex.unlock_shared();
}
}
}

View File

@ -1,169 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
// Thread management routines for SDL
extern "C" {
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
}
#include <thread>
#include <system_error>
#ifdef SDL_PLATFORM_WINRT
#include <Windows.h>
#endif
static void RunThread(void *args)
{
SDL_RunThread((SDL_Thread *)args);
}
extern "C"
bool SDL_SYS_CreateThread(SDL_Thread *thread,
SDL_FunctionPointer pfnBeginThread,
SDL_FunctionPointer pfnEndThread)
{
try {
// !!! FIXME: no way to set a thread stack size here.
thread->handle = (void *)new std::thread(RunThread, thread);
return true;
} catch (std::system_error &ex) {
return SDL_SetError("unable to start a C++ thread: code=%d; %s", ex.code().value(), ex.what());
} catch (std::bad_alloc &) {
return SDL_OutOfMemory();
}
}
extern "C"
void SDL_SYS_SetupThread(const char *name)
{
// Do nothing.
}
extern "C"
SDL_ThreadID SDL_GetCurrentThreadID(void)
{
static_assert(sizeof(std::thread::id) <= sizeof(SDL_ThreadID), "std::thread::id must not be bigger than SDL_ThreadID");
SDL_ThreadID thread_id{};
const auto cpp_thread_id = std::this_thread::get_id();
SDL_memcpy(&thread_id, &cpp_thread_id, sizeof(std::thread::id));
return thread_id;
}
extern "C"
bool SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
{
#ifdef SDL_PLATFORM_WINRT
int value;
if (priority == SDL_THREAD_PRIORITY_LOW) {
value = THREAD_PRIORITY_LOWEST;
} else if (priority == SDL_THREAD_PRIORITY_HIGH) {
value = THREAD_PRIORITY_HIGHEST;
} else if (priority == SDL_THREAD_PRIORITY_TIME_CRITICAL) {
// FIXME: WinRT does not support TIME_CRITICAL! -flibit
SDL_LogWarn(SDL_LOG_CATEGORY_SYSTEM, "TIME_CRITICAL unsupported, falling back to HIGHEST");
value = THREAD_PRIORITY_HIGHEST;
} else {
value = THREAD_PRIORITY_NORMAL;
}
if (!SetThreadPriority(GetCurrentThread(), value)) {
return WIN_SetError("SetThreadPriority()");
}
return true;
#else
return SDL_Unsupported();
#endif
}
extern "C"
void SDL_SYS_WaitThread(SDL_Thread *thread)
{
if (!thread) {
return;
}
try {
std::thread *cpp_thread = (std::thread *)thread->handle;
if (cpp_thread) {
if (cpp_thread->joinable()) {
cpp_thread->join();
}
delete cpp_thread;
thread->handle = nullptr;
}
} catch (std::system_error &) {
// An error occurred when joining the thread. SDL_WaitThread does not,
// however, seem to provide a means to report errors to its callers
// though!
}
}
extern "C"
void SDL_SYS_DetachThread(SDL_Thread *thread)
{
if (!thread) {
return;
}
try {
std::thread *cpp_thread = (std::thread *)thread->handle;
if (cpp_thread) {
if (cpp_thread->joinable()) {
cpp_thread->detach();
}
delete cpp_thread;
thread->handle = nullptr;
}
} catch (std::system_error &) {
// An error occurred when detaching the thread. SDL_DetachThread does not,
// however, seem to provide a means to report errors to its callers
// though!
}
}
static thread_local SDL_TLSData *thread_local_storage;
extern "C"
void SDL_SYS_InitTLSData(void)
{
}
extern "C"
SDL_TLSData * SDL_SYS_GetTLSData(void)
{
return thread_local_storage;
}
extern "C"
bool SDL_SYS_SetTLSData(SDL_TLSData *data)
{
thread_local_storage = data;
return true;
}
extern "C"
void SDL_SYS_QuitTLSData(void)
{
}

View File

@ -1,24 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
// For a thread handle, use a void pointer to a std::thread
typedef void *SYS_ThreadHandle;

View File

@ -56,12 +56,6 @@ typedef struct CONDITION_VARIABLE
} CONDITION_VARIABLE, *PCONDITION_VARIABLE; } CONDITION_VARIABLE, *PCONDITION_VARIABLE;
#endif #endif
#ifdef SDL_PLATFORM_WINRT
#define pWakeConditionVariable WakeConditionVariable
#define pWakeAllConditionVariable WakeAllConditionVariable
#define pSleepConditionVariableSRW SleepConditionVariableSRW
#define pSleepConditionVariableCS SleepConditionVariableCS
#else
typedef VOID(WINAPI *pfnWakeConditionVariable)(PCONDITION_VARIABLE); typedef VOID(WINAPI *pfnWakeConditionVariable)(PCONDITION_VARIABLE);
typedef VOID(WINAPI *pfnWakeAllConditionVariable)(PCONDITION_VARIABLE); typedef VOID(WINAPI *pfnWakeAllConditionVariable)(PCONDITION_VARIABLE);
typedef BOOL(WINAPI *pfnSleepConditionVariableSRW)(PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG); typedef BOOL(WINAPI *pfnSleepConditionVariableSRW)(PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG);
@ -71,7 +65,6 @@ static pfnWakeConditionVariable pWakeConditionVariable = NULL;
static pfnWakeAllConditionVariable pWakeAllConditionVariable = NULL; static pfnWakeAllConditionVariable pWakeAllConditionVariable = NULL;
static pfnSleepConditionVariableSRW pSleepConditionVariableSRW = NULL; static pfnSleepConditionVariableSRW pSleepConditionVariableSRW = NULL;
static pfnSleepConditionVariableCS pSleepConditionVariableCS = NULL; static pfnSleepConditionVariableCS pSleepConditionVariableCS = NULL;
#endif
typedef struct SDL_cond_cv typedef struct SDL_cond_cv
{ {
@ -152,7 +145,6 @@ static const SDL_cond_impl_t SDL_cond_impl_cv = {
}; };
#ifndef SDL_PLATFORM_WINRT
// Generic Condition Variable implementation using SDL_Mutex and SDL_Semaphore // Generic Condition Variable implementation using SDL_Mutex and SDL_Semaphore
static const SDL_cond_impl_t SDL_cond_impl_generic = { static const SDL_cond_impl_t SDL_cond_impl_generic = {
&SDL_CreateCondition_generic, &SDL_CreateCondition_generic,
@ -161,7 +153,6 @@ static const SDL_cond_impl_t SDL_cond_impl_generic = {
&SDL_BroadcastCondition_generic, &SDL_BroadcastCondition_generic,
&SDL_WaitConditionTimeoutNS_generic, &SDL_WaitConditionTimeoutNS_generic,
}; };
#endif
SDL_Condition *SDL_CreateCondition(void) SDL_Condition *SDL_CreateCondition(void)
{ {
@ -179,10 +170,6 @@ SDL_Condition *SDL_CreateCondition(void)
SDL_assert(SDL_mutex_impl_active.Type != SDL_MUTEX_INVALID); SDL_assert(SDL_mutex_impl_active.Type != SDL_MUTEX_INVALID);
} }
#ifdef SDL_PLATFORM_WINRT
// Link statically on this platform
impl = &SDL_cond_impl_cv;
#else
// Default to generic implementation, works with all mutex implementations // Default to generic implementation, works with all mutex implementations
impl = &SDL_cond_impl_generic; impl = &SDL_cond_impl_generic;
{ {
@ -198,7 +185,6 @@ SDL_Condition *SDL_CreateCondition(void)
} }
} }
} }
#endif
SDL_copyp(&SDL_cond_impl_active, impl); SDL_copyp(&SDL_cond_impl_active, impl);
} }

View File

@ -39,13 +39,6 @@ SDL_mutex_impl_t SDL_mutex_impl_active = { 0 };
* Implementation based on Slim Reader/Writer (SRW) Locks for Win 7 and newer. * Implementation based on Slim Reader/Writer (SRW) Locks for Win 7 and newer.
*/ */
#ifdef SDL_PLATFORM_WINRT
// Functions are guaranteed to be available
#define pInitializeSRWLock InitializeSRWLock
#define pReleaseSRWLockExclusive ReleaseSRWLockExclusive
#define pAcquireSRWLockExclusive AcquireSRWLockExclusive
#define pTryAcquireSRWLockExclusive TryAcquireSRWLockExclusive
#else
typedef VOID(WINAPI *pfnInitializeSRWLock)(PSRWLOCK); typedef VOID(WINAPI *pfnInitializeSRWLock)(PSRWLOCK);
typedef VOID(WINAPI *pfnReleaseSRWLockExclusive)(PSRWLOCK); typedef VOID(WINAPI *pfnReleaseSRWLockExclusive)(PSRWLOCK);
typedef VOID(WINAPI *pfnAcquireSRWLockExclusive)(PSRWLOCK); typedef VOID(WINAPI *pfnAcquireSRWLockExclusive)(PSRWLOCK);
@ -54,7 +47,6 @@ static pfnInitializeSRWLock pInitializeSRWLock = NULL;
static pfnReleaseSRWLockExclusive pReleaseSRWLockExclusive = NULL; static pfnReleaseSRWLockExclusive pReleaseSRWLockExclusive = NULL;
static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL; static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL;
static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL; static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL;
#endif
static SDL_Mutex *SDL_CreateMutex_srw(void) static SDL_Mutex *SDL_CreateMutex_srw(void)
{ {
@ -143,12 +135,8 @@ static SDL_Mutex *SDL_CreateMutex_cs(void)
if (mutex) { if (mutex) {
// Initialize // Initialize
// On SMP systems, a non-zero spin count generally helps performance // On SMP systems, a non-zero spin count generally helps performance
#ifdef SDL_PLATFORM_WINRT
InitializeCriticalSectionEx(&mutex->cs, 2000, 0);
#else
// This function always succeeds // This function always succeeds
(void)InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000); (void)InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000);
#endif
} }
return (SDL_Mutex *)mutex; return (SDL_Mutex *)mutex;
} }
@ -194,9 +182,6 @@ static const SDL_mutex_impl_t SDL_mutex_impl_cs = {
SDL_Mutex *SDL_CreateMutex(void) SDL_Mutex *SDL_CreateMutex(void)
{ {
if (!SDL_mutex_impl_active.Create) { if (!SDL_mutex_impl_active.Create) {
#ifdef SDL_PLATFORM_WINRT
const SDL_mutex_impl_t *impl = &SDL_mutex_impl_srw;
#else
const SDL_mutex_impl_t *impl = &SDL_mutex_impl_cs; const SDL_mutex_impl_t *impl = &SDL_mutex_impl_cs;
// Try faster implementation for Windows 7 and newer // Try faster implementation for Windows 7 and newer
@ -212,7 +197,6 @@ SDL_Mutex *SDL_CreateMutex(void)
impl = &SDL_mutex_impl_srw; impl = &SDL_mutex_impl_srw;
} }
} }
#endif // SDL_PLATFORM_WINRT
// Copy instead of using pointer to save one level of indirection // Copy instead of using pointer to save one level of indirection
SDL_copyp(&SDL_mutex_impl_active, impl); SDL_copyp(&SDL_mutex_impl_active, impl);

View File

@ -35,17 +35,6 @@ typedef VOID(WINAPI *pfnReleaseSRWLockExclusive)(PSRWLOCK);
typedef VOID(WINAPI *pfnAcquireSRWLockExclusive)(PSRWLOCK); typedef VOID(WINAPI *pfnAcquireSRWLockExclusive)(PSRWLOCK);
typedef BOOLEAN(WINAPI *pfnTryAcquireSRWLockExclusive)(PSRWLOCK); typedef BOOLEAN(WINAPI *pfnTryAcquireSRWLockExclusive)(PSRWLOCK);
#ifdef SDL_PLATFORM_WINRT
// Functions are guaranteed to be available
#define pTryAcquireSRWLockExclusive TryAcquireSRWLockExclusive
#define pInitializeSRWLock InitializeSRWLock
#define pReleaseSRWLockShared ReleaseSRWLockShared
#define pAcquireSRWLockShared AcquireSRWLockShared
#define pTryAcquireSRWLockShared TryAcquireSRWLockShared
#define pReleaseSRWLockExclusive ReleaseSRWLockExclusive
#define pAcquireSRWLockExclusive AcquireSRWLockExclusive
#define pTryAcquireSRWLockExclusive TryAcquireSRWLockExclusive
#else
static pfnInitializeSRWLock pInitializeSRWLock = NULL; static pfnInitializeSRWLock pInitializeSRWLock = NULL;
static pfnReleaseSRWLockShared pReleaseSRWLockShared = NULL; static pfnReleaseSRWLockShared pReleaseSRWLockShared = NULL;
static pfnAcquireSRWLockShared pAcquireSRWLockShared = NULL; static pfnAcquireSRWLockShared pAcquireSRWLockShared = NULL;
@ -53,7 +42,6 @@ static pfnTryAcquireSRWLockShared pTryAcquireSRWLockShared = NULL;
static pfnReleaseSRWLockExclusive pReleaseSRWLockExclusive = NULL; static pfnReleaseSRWLockExclusive pReleaseSRWLockExclusive = NULL;
static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL; static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL;
static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL; static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL;
#endif
typedef SDL_RWLock *(*pfnSDL_CreateRWLock)(void); typedef SDL_RWLock *(*pfnSDL_CreateRWLock)(void);
typedef void (*pfnSDL_DestroyRWLock)(SDL_RWLock *); typedef void (*pfnSDL_DestroyRWLock)(SDL_RWLock *);
@ -152,7 +140,6 @@ static const SDL_rwlock_impl_t SDL_rwlock_impl_srw = {
&SDL_UnlockRWLock_srw &SDL_UnlockRWLock_srw
}; };
#ifndef SDL_PLATFORM_WINRT
#include "../generic/SDL_sysrwlock_c.h" #include "../generic/SDL_sysrwlock_c.h"
@ -166,19 +153,12 @@ static const SDL_rwlock_impl_t SDL_rwlock_impl_generic = {
&SDL_TryLockRWLockForWriting_generic, &SDL_TryLockRWLockForWriting_generic,
&SDL_UnlockRWLock_generic &SDL_UnlockRWLock_generic
}; };
#endif
SDL_RWLock *SDL_CreateRWLock(void) SDL_RWLock *SDL_CreateRWLock(void)
{ {
if (!SDL_rwlock_impl_active.Create) { if (!SDL_rwlock_impl_active.Create) {
const SDL_rwlock_impl_t *impl;
#ifdef SDL_PLATFORM_WINRT
// Link statically on this platform
impl = &SDL_rwlock_impl_srw;
#else
// Default to generic implementation, works with all mutex implementations // Default to generic implementation, works with all mutex implementations
impl = &SDL_rwlock_impl_generic; const SDL_rwlock_impl_t *impl = &SDL_rwlock_impl_generic;
{ {
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll")); HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
if (kernel32) { if (kernel32) {
@ -197,7 +177,6 @@ SDL_RWLock *SDL_CreateRWLock(void)
} }
} }
} }
#endif
SDL_copyp(&SDL_rwlock_impl_active, impl); SDL_copyp(&SDL_rwlock_impl_active, impl);
} }

View File

@ -60,18 +60,11 @@ static SDL_sem_impl_t SDL_sem_impl_active = { 0 };
// APIs not available on WinPhone 8.1 // APIs not available on WinPhone 8.1
// https://www.microsoft.com/en-us/download/details.aspx?id=47328 // https://www.microsoft.com/en-us/download/details.aspx?id=47328
#if !SDL_WINAPI_FAMILY_PHONE
#ifdef SDL_PLATFORM_WINRT
// Functions are guaranteed to be available
#define pWaitOnAddress WaitOnAddress
#define pWakeByAddressSingle WakeByAddressSingle
#else
typedef BOOL(WINAPI *pfnWaitOnAddress)(volatile VOID *, PVOID, SIZE_T, DWORD); typedef BOOL(WINAPI *pfnWaitOnAddress)(volatile VOID *, PVOID, SIZE_T, DWORD);
typedef VOID(WINAPI *pfnWakeByAddressSingle)(PVOID); typedef VOID(WINAPI *pfnWakeByAddressSingle)(PVOID);
static pfnWaitOnAddress pWaitOnAddress = NULL; static pfnWaitOnAddress pWaitOnAddress = NULL;
static pfnWakeByAddressSingle pWakeByAddressSingle = NULL; static pfnWakeByAddressSingle pWakeByAddressSingle = NULL;
#endif
typedef struct SDL_semaphore_atom typedef struct SDL_semaphore_atom
{ {
@ -196,7 +189,6 @@ static const SDL_sem_impl_t SDL_sem_impl_atom = {
&SDL_GetSemaphoreValue_atom, &SDL_GetSemaphoreValue_atom,
&SDL_SignalSemaphore_atom, &SDL_SignalSemaphore_atom,
}; };
#endif // !SDL_WINAPI_FAMILY_PHONE
/** /**
* Fallback Semaphore implementation using Kernel Semaphores * Fallback Semaphore implementation using Kernel Semaphores
@ -217,12 +209,7 @@ static SDL_Semaphore *SDL_CreateSemaphore_kern(Uint32 initial_value)
sem = (SDL_sem_kern *)SDL_malloc(sizeof(*sem)); sem = (SDL_sem_kern *)SDL_malloc(sizeof(*sem));
if (sem) { if (sem) {
// Create the semaphore, with max value 32K // Create the semaphore, with max value 32K
// !!! FIXME: CreateSemaphoreEx is available in Vista and later, so if XP support is dropped, we can lose this #ifdef.
#ifdef SDL_PLATFORM_WINRT
sem->id = CreateSemaphoreEx(NULL, initial_value, 32 * 1024, NULL, 0, SEMAPHORE_ALL_ACCESS);
#else
sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL); sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL);
#endif
sem->count = initial_value; sem->count = initial_value;
if (!sem->id) { if (!sem->id) {
SDL_SetError("Couldn't create semaphore"); SDL_SetError("Couldn't create semaphore");
@ -316,12 +303,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
// Default to fallback implementation // Default to fallback implementation
const SDL_sem_impl_t *impl = &SDL_sem_impl_kern; const SDL_sem_impl_t *impl = &SDL_sem_impl_kern;
#if !SDL_WINAPI_FAMILY_PHONE
if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL, false)) { if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL, false)) {
#ifdef SDL_PLATFORM_WINRT
// Link statically on this platform
impl = &SDL_sem_impl_atom;
#else
/* We already statically link to features from this Api /* We already statically link to features from this Api
* Set (e.g. WaitForSingleObject). Dynamically loading * Set (e.g. WaitForSingleObject). Dynamically loading
* API Sets is not explicitly documented but according to * API Sets is not explicitly documented but according to
@ -338,9 +320,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
impl = &SDL_sem_impl_atom; impl = &SDL_sem_impl_atom;
} }
} }
#endif
} }
#endif
// Copy instead of using pointer to save one level of indirection // Copy instead of using pointer to save one level of indirection
SDL_copyp(&SDL_sem_impl_active, impl); SDL_copyp(&SDL_sem_impl_active, impl);

View File

@ -109,7 +109,6 @@ void SDL_SYS_SetupThread(const char *name)
{ {
if (name) { if (name) {
PVOID exceptionHandlerHandle; PVOID exceptionHandlerHandle;
#ifndef SDL_PLATFORM_WINRT // !!! FIXME: There's no LoadLibrary() in WinRT; don't know if SetThreadDescription is available there at all at the moment.
static pfnSetThreadDescription pSetThreadDescription = NULL; static pfnSetThreadDescription pSetThreadDescription = NULL;
static HMODULE kernel32 = NULL; static HMODULE kernel32 = NULL;
@ -133,7 +132,6 @@ void SDL_SYS_SetupThread(const char *name)
SDL_free(strw); SDL_free(strw);
} }
} }
#endif
/* Presumably some version of Visual Studio will understand SetThreadDescription(), /* Presumably some version of Visual Studio will understand SetThreadDescription(),
but we still need to deal with older OSes and debuggers. Set it with the arcane but we still need to deal with older OSes and debuggers. Set it with the arcane

View File

@ -27,18 +27,6 @@
#include "../SDL_thread_c.h" #include "../SDL_thread_c.h"
#if WINAPI_FAMILY_WINRT
#include <fibersapi.h>
#ifndef TLS_OUT_OF_INDEXES
#define TLS_OUT_OF_INDEXES FLS_OUT_OF_INDEXES
#endif
#define TlsAlloc() FlsAlloc(NULL)
#define TlsSetValue FlsSetValue
#define TlsGetValue FlsGetValue
#endif
static DWORD thread_local_storage = TLS_OUT_OF_INDEXES; static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
static bool generic_local_storage = false; static bool generic_local_storage = false;

View File

@ -85,9 +85,6 @@ SDL_bool SDL_GetCurrentTime(SDL_Time *ticks)
SDL_zero(ft); SDL_zero(ft);
#ifdef SDL_PLATFORM_WINRT
GetSystemTimePreciseAsFileTime(&ft);
#else
static pfnGetSystemTimePreciseAsFileTime pGetSystemTimePreciseAsFileTime = NULL; static pfnGetSystemTimePreciseAsFileTime pGetSystemTimePreciseAsFileTime = NULL;
static bool load_attempted = false; static bool load_attempted = false;
@ -105,7 +102,6 @@ SDL_bool SDL_GetCurrentTime(SDL_Time *ticks)
} else { } else {
GetSystemTimeAsFileTime(&ft); GetSystemTimeAsFileTime(&ft);
} }
#endif
*ticks = SDL_TimeFromWindows(ft.dwLowDateTime, ft.dwHighDateTime); *ticks = SDL_TimeFromWindows(ft.dwLowDateTime, ft.dwHighDateTime);

View File

@ -522,8 +522,7 @@ static Uint32 tick_denominator_ns;
static Uint32 tick_numerator_ms; static Uint32 tick_numerator_ms;
static Uint32 tick_denominator_ms; static Uint32 tick_denominator_ms;
#if defined(SDL_TIMER_WINDOWS) && \ #if defined(SDL_TIMER_WINDOWS) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
!defined(SDL_PLATFORM_WINRT) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#include <mmsystem.h> #include <mmsystem.h>
#define HAVE_TIME_BEGIN_PERIOD #define HAVE_TIME_BEGIN_PERIOD
#endif #endif

Some files were not shown because too many files have changed in this diff Show More