sdl (master post 3.1 preview) Merge commit 'e4f454091a943345938608570b104400f62fd625'

This commit is contained in:
Green Sky 2024-03-28 16:27:42 +01:00
commit c8ac631990
No known key found for this signature in database
862 changed files with 204894 additions and 45662 deletions

View File

@ -82,6 +82,7 @@ ForEachMacros:
"spa_list_for_each",
"spa_list_for_each_safe",
"wl_list_for_each",
"wl_list_for_each_safe",
"wl_array_for_each",
"udev_list_entry_foreach",
]

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.0...3.5)
project(ci_utils C CXX)
set(txt "CC=${CMAKE_C_COMPILER}

View File

@ -15,34 +15,37 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Android.mk }
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-android-arm64", apk-artifact: "SDL-android-apks-arm64" }
- { name: "Android.mk" }
- { name: "CMake", cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-android-arm64", apk-artifact: "SDL-android-apks-arm64" }
- { name: "CMake (lean and mean)", cmake: 1, cppflags: "-DSDL_LEAN_AND_MEAN=1", android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-lean-android-arm64", apk-artifact: "SDL-lean-android-apks-arm64" }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup_ndk
with:
local-cache: true
ndk-version: r21e
- name: Build (Android.mk)
if: ${{ matrix.platform.name == 'Android.mk' }}
if: ${{ contains(matrix.platform.name, 'Android.mk') }}
run: |
./build-scripts/androidbuildlibs.sh
- uses: actions/setup-java@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/setup-java@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
distribution: 'temurin'
java-version: '11'
- name: Setup (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
sudo apt-get update
sudo apt-get install ninja-build pkg-config
- name: Configure (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake -S . -B build \
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" \
-DCMAKE_CXX_FLAGS="${{ matrix.platform.cppflags }}" \
-Wdeprecated -Wdev -Werror \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DSDL_WERROR=ON \
@ -59,25 +62,25 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-GNinja
- name: Build (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build --config Release --parallel --verbose
- name: Build test apk's (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build --config Release --parallel --verbose --target testaudiocapture-apk testcontroller-apk testmultiaudio-apk testsprite-apk
- name: Install (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --install build --config Release
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
( cd prefix; find ) | LC_ALL=C sort -u
- name: Package (CPack)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build/ --config Release --target package
- name: Verify CMake configuration files
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
@ -87,19 +90,19 @@ jobs:
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
cmake --build cmake_config_build --verbose
- name: Verify sdl3.pc
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/upload-artifact@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}
path: build/dist/SDL3*
- uses: actions/upload-artifact@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/upload-artifact@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
if-no-files-found: error
name: ${{ matrix.platform.apk-artifact }}

View File

@ -26,9 +26,9 @@ jobs:
install-cmd: 'sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1',
}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
uses: cross-platform-actions/action@v0.21.1
uses: cross-platform-actions/action@v0.23.0
with:
operating_system: ${{ matrix.platform.os }}
architecture: ${{ matrix.platform.os-arch }}
@ -49,7 +49,7 @@ jobs:
rm -rf build/CMakeFiles
rm -rf build/docs
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}

View File

@ -10,8 +10,8 @@ jobs:
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mymindstorm/setup-emsdk@v12
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.35
- name: Install ninja
@ -51,7 +51,7 @@ jobs:
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
cmake --build cmake_config_build --verbose
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-emscripten

View File

@ -8,7 +8,7 @@ jobs:
name: Haiku
container: haiku/cross-compiler:x86_64-r1beta4
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apt-get install pkg-config -y
@ -50,7 +50,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-haiku

View File

@ -19,6 +19,6 @@ jobs:
- { name: tvOS, target: SDL3, sdk: appletvos }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build

View File

@ -15,13 +15,13 @@ jobs:
platform:
- { toolchain-version: 2022.09.06 }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends cmake ninja-build pkg-config tar wget
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /opt/cross-tools
@ -85,7 +85,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-loongarch64

View File

@ -89,7 +89,7 @@ jobs:
# Install oneAPI
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check that versioning is consistent
# We only need to run this once: arbitrarily use the Linux/CMake build
if: "runner.os == 'Linux'"
@ -149,7 +149,7 @@ jobs:
${{ matrix.platform.source_cmd }}
export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g')
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ always() && steps.build.outcome == 'success' }}
with:
if-no-files-found: error

View File

@ -17,8 +17,6 @@ jobs:
platform:
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64', artifact: 'SDL-VC-x64' }
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32', artifact: 'SDL-VC-x86' }
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x64' }
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x86' }
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64, artifact: 'SDL-clang-cl-x64' }
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32, artifact: 'SDL-clang-cl-x86' }
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32', notests: true }
@ -27,7 +25,7 @@ jobs:
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create CMake project using SDL as a subproject
shell: python
run: |
@ -90,11 +88,11 @@ jobs:
- name: Add msbuild to PATH
if: ${{ matrix.platform.project != '' }}
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v2
- name: Build msbuild
if: ${{ matrix.platform.project != '' }}
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ always() && steps.build.outcome == 'success' }}
with:
if-no-files-found: error

View File

@ -12,7 +12,7 @@ jobs:
container:
image: devkitpro/devkitarm:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apt update
@ -58,7 +58,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-n3ds

View File

@ -12,7 +12,7 @@ jobs:
container:
image: dockcross/linux-ppc64le:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apt-get update -y
@ -54,7 +54,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-ppc64le

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apk update
@ -53,7 +53,7 @@ jobs:
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-ps2

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
container: pspdev/pspdev:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apk update
@ -54,7 +54,7 @@ jobs:
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-psp

View File

@ -0,0 +1,425 @@
name: 'release'
run-name: 'Create SDL release artifacts for ${{ inputs.commit }}'
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit of SDL'
required: true
jobs:
src:
runs-on: ubuntu-latest
outputs:
project: ${{ steps.releaser.outputs.project }}
version: ${{ steps.releaser.outputs.version }}
src-tar-gz: ${{ steps.releaser.outputs.src-tar-gz }}
src-tar-xz: ${{ steps.releaser.outputs.src-tar-xz }}
src-zip: ${{ steps.releaser.outputs.src-zip }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Set up SDL sources'
uses: actions/checkout@v4
with:
path: 'SDL'
fetch-depth: 0
- name: 'Build Source archive'
id: releaser
shell: bash
run: |
python build-scripts/build-release.py \
--create source \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ github.workspace }}/SDL" \
--github \
--debug
- name: 'Store source archives'
uses: actions/upload-artifact@v4
with:
name: sources
path: '${{ github.workspace}}/dist'
linux-verify:
needs: [src]
runs-on: ubuntu-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
mkdir /tmp/zipdir
cd /tmp/zipdir
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=/tmp/zipdir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Compare contents of ${{ needs.src.outputs.src-zip }} and ${{ needs.src.outputs.src-tar-gz }}'
run: |
diff /tmp/zipdir /tmp/tardir
- name: 'Test versioning'
shell: bash
run: |
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
- name: 'CMake (configure + build + tests)'
run: |
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE
cmake --build /tmp/build --verbose
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
dmg:
needs: [src]
runs-on: macos-latest
outputs:
dmg: ${{ steps.releaser.outputs.dmg }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build SDL3.dmg'
id: releaser
shell: bash
run: |
python build-scripts/build-release.py \
--create xcframework \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store DMG image file'
uses: actions/upload-artifact@v4
with:
name: dmg
path: '${{ github.workspace }}/dist'
dmg-verify:
needs: [dmg, src]
runs-on: macos-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
uses: actions/download-artifact@v4
with:
name: dmg
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Mount ${{ needs.dmg.outputs.dmg }}'
id: mount
run: |
hdiutil attach '${{ github.workspace }}/${{ needs.dmg.outputs.dmg }}'
mount_point="/Volumes/${{ needs.src.outputs.project }}"
if [ ! -d "$mount_point/${{ needs.src.outputs.project }}.xcframework" ]; then
echo "Cannot find ${{ needs.src.outputs.project }}.xcframework!"
exit 1
fi
echo "mount_point=$mount_point">>$GITHUB_OUTPUT
- name: 'CMake (configure + build) Darwin'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-Werror=dev \
-B build_darwin
cmake --build build_darwin --config Release --verbose
- name: 'CMake (configure + build) iOS'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-Werror=dev \
-B build_ios
cmake --build build_ios --config Release --verbose
- name: 'CMake (configure + build) tvOS'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-Werror=dev \
-B build_tvos
cmake --build build_tvos --config Release --verbose
- name: 'CMake (configure + build) iOS simulator'
run: |
sysroot=$(xcodebuild -version -sdk iphonesimulator Path)
echo "sysroot=$sysroot"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \
-Werror=dev \
-B build_ios_simulator
cmake --build build_ios_simulator --config Release --verbose
- name: 'CMake (configure + build) tvOS simulator'
run: |
sysroot=$(xcodebuild -version -sdk appletvsimulator Path)
echo "sysroot=$sysroot"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \
-Werror=dev \
-B build_tvos_simulator
cmake --build build_tvos_simulator --config Release --verbose
msvc:
needs: [src]
runs-on: windows-2019
outputs:
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
mkdir C:\zipdir
cd C:\zipdir
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=C:\zipdir\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
- name: 'Build MSVC binary archives'
id: releaser
run: |
python build-scripts/build-release.py `
--create win32 `
--commit ${{ inputs.commit }} `
--project SDL3 `
--root "${{ steps.zip.outputs.path }}" `
--github `
--debug
- name: 'Store MSVC archives'
uses: actions/upload-artifact@v4
with:
name: win32
path: '${{ github.workspace }}/dist'
msvc-verify:
needs: [msvc, src]
runs-on: windows-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download MSVC binaries'
uses: actions/download-artifact@v4
with:
name: win32
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: src
run: |
mkdir '${{ github.workspace }}/sources'
cd '${{ github.workspace }}/sources'
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=${{ github.workspace }}/sources/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'Unzip ${{ needs.msvc.outputs.VC-devel }}'
id: bin
run: |
mkdir '${{ github.workspace }}/vc'
cd '${{ github.workspace }}/vc'
unzip "${{ github.workspace }}/${{ needs.msvc.outputs.VC-devel }}"
echo "path=${{ github.workspace }}/vc/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'CMake (configure + build + tests) x86'
run: |
$env:PATH += ";${{ steps.bin.outputs.path }}/x86"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-DTEST_FULL=TRUE `
-DTEST_STATIC=FALSE `
-DTEST_TEST=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" `
-Werror=dev `
-B build_x86 -A win32
cmake --build build_x86 --config Release --verbose
ctest --test-dir build_x86 --no-tests=error -C Release --output-on-failure
- name: 'CMake (configure + build + tests) x64'
run: |
$env:PATH += ";${{ steps.bin.outputs.path }}/x86"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-DTEST_FULL=TRUE `
-DTEST_STATIC=FALSE `
-DTEST_TEST=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" `
-Werror=dev `
-B build_x64 -A x64
cmake --build build_x64 --config Release --verbose
ctest --test-dir build_x64 --no-tests=error -C Release --output-on-failure
mingw:
needs: [src]
runs-on: ubuntu-latest
outputs:
mingw-devel-tar-gz: ${{ steps.releaser.outputs.mingw-devel-tar-gz }}
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build MinGW binary archives'
id: releaser
run: |
python build-scripts/build-release.py \
--create mingw \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store MinGW archives'
uses: actions/upload-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}/dist'
mingw-verify:
needs: [mingw, src]
runs-on: ubuntu-latest
steps:
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download MinGW binaries'
uses: actions/download-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Untar ${{ needs.mingw.outputs.mingw-devel-tar-gz }}'
id: bin
run: |
mkdir -p /tmp/mingw-tardir
tar -C /tmp/mingw-tardir -v -x -f "${{ github.workspace }}/${{ needs.mingw.outputs.mingw-devel-tar-gz }}"
echo "path=/tmp/mingw-tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'CMake (configure + build) i686'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \
-DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
-Werror=dev \
-B build_x86
cmake --build build_x86 --config Release --verbose
- name: 'CMake (configure + build) x86_64'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \
-DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
-Werror=dev \
-B build_x64
cmake --build build_x64 --config Release --verbose

View File

@ -21,7 +21,7 @@ jobs:
steps:
- name: Setup dependencies
run: apt-get update && apt-get install -y cmake ninja-build
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure (CMake)
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
@ -57,7 +57,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.platform.test_args }}
cmake --build cmake_config_build --verbose
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-riscos

View File

@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure
run: |
cmake -B build -GXcode -DCMAKE_SYSTEM_NAME=visionOS

View File

@ -24,13 +24,13 @@ jobs:
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apk update
apk add cmake ninja pkgconf bash tar
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /vita/dependencies
@ -77,7 +77,7 @@ jobs:
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
if: ${{ !steps.restore-cache.outputs.cache-hit }}
with:
path: /vita/dependencies
@ -129,7 +129,7 @@ jobs:
export CC=arm-vita-eabi-gcc
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}

View File

@ -79,7 +79,8 @@ VisualC/tests/testscale/sample.bmp
VisualC/tests/testsprite/icon.bmp
VisualC/tests/testyuv/testyuv.bmp
VisualC-GDK/**/Layout
VisualC-GDK/shaders/*.h
src/render/direct3d12/D3D12_*_One.h
src/render/direct3d12/D3D12_*_Series.h
# for Android
android-project/local.properties

View File

@ -24,6 +24,9 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/camera/*.c) \
$(wildcard $(LOCAL_PATH)/src/camera/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/camera/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/core/*.c) \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
@ -41,11 +44,15 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/main/*.c) \
$(wildcard $(LOCAL_PATH)/src/main/generic/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/posix/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
@ -53,6 +60,8 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
$(wildcard $(LOCAL_PATH)/src/time/*.c) \
$(wildcard $(LOCAL_PATH)/src/time/unix/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/*.c) \

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,8 @@ https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
hardware. It is used by video playback software, emulators, and popular games
including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting
with [README.md](docs/README.md). If you are migrating to SDL 3.0 from SDL 2.0,

View File

@ -171,7 +171,7 @@
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
<Command>$(SolutionDir)..\src\render\direct3d12\compile_shaders_xbox.bat $(SolutionDir)</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Building shader blobs (Xbox Series)</Message>
@ -205,7 +205,7 @@
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
<Command>$(SolutionDir)..\src\render\direct3d12\compile_shaders_xbox.bat $(SolutionDir) one</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Building shader blobs (Xbox One)</Message>
@ -271,7 +271,7 @@
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
<Command>$(SolutionDir)..\src\render\direct3d12\compile_shaders_xbox.bat $(SolutionDir)</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Building shader blobs (Xbox Series)</Message>
@ -306,7 +306,7 @@
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
<Command>$(SolutionDir)..\src\render\direct3d12\compile_shaders_xbox.bat $(SolutionDir) one</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Building shader blobs (Xbox One)</Message>
@ -314,6 +314,7 @@
</ItemDefinitionGroup>
<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" />
@ -363,10 +364,11 @@
<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_rwops.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_test.h" />
@ -382,6 +384,7 @@
<ClInclude Include="..\..\include\SDL3\SDL_test_memory.h" />
<ClInclude Include="..\..\include\SDL3\SDL_test_random.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" />
@ -398,12 +401,15 @@
<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\gdk\SDL_gdk.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.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" />
@ -418,11 +424,11 @@
<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\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\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
@ -499,6 +505,10 @@
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
</ClCompile>
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c" />
<ClCompile Include="..\..\src\camera\SDL_camera.c" />
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
<ClCompile Include="..\..\src\SDL_guid.c" />
@ -528,7 +538,6 @@
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
@ -566,11 +575,19 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
<ClInclude Include="..\..\src\video\windows\wmmsg.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_std.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
@ -604,6 +621,16 @@
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
</ClCompile>
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
<ClCompile Include="..\..\src\dialog\dummy\SDL_dummydialog.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">NotUsing</PrecompiledHeader>
@ -618,7 +645,7 @@
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
@ -636,19 +663,10 @@
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c">
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\..\src\joystick\controller_type.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
@ -765,6 +783,9 @@
<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>
@ -773,6 +794,8 @@
<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_syscond.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
@ -784,6 +807,8 @@
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
<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" />
@ -809,7 +834,6 @@
<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_capture.c" />
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c" />
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
@ -822,10 +846,14 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
<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>
<ItemGroup>
<ResourceCompile Include="..\..\src\core\windows\version.rc" />

View File

@ -4,6 +4,12 @@
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp" />
<ClCompile Include="..\..\src\core\windows\pch.c" />
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp" />
<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\render\direct3d12\SDL_render_d3d12_xbox.cpp" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxone.cpp" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxseries.cpp" />
@ -43,16 +49,16 @@
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
<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\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\..\src\joystick\controller_type.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
@ -146,6 +152,9 @@
<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" />
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
@ -162,6 +171,12 @@
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
<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" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
@ -196,6 +211,8 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
@ -254,7 +271,7 @@
<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_rwops.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" />
@ -295,6 +312,7 @@
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.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" />
@ -309,11 +327,13 @@
<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">
<Filter>filesystem</Filter>
</ClInclude>
<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\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
@ -384,7 +404,6 @@
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
@ -422,6 +441,8 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />

View File

@ -1,19 +0,0 @@
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define ColorRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
"DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0)"
[RootSignature(ColorRS)]
float4 main(PixelShaderInput input) : SV_TARGET0
{
return input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {0.0, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,43 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureUV : register(t1);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(NVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {0.0, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,24 +0,0 @@
Texture2D theTexture : register(t0);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define TextureRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(TextureRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
return theTexture.Sample(theSampler, input.tex) * input.color;
}

View File

@ -1,46 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureU : register(t1);
Texture2D theTextureV : register(t2);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define YUVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(YUVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,46 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureU : register(t1);
Texture2D theTextureV : register(t2);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define YUVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(YUVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,46 +0,0 @@
Texture2D theTextureY : register(t0);
Texture2D theTextureU : register(t1);
Texture2D theTextureV : register(t2);
SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define YUVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(YUVRS)]
float4 main(PixelShaderInput input) : SV_TARGET
{
const float3 offset = {0.0, -0.501960814, -0.501960814};
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
float4 Output;
float3 yuv;
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
yuv += offset;
Output.r = dot(yuv, Rcoeff);
Output.g = dot(yuv, Gcoeff);
Output.b = dot(yuv, Bcoeff);
Output.a = 1.0f;
return Output * input.color;
}

View File

@ -1,95 +0,0 @@
#pragma pack_matrix( row_major )
struct VertexShaderConstants
{
matrix model;
matrix projectionAndView;
};
ConstantBuffer<VertexShaderConstants> Constants : register(b0);
struct VertexShaderInput
{
float3 pos : POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
struct VertexShaderOutput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
#define ColorRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
"DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0)"
#define TextureRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
#define YUVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
#define NVRS \
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
" DENY_HULL_SHADER_ROOT_ACCESS )," \
"RootConstants(num32BitConstants=32, b0),"\
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
[RootSignature(ColorRS)]
VertexShaderOutput mainColor(VertexShaderInput input)
{
VertexShaderOutput output;
float4 pos = float4(input.pos, 1.0f);
// Transform the vertex position into projected space.
pos = mul(pos, Constants.model);
pos = mul(pos, Constants.projectionAndView);
output.pos = pos;
// Pass through texture coordinates and color values without transformation
output.tex = input.tex;
output.color = input.color;
return output;
}
[RootSignature(TextureRS)]
VertexShaderOutput mainTexture(VertexShaderInput input)
{
return mainColor(input);
}
[RootSignature(YUVRS)]
VertexShaderOutput mainYUV(VertexShaderInput input)
{
return mainColor(input);
}
[RootSignature(NVRS)]
VertexShaderOutput mainNV(VertexShaderInput input)
{
return mainColor(input);
}

View File

@ -1,35 +0,0 @@
if %2.==one. goto setxboxone
rem Xbox Series compile
set XBOXDXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe"
set SUFFIX=_Series.h
goto startbuild
:setxboxone
set XBOXDXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe"
set SUFFIX=_One.h
:startbuild
echo Building with %XBOXDXC%
cd "%1\shaders"
rem Root Signatures
%XBOXDXC% -E ColorRS -T rootsig_1_1 -rootsig-define ColorRS -Fh D3D12_RootSig_Color%SUFFIX% -Vn D3D12_RootSig_Color D3D12_VertexShader.hlsl
%XBOXDXC% -E TextureRS -T rootsig_1_1 -rootsig-define TextureRS -Fh D3D12_RootSig_Texture%SUFFIX% -Vn D3D12_RootSig_Texture D3D12_VertexShader.hlsl
%XBOXDXC% -E YUVRS -T rootsig_1_1 -rootsig-define YUVRS -Fh D3D12_RootSig_YUV%SUFFIX% -Vn D3D12_RootSig_YUV D3D12_VertexShader.hlsl
%XBOXDXC% -E NVRS -T rootsig_1_1 -rootsig-define NVRS -Fh D3D12_RootSig_NV%SUFFIX% -Vn D3D12_RootSig_NV D3D12_VertexShader.hlsl
rem Vertex Shaders
%XBOXDXC% -E mainColor -T vs_6_0 -Fh D3D12_VertexShader_Color%SUFFIX% -Vn D3D12_VertexShader_Color D3D12_VertexShader.hlsl
%XBOXDXC% -E mainTexture -T vs_6_0 -Fh D3D12_VertexShader_Texture%SUFFIX% -Vn D3D12_VertexShader_Texture D3D12_VertexShader.hlsl
%XBOXDXC% -E mainNV -T vs_6_0 -Fh D3D12_VertexShader_NV%SUFFIX% -Vn D3D12_VertexShader_NV D3D12_VertexShader.hlsl
%XBOXDXC% -E mainYUV -T vs_6_0 -Fh D3D12_VertexShader_YUV%SUFFIX% -Vn D3D12_VertexShader_YUV D3D12_VertexShader.hlsl
rem Pixel Shaders
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Colors%SUFFIX% -Vn D3D12_PixelShader_Colors D3D12_PixelShader_Colors.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT601%SUFFIX% -Vn D3D12_PixelShader_NV12_BT601 D3D12_PixelShader_NV12_BT601.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT709%SUFFIX% -Vn D3D12_PixelShader_NV12_BT709 D3D12_PixelShader_NV12_BT709.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV12_JPEG D3D12_PixelShader_NV12_JPEG.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT601%SUFFIX% -Vn D3D12_PixelShader_NV21_BT601 D3D12_PixelShader_NV21_BT601.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT709%SUFFIX% -Vn D3D12_PixelShader_NV21_BT709 D3D12_PixelShader_NV21_BT709.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV21_JPEG D3D12_PixelShader_NV21_JPEG.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Textures%SUFFIX% -Vn D3D12_PixelShader_Textures D3D12_PixelShader_Textures.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT601%SUFFIX% -Vn D3D12_PixelShader_YUV_BT601 D3D12_PixelShader_YUV_BT601.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT709%SUFFIX% -Vn D3D12_PixelShader_YUV_BT709 D3D12_PixelShader_YUV_BT709.hlsl
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_JPEG%SUFFIX% -Vn D3D12_PixelShader_YUV_JPEG D3D12_PixelShader_YUV_JPEG.hlsl

View File

@ -311,7 +311,7 @@ loop()
if (event.type == SDL_EVENT_KEY_DOWN && !event.key.repeat) {
SDL_Log("Initial SDL_EVENT_KEY_DOWN: %s", SDL_GetScancodeName(event.key.keysym.scancode));
}
#if defined(__XBOXONE__) || defined(__XBOXSERIES__)
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
/* On Xbox, ignore the keydown event because the features aren't supported */
if (event.type != SDL_EVENT_KEY_DOWN) {
SDLTest_CommonEvent(state, &event, &done);

View File

@ -36,6 +36,7 @@
</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" />
@ -77,19 +78,20 @@
<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_rwops.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="..\include\SDL3\SDL_video_capture.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" />
@ -99,12 +101,15 @@
<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" />
@ -118,11 +123,11 @@
<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\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\haptic\windows\SDL_xinputhaptic_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" />
@ -190,6 +195,14 @@
<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" />
@ -252,6 +265,8 @@
<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\SDL_runapp.c" />
<ClCompile Include="..\src\core\windows\SDL_windows.c" />
@ -321,12 +336,13 @@
<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_rwops.c" />
<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\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\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\src\joystick\controller_type.c" />
@ -418,6 +434,9 @@
<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>
@ -426,6 +445,8 @@
<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">
@ -502,6 +523,8 @@
</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" />
@ -523,7 +546,6 @@
<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_capture.c" />
<ClCompile Include="..\src\video\SDL_video_unsupported.c" />
<ClCompile Include="..\src\video\SDL_yuv.c" />
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
@ -614,7 +636,9 @@
<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.c" />
<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>

View File

@ -13,11 +13,32 @@
<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>
</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>
@ -132,7 +153,7 @@
<ClInclude Include="..\include\SDL3\SDL_revision.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_rwops.h">
<ClInclude Include="..\include\SDL3\SDL_iostream.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_scancode.h">
@ -165,8 +186,14 @@
<ClInclude Include="..\include\SDL3\SDL_video.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_video_capture.h">
<Filter>Header Files</Filter>
<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>
@ -216,6 +243,9 @@
<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>
@ -435,9 +465,6 @@
<ClInclude Include="..\src\SDL_list.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\windows\SDL_dinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -510,6 +537,12 @@
<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>
@ -564,10 +597,16 @@
<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_rwops.c">
<ClCompile Include="..\src\file\SDL_iostream.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\dummy\SDL_syshaptic.c">
@ -717,6 +756,15 @@
<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>
@ -753,6 +801,12 @@
<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>
@ -816,9 +870,6 @@
<ClCompile Include="..\src\video\SDL_video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_video_capture.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_video_unsupported.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -855,9 +906,6 @@
<ClCompile Include="..\src\haptic\windows\SDL_windowshaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\windows\SDL_xinputhaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\video\SDL_yuv.c">
<Filter>Source Files</Filter>
</ClCompile>

View File

@ -119,18 +119,17 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
@ -151,18 +150,17 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
@ -187,18 +185,17 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@ -220,18 +217,17 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@ -240,6 +236,7 @@
</ItemDefinitionGroup>
<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" />
@ -290,10 +287,11 @@
<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_rwops.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_test.h" />
@ -309,6 +307,7 @@
<ClInclude Include="..\..\include\SDL3\SDL_test_memory.h" />
<ClInclude Include="..\..\include\SDL3\SDL_test_random.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_version.h" />
@ -324,11 +323,14 @@
<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_hid.h" />
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.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" />
@ -344,11 +346,11 @@
<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\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\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
@ -390,6 +392,7 @@
<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\render\vulkan\SDL_shaders_vulkan.h" />
<ClInclude Include="..\..\src\SDL_assert_c.h" />
<ClInclude Include="..\..\src\SDL_error_c.h" />
<ClCompile Include="..\..\src\core\windows\pch.c">
@ -398,8 +401,15 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c" />
<ClCompile Include="..\..\src\camera\mediafoundation\SDL_camera_mediafoundation.c" />
<ClCompile Include="..\..\src\camera\SDL_camera.c" />
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
<ClCompile Include="..\..\src\SDL_guid.c" />
<ClInclude Include="..\..\src\SDL_hashtable.h" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
@ -426,7 +436,6 @@
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
@ -464,12 +473,20 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
<ClInclude Include="..\..\src\video\windows\wmmsg.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" />
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
@ -493,6 +510,7 @@
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c" />
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
@ -509,16 +527,16 @@
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.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\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\..\src\joystick\controller_type.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
@ -612,14 +630,20 @@
<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" >
<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_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\steam\SDL_steamstorage.c" />
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
@ -631,6 +655,8 @@
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
<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" />
@ -653,7 +679,6 @@
<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_video_capture.c" />
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
@ -665,10 +690,14 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
<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>
<ItemGroup>
<ResourceCompile Include="..\..\src\core\windows\version.rc" />

View File

@ -88,6 +88,9 @@
<Filter Include="joystick\dummy">
<UniqueIdentifier>{d008487d-6ed0-4251-848b-79a68e3c1459}</UniqueIdentifier>
</Filter>
<Filter Include="joystick\gdk">
<UniqueIdentifier>{c9e8273e-13ae-47dc-bef8-8ad8e64c9a3e}</UniqueIdentifier>
</Filter>
<Filter Include="joystick\hidapi">
<UniqueIdentifier>{c9e8273e-13ae-47dc-bef8-8ad8e64c9a3d}</UniqueIdentifier>
</Filter>
@ -175,11 +178,32 @@
<Filter Include="main\generic">
<UniqueIdentifier>{0000ddc7911820dbe64274d3654f0000}</UniqueIdentifier>
</Filter>
<Filter Include="camera">
<UniqueIdentifier>{0000de1b75e1a954834693f1c81e0000}</UniqueIdentifier>
</Filter>
<Filter Include="camera\dummy">
<UniqueIdentifier>{0000fc2700d453b3c8d79fe81e1c0000}</UniqueIdentifier>
</Filter>
<Filter Include="camera\mediafoundation">
<UniqueIdentifier>{0000fbfe2d21e4f451142e7d0e870000}</UniqueIdentifier>
</Filter>
<Filter Include="render\vulkan">
<UniqueIdentifier>{5115ba31-20f8-4eab-a8c5-6a572ab78ff7}</UniqueIdentifier>
</Filter>
<Filter Include="time">
<UniqueIdentifier>{00003288226ff86b99eee5b443e90000}</UniqueIdentifier>
</Filter>
<Filter Include="time\windows">
<UniqueIdentifier>{0000d7fda065b13b0ca4ab262c380000}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_camera.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_close_code.h">
<Filter>API Headers</Filter>
</ClInclude>
@ -324,7 +348,7 @@
<ClInclude Include="..\..\include\SDL3\SDL_revision.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_rwops.h">
<ClInclude Include="..\..\include\SDL3\SDL_iostream.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h">
@ -393,6 +417,15 @@
<ClInclude Include="..\..\include\SDL3\SDL_vulkan.h">
<Filter>API Headers</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\main\SDL_main_callbacks.h">
<Filter>main</Filter>
</ClInclude>
@ -441,6 +474,9 @@
<ClInclude Include="..\..\src\core\windows\SDL_directx.h">
<Filter>core\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\cpuinfo\SDL_cpuinfo_c.h">
<Filter>cpuinfo</Filter>
</ClInclude>
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h">
<Filter>dynapi</Filter>
</ClInclude>
@ -546,9 +582,6 @@
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h">
<Filter>haptic\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h">
<Filter>haptic\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h">
<Filter>joystick\hidapi</Filter>
</ClInclude>
@ -648,6 +681,12 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h">
<Filter>video\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h">
<Filter>video\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h">
<Filter>video\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h">
<Filter>video\windows</Filter>
</ClInclude>
@ -771,9 +810,6 @@
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
<Filter>video\khronos\vulkan</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
<Filter>video\khronos\vulkan</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
<Filter>video\khronos\vulkan</Filter>
</ClInclude>
@ -825,9 +861,34 @@
<Filter>render\direct3d12</Filter>
</ClInclude>
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="..\..\src\thread\generic\SDL_sysrwlock_c.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_std.h" />
<ClInclude Include="..\..\src\render\vulkan\SDL_shaders_vulkan.h">
<Filter>render\vulkan</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c">
<Filter>camera\dummy</Filter>
</ClCompile>
<ClCompile Include="..\..\src\camera\mediafoundation\SDL_camera_mediafoundation.c">
<Filter>camera\mediafoundation</Filter>
</ClCompile>
<ClCompile Include="..\..\src\camera\SDL_camera.c">
<Filter>camera</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\main\generic\SDL_sysmain_callbacks.c">
<Filter>main\generic</Filter>
</ClCompile>
@ -894,6 +955,9 @@
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c">
<Filter>cpuinfo</Filter>
</ClCompile>
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c">
<Filter>dialog</Filter>
</ClCompile>
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c">
<Filter>dynapi</Filter>
</ClCompile>
@ -927,7 +991,7 @@
<ClCompile Include="..\..\src\events\SDL_windowevents.c">
<Filter>events</Filter>
</ClCompile>
<ClCompile Include="..\..\src\file\SDL_rwops.c">
<ClCompile Include="..\..\src\file\SDL_iostream.c">
<Filter>file</Filter>
</ClCompile>
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
@ -1050,15 +1114,15 @@
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c">
<Filter>haptic\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c">
<Filter>haptic\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c">
<Filter>haptic\dummy</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c">
<Filter>joystick\dummy</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.c">
<Filter>joystick\gdk</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
@ -1128,6 +1192,12 @@
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
<Filter>joystick\virtual</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\SDL_RLEaccel.c">
<Filter>video</Filter>
</ClCompile>
@ -1185,9 +1255,6 @@
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c">
<Filter>video</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\SDL_video_capture.c">
<Filter>video</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\SDL_yuv.c">
<Filter>video</Filter>
</ClCompile>
@ -1203,9 +1270,6 @@
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c">
<Filter>video\dummy</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c">
<Filter>video\yuv2rgb</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c">
<Filter>video\windows</Filter>
</ClCompile>
@ -1233,6 +1297,12 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c">
<Filter>video\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c">
<Filter>video\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c">
<Filter>video\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c">
<Filter>video\windows</Filter>
</ClCompile>
@ -1287,6 +1357,15 @@
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c">
<Filter>stdlib</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_memcpy.c">
<Filter>stdlib</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_memmove.c">
<Filter>stdlib</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_memset.c">
<Filter>stdlib</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c">
<Filter>stdlib</Filter>
</ClCompile>
@ -1387,11 +1466,21 @@
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c">
<Filter>stdlib</Filter>
</ClCompile>
<MASM Include="..\..\src\stdlib\SDL_mslibc_x64.masm">
<Filter>stdlib</Filter>
</MASM>
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
<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" />
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c">
<Filter>render\vulkan</Filter>
</ClCompile>
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c">
<Filter>render\vulkan</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
</ItemGroup>
<ItemGroup>
<MASM Include="..\..\src\stdlib\SDL_mslibc_x64.masm" />
</ItemGroup>
</Project>

View File

@ -1,7 +1,7 @@
# SDL CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.0...3.5)
include(FeatureSummary)
set_package_properties(SDL3 PROPERTIES
@ -39,20 +39,23 @@ else()
return()
endif()
set_and_check(_sdl3_prefix "${CMAKE_CURRENT_LIST_DIR}/..")
set(_sdl3_include_dirs "${_sdl3_prefix}/include")
get_filename_component(_sdl3_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
set_and_check(_sdl3_prefix "${_sdl3_prefix}")
set(_sdl3_include_dirs "${_sdl3_prefix}/include;${_sdl3_prefix}/include/SDL3")
set(_sdl3_library "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.lib")
set(_sdl3_dll_library "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.dll")
set(_sdl3test_library "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3_test.lib")
unset(_sdl_arch_subdir)
unset(_sdl3_prefix)
set(SDL3_LIBRARIES SDL3::SDL3)
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3-target.cmake files.
if(NOT TARGET SDL3::Headers)
add_library(SDL3::Headers INTERFACE IMPORTED)
set_target_properties(SDL3::SDL3
set_target_properties(SDL3::Headers
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_sdl3_include_dirs}"
)
@ -60,8 +63,6 @@ endif()
set(SDL3_Headers_FOUND TRUE)
unset(_sdl3_include_dirs)
set(_sdl3_library "${SDL3_LIBDIR}/SDL3.lib")
set(_sdl3_dll_library "${SDL3_BINDIR}/SDL3.dll")
if(EXISTS "${_sdl3_library}" AND EXISTS "${_sdl3_dll_library}")
if(NOT TARGET SDL3::SDL3-shared)
add_library(SDL3::SDL3-shared SHARED IMPORTED)
@ -85,7 +86,6 @@ unset(_sdl3_dll_library)
set(SDL3_SDL3-static_FOUND FALSE)
set(_sdl3test_library "${SDL3_LIBDIR}/SDL3_test.lib")
if(EXISTS "${_sdl3test_library}")
if(NOT TARGET SDL3::SDL3_test)
add_library(SDL3::SDL3_test STATIC IMPORTED)
@ -103,7 +103,7 @@ else()
endif()
unset(_sdl3test_library)
if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
if(SDL3_SDL3-shared_FOUND)
set(SDL3_SDL3_FOUND TRUE)
endif()
@ -121,9 +121,13 @@ endfunction()
if(NOT TARGET SDL3::SDL3)
if(TARGET SDL3::SDL3-shared)
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
else()
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-static)
endif()
endif()
check_required_components(SDL3)
set(SDL3_LIBRARIES SDL3::SDL3)
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
set(SDL3_STATIC_PRIVATE_LIBS)
set(SDL3TEST_LIBRARY SDL3::SDL3_test)

View File

@ -206,6 +206,7 @@
<ClCompile Include="..\..\..\test\testautomation_intrinsics.c" />
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
<ClCompile Include="..\..\..\test\testautomation_log.c" />
<ClCompile Include="..\..\..\test\testautomation_main.c" />
<ClCompile Include="..\..\..\test\testautomation_math.c" />
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
@ -220,10 +221,11 @@
<ClCompile Include="..\..\..\test\testautomation_properties.c" />
<ClCompile Include="..\..\..\test\testautomation_rect.c" />
<ClCompile Include="..\..\..\test\testautomation_render.c" />
<ClCompile Include="..\..\..\test\testautomation_rwops.c" />
<ClCompile Include="..\..\..\test\testautomation_iostream.c" />
<ClCompile Include="..\..\..\test\testautomation_sdltest.c" />
<ClCompile Include="..\..\..\test\testautomation_stdlib.c" />
<ClCompile Include="..\..\..\test\testautomation_surface.c" />
<ClCompile Include="..\..\..\test\testautomation_time.c" />
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
<ClCompile Include="..\..\..\test\testautomation_video.c" />
<ClCompile Include="..\..\..\test\testautomation_subsystems.c" />

View File

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

View File

@ -33,8 +33,15 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
00001B2471F503DD3C1B0000 /* SDL_camera_dummy.c in Sources */ = {isa = PBXBuildFile; fileRef = 00005BD74B46358B33A20000 /* SDL_camera_dummy.c */; };
000028F8113A53F4333E0000 /* SDL_main_callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = 00009366FB9FBBD54C390000 /* SDL_main_callbacks.c */; };
00002B20A48E055EB0350000 /* SDL_camera_coremedia.m in Sources */ = {isa = PBXBuildFile; fileRef = 00008B79BF08CBCEAC460000 /* SDL_camera_coremedia.m */; };
000040E76FDC6AE48CBF0000 /* SDL_hashtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 000078E1881E857EBB6C0000 /* SDL_hashtable.c */; };
0000481D255AF155B42C0000 /* SDL_sysfsops.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000F4E6AA3EF99DA3C80000 /* SDL_sysfsops.c */; };
0000494CC93F3E624D3C0000 /* SDL_systime.c in Sources */ = {isa = PBXBuildFile; fileRef = 00003F472C51CE7DF6160000 /* SDL_systime.c */; };
000080903BC03006F24E0000 /* SDL_filesystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 00002B010DB1A70931C20000 /* SDL_filesystem.c */; };
000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000641A9BAC11AB3FBE0000 /* SDL_time.c */; };
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; };
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); };
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); };
@ -170,14 +177,12 @@
A7D8B25A23E2514200DCD162 /* vulkan_vi.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */; };
A7D8B26023E2514200DCD162 /* vulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73023E2513E00DCD162 /* vulkan.h */; };
A7D8B26623E2514200DCD162 /* vk_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73123E2513E00DCD162 /* vk_platform.h */; };
A7D8B26C23E2514200DCD162 /* vulkan.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73223E2513E00DCD162 /* vulkan.hpp */; };
A7D8B27223E2514200DCD162 /* vulkan_fuchsia.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */; };
A7D8B27823E2514200DCD162 /* vulkan_wayland.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73423E2513E00DCD162 /* vulkan_wayland.h */; };
A7D8B27E23E2514200DCD162 /* vulkan_win32.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73523E2513E00DCD162 /* vulkan_win32.h */; };
A7D8B28423E2514200DCD162 /* vulkan_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73623E2513E00DCD162 /* vulkan_macos.h */; };
A7D8B28A23E2514200DCD162 /* vulkan_xlib_xrandr.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73723E2513E00DCD162 /* vulkan_xlib_xrandr.h */; };
A7D8B29023E2514200DCD162 /* vulkan_xcb.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */; };
A7D8B29623E2514200DCD162 /* vulkan_mir.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73923E2513E00DCD162 /* vulkan_mir.h */; };
A7D8B29C23E2514200DCD162 /* vulkan_xlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */; };
A7D8B2A223E2514200DCD162 /* vulkan_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73B23E2513E00DCD162 /* vulkan_ios.h */; };
A7D8B2A823E2514200DCD162 /* vulkan_core.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A73C23E2513E00DCD162 /* vulkan_core.h */; };
@ -190,7 +195,6 @@
A7D8B3A423E2514200DCD162 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A76823E2513E00DCD162 /* SDL_fillrect.c */; };
A7D8B3B023E2514200DCD162 /* SDL_yuv_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A76A23E2513E00DCD162 /* SDL_yuv_c.h */; };
A7D8B3B623E2514200DCD162 /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A76B23E2513E00DCD162 /* SDL_blit.h */; };
A7D8B3BF23E2514200DCD162 /* yuv_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A76E23E2513E00DCD162 /* yuv_rgb.c */; };
A7D8B3C823E2514200DCD162 /* yuv_rgb_sse_func.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A77023E2513E00DCD162 /* yuv_rgb_sse_func.h */; };
A7D8B3CE23E2514300DCD162 /* yuv_rgb_std_func.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A77123E2513E00DCD162 /* yuv_rgb_std_func.h */; };
A7D8B3D423E2514300DCD162 /* yuv_rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A77223E2513E00DCD162 /* yuv_rgb.h */; };
@ -222,9 +226,9 @@
A7D8B58123E2514300DCD162 /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7CF23E2513E00DCD162 /* SDL_sysjoystick.h */; };
A7D8B58723E2514300DCD162 /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7D023E2513E00DCD162 /* SDL_joystick_c.h */; };
A7D8B5B723E2514300DCD162 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7D923E2513E00DCD162 /* controller_type.h */; };
A7D8B5BD23E2514300DCD162 /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7DB23E2513F00DCD162 /* SDL_rwops.c */; };
A7D8B5C323E2514300DCD162 /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7DD23E2513F00DCD162 /* SDL_rwopsbundlesupport.h */; };
A7D8B5C923E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7DE23E2513F00DCD162 /* SDL_rwopsbundlesupport.m */; };
A7D8B5BD23E2514300DCD162 /* SDL_iostream.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7DB23E2513F00DCD162 /* SDL_iostream.c */; };
A7D8B5C323E2514300DCD162 /* SDL_iostreambundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7DD23E2513F00DCD162 /* SDL_iostreambundlesupport.h */; };
A7D8B5C923E2514300DCD162 /* SDL_iostreambundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7DE23E2513F00DCD162 /* SDL_iostreambundlesupport.m */; };
A7D8B5CF23E2514300DCD162 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7E123E2513F00DCD162 /* SDL_syspower.m */; };
A7D8B5D523E2514300DCD162 /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A7E223E2513F00DCD162 /* SDL_syspower.h */; };
A7D8B5E723E2514300DCD162 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7E723E2513F00DCD162 /* SDL_power.c */; };
@ -368,11 +372,18 @@
A7D8BBE923E2574800DCD162 /* SDL_uikitvulkan.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A62523E2513D00DCD162 /* SDL_uikitvulkan.m */; };
A7D8BBEA23E2574800DCD162 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62723E2513D00DCD162 /* SDL_uikitwindow.h */; };
A7D8BBEB23E2574800DCD162 /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A61A23E2513D00DCD162 /* SDL_uikitwindow.m */; };
E41D20152BA9577D003073FA /* SDL_storage.h in Headers */ = {isa = PBXBuildFile; fileRef = E41D20142BA9577D003073FA /* SDL_storage.h */; settings = {ATTRIBUTES = (Public, ); }; };
E479118D2BA9555500CE3B7F /* SDL_storage.c in Sources */ = {isa = PBXBuildFile; fileRef = E47911872BA9555500CE3B7F /* SDL_storage.c */; };
E479118E2BA9555500CE3B7F /* SDL_sysstorage.h in Headers */ = {isa = PBXBuildFile; fileRef = E47911882BA9555500CE3B7F /* SDL_sysstorage.h */; };
E479118F2BA9555500CE3B7F /* SDL_genericstorage.c in Sources */ = {isa = PBXBuildFile; fileRef = E479118A2BA9555500CE3B7F /* SDL_genericstorage.c */; };
E4A568B62AF763940062EEC4 /* SDL_sysmain_callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = E4A568B52AF763940062EEC4 /* SDL_sysmain_callbacks.c */; };
E4F7981A2AD8D84800669F54 /* SDL_core_unsupported.c in Sources */ = {isa = PBXBuildFile; fileRef = E4F798192AD8D84800669F54 /* SDL_core_unsupported.c */; };
E4F7981C2AD8D85500669F54 /* SDL_dynapi_unsupported.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F7981B2AD8D85500669F54 /* SDL_dynapi_unsupported.h */; };
E4F7981E2AD8D86A00669F54 /* SDL_render_unsupported.c in Sources */ = {isa = PBXBuildFile; fileRef = E4F7981D2AD8D86A00669F54 /* SDL_render_unsupported.c */; };
E4F798202AD8D87F00669F54 /* SDL_video_unsupported.c in Sources */ = {isa = PBXBuildFile; fileRef = E4F7981F2AD8D87F00669F54 /* SDL_video_unsupported.c */; };
F316ABD82B5C3185002EF551 /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F316ABD62B5C3185002EF551 /* SDL_memset.c */; };
F316ABD92B5C3185002EF551 /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F316ABD72B5C3185002EF551 /* SDL_memcpy.c */; };
F316ABDB2B5CA721002EF551 /* SDL_memmove.c in Sources */ = {isa = PBXBuildFile; fileRef = F316ABDA2B5CA721002EF551 /* SDL_memmove.c */; };
F31A92C828D4CB39003BFD6A /* SDL_offscreenopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = F31A92C628D4CB39003BFD6A /* SDL_offscreenopengles.h */; };
F31A92D228D4CB39003BFD6A /* SDL_offscreenopengles.c in Sources */ = {isa = PBXBuildFile; fileRef = F31A92C728D4CB39003BFD6A /* SDL_offscreenopengles.c */; };
F32305FF28939F6400E66D30 /* SDL_hidapi_combined.c in Sources */ = {isa = PBXBuildFile; fileRef = F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */; };
@ -387,9 +398,18 @@
F362B91A2B3349E200D30B94 /* SDL_gamepad_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F362B9162B3349E200D30B94 /* SDL_gamepad_c.h */; };
F362B91B2B3349E200D30B94 /* SDL_steam_virtual_gamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = F362B9172B3349E200D30B94 /* SDL_steam_virtual_gamepad.h */; };
F362B91C2B3349E200D30B94 /* SDL_steam_virtual_gamepad.c in Sources */ = {isa = PBXBuildFile; fileRef = F362B9182B3349E200D30B94 /* SDL_steam_virtual_gamepad.c */; };
F3681E802B7AA6240002C6FD /* SDL_cocoashape.m in Sources */ = {isa = PBXBuildFile; fileRef = F3681E7E2B7AA6240002C6FD /* SDL_cocoashape.m */; };
F3681E812B7AA6240002C6FD /* SDL_cocoashape.h in Headers */ = {isa = PBXBuildFile; fileRef = F3681E7F2B7AA6240002C6FD /* SDL_cocoashape.h */; };
F36C7AD1294BA009004D61C3 /* SDL_runapp.c in Sources */ = {isa = PBXBuildFile; fileRef = F36C7AD0294BA009004D61C3 /* SDL_runapp.c */; };
F376F6552559B4E300CFC0BC /* SDL_hidapi.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A81423E2513F00DCD162 /* SDL_hidapi.c */; };
F37A8E1A28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
F37E184E2B8C097D0098C111 /* SDL_camera.h in Headers */ = {isa = PBXBuildFile; fileRef = 000084ED0A56E3ED52F90000 /* SDL_camera.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18512BA50E750098C111 /* SDL_dialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */; platformFilters = (macos, ); };
F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F37E18592BA50F450098C111 /* SDL_dummydialog.c */; platformFilters = (ios, maccatalyst, tvos, xros, ); };
F37E185C2BAA3EF90098C111 /* SDL_time.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E185B2BAA3EF90098C111 /* SDL_time.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */; };
F37E18642BAA40670098C111 /* SDL_time_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18632BAA40670098C111 /* SDL_time_c.h */; };
F3820713284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
F382071D284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
F386F6E72884663E001840AA /* SDL_log_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F386F6E42884663E001840AA /* SDL_log_c.h */; };
@ -417,15 +437,8 @@
F3B38CDF296E2E52005DA6D3 /* SDL_intrin.h in Headers */ = {isa = PBXBuildFile; fileRef = F3B38CCE296E2E52005DA6D3 /* SDL_intrin.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3D60A8328C16A1900788A3A /* SDL_hidapi_wii.c in Sources */ = {isa = PBXBuildFile; fileRef = F3D60A8228C16A1800788A3A /* SDL_hidapi_wii.c */; };
F3DDCC562AFD42B600B0842B /* SDL_clipboard_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC4D2AFD42B500B0842B /* SDL_clipboard_c.h */; };
F3DDCC572AFD42B600B0842B /* SDL_surface_pixel_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC4E2AFD42B500B0842B /* SDL_surface_pixel_impl.h */; };
F3DDCC582AFD42B600B0842B /* SDL_video_capture.c in Sources */ = {isa = PBXBuildFile; fileRef = F3DDCC4F2AFD42B500B0842B /* SDL_video_capture.c */; };
F3DDCC592AFD42B600B0842B /* SDL_video_capture_apple.m in Sources */ = {isa = PBXBuildFile; fileRef = F3DDCC502AFD42B500B0842B /* SDL_video_capture_apple.m */; };
F3DDCC5A2AFD42B600B0842B /* SDL_video_capture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC512AFD42B500B0842B /* SDL_video_capture_c.h */; };
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC522AFD42B600B0842B /* SDL_video_c.h */; };
F3DDCC5C2AFD42B600B0842B /* SDL_sysvideocapture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC532AFD42B600B0842B /* SDL_sysvideocapture.h */; };
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */; };
F3DDCC5E2AFD42B600B0842B /* SDL_video_capture_v4l2.c in Sources */ = {isa = PBXBuildFile; fileRef = F3DDCC552AFD42B600B0842B /* SDL_video_capture_v4l2.c */; };
F3DDCC602AFD432500B0842B /* SDL_video_capture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3DDCC5F2AFD432500B0842B /* SDL_video_capture.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3E5A6EB2AD5E0E600293D83 /* SDL_properties.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */; };
F3E5A6ED2AD5E10800293D83 /* SDL_properties.h in Headers */ = {isa = PBXBuildFile; fileRef = F3E5A6EC2AD5E10800293D83 /* SDL_properties.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F07D5A269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
@ -457,7 +470,7 @@
F3F7D9592933074E00816151 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C52933074B00816151 /* SDL_video.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D95D2933074E00816151 /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C62933074B00816151 /* SDL_opengles.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9612933074E00816151 /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C72933074B00816151 /* SDL_opengles2.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9652933074E00816151 /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C82933074B00816151 /* SDL_rwops.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9652933074E00816151 /* SDL_iostream.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C82933074B00816151 /* SDL_iostream.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9692933074E00816151 /* SDL_opengles2_gl2platform.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C92933074B00816151 /* SDL_opengles2_gl2platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D96D2933074E00816151 /* SDL_hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8CA2933074B00816151 /* SDL_hidapi.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9712933074E00816151 /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8CB2933074B00816151 /* SDL_events.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -489,6 +502,15 @@
F3F7D9DD2933074E00816151 /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E62933074E00816151 /* SDL_mutex.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9E12933074E00816151 /* SDL_begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E72933074E00816151 /* SDL_begin_code.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9E52933074E00816151 /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E82933074E00816151 /* SDL_system.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3FA5A1D2B59ACE000FEAD97 /* yuv_rgb_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A142B59ACE000FEAD97 /* yuv_rgb_internal.h */; };
F3FA5A1E2B59ACE000FEAD97 /* yuv_rgb_lsx_func.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A152B59ACE000FEAD97 /* yuv_rgb_lsx_func.h */; };
F3FA5A1F2B59ACE000FEAD97 /* yuv_rgb_sse.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A162B59ACE000FEAD97 /* yuv_rgb_sse.h */; };
F3FA5A202B59ACE000FEAD97 /* yuv_rgb_std.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A172B59ACE000FEAD97 /* yuv_rgb_std.h */; };
F3FA5A212B59ACE000FEAD97 /* yuv_rgb_std.c in Sources */ = {isa = PBXBuildFile; fileRef = F3FA5A182B59ACE000FEAD97 /* yuv_rgb_std.c */; };
F3FA5A222B59ACE000FEAD97 /* yuv_rgb_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = F3FA5A192B59ACE000FEAD97 /* yuv_rgb_sse.c */; };
F3FA5A232B59ACE000FEAD97 /* yuv_rgb_lsx.c in Sources */ = {isa = PBXBuildFile; fileRef = F3FA5A1A2B59ACE000FEAD97 /* yuv_rgb_lsx.c */; };
F3FA5A242B59ACE000FEAD97 /* yuv_rgb_lsx.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A1B2B59ACE000FEAD97 /* yuv_rgb_lsx.h */; };
F3FA5A252B59ACE000FEAD97 /* yuv_rgb_common.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */; };
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
/* End PBXBuildFile section */
@ -516,11 +538,21 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0000035D38C3899C7EFD0000 /* SDL_camera.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_camera.c; sourceTree = "<group>"; };
00002B010DB1A70931C20000 /* SDL_filesystem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_filesystem.c; sourceTree = "<group>"; };
00003260407E1002EAC10000 /* SDL_main_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_main_callbacks.h; sourceTree = "<group>"; };
00003F472C51CE7DF6160000 /* SDL_systime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systime.c; sourceTree = "<group>"; };
00005BD74B46358B33A20000 /* SDL_camera_dummy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_camera_dummy.c; sourceTree = "<group>"; };
00005D3EB902478835E20000 /* SDL_syscamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syscamera.h; sourceTree = "<group>"; };
0000641A9BAC11AB3FBE0000 /* SDL_time.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_time.c; sourceTree = "<group>"; };
000078E1881E857EBB6C0000 /* SDL_hashtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hashtable.c; sourceTree = "<group>"; };
000084ED0A56E3ED52F90000 /* SDL_camera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_camera.h; path = SDL3/SDL_camera.h; sourceTree = "<group>"; };
00008B79BF08CBCEAC460000 /* SDL_camera_coremedia.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_camera_coremedia.m; sourceTree = "<group>"; };
00009003C7148E1126CA0000 /* SDL_camera_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_camera_c.h; sourceTree = "<group>"; };
00009366FB9FBBD54C390000 /* SDL_main_callbacks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_main_callbacks.c; sourceTree = "<group>"; };
0000B6ADCD88CAD6610F0000 /* SDL_hashtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hashtable.h; sourceTree = "<group>"; };
0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysmain_callbacks.m; sourceTree = "<group>"; };
0000F4E6AA3EF99DA3C80000 /* SDL_sysfsops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysfsops.c; sourceTree = "<group>"; };
0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
@ -691,14 +723,12 @@
A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_vi.h; sourceTree = "<group>"; };
A7D8A73023E2513E00DCD162 /* vulkan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan.h; sourceTree = "<group>"; };
A7D8A73123E2513E00DCD162 /* vk_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vk_platform.h; sourceTree = "<group>"; };
A7D8A73223E2513E00DCD162 /* vulkan.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = vulkan.hpp; sourceTree = "<group>"; };
A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_fuchsia.h; sourceTree = "<group>"; };
A7D8A73423E2513E00DCD162 /* vulkan_wayland.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_wayland.h; sourceTree = "<group>"; };
A7D8A73523E2513E00DCD162 /* vulkan_win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_win32.h; sourceTree = "<group>"; };
A7D8A73623E2513E00DCD162 /* vulkan_macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_macos.h; sourceTree = "<group>"; };
A7D8A73723E2513E00DCD162 /* vulkan_xlib_xrandr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xlib_xrandr.h; sourceTree = "<group>"; };
A7D8A73823E2513E00DCD162 /* vulkan_xcb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xcb.h; sourceTree = "<group>"; };
A7D8A73923E2513E00DCD162 /* vulkan_mir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_mir.h; sourceTree = "<group>"; };
A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_xlib.h; sourceTree = "<group>"; };
A7D8A73B23E2513E00DCD162 /* vulkan_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_ios.h; sourceTree = "<group>"; };
A7D8A73C23E2513E00DCD162 /* vulkan_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vulkan_core.h; sourceTree = "<group>"; };
@ -711,7 +741,6 @@
A7D8A76823E2513E00DCD162 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; };
A7D8A76A23E2513E00DCD162 /* SDL_yuv_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_yuv_c.h; sourceTree = "<group>"; };
A7D8A76B23E2513E00DCD162 /* SDL_blit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blit.h; sourceTree = "<group>"; };
A7D8A76E23E2513E00DCD162 /* yuv_rgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yuv_rgb.c; sourceTree = "<group>"; };
A7D8A77023E2513E00DCD162 /* yuv_rgb_sse_func.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_sse_func.h; sourceTree = "<group>"; };
A7D8A77123E2513E00DCD162 /* yuv_rgb_std_func.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_std_func.h; sourceTree = "<group>"; };
A7D8A77223E2513E00DCD162 /* yuv_rgb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb.h; sourceTree = "<group>"; };
@ -745,9 +774,9 @@
A7D8A7CF23E2513E00DCD162 /* SDL_sysjoystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick.h; sourceTree = "<group>"; };
A7D8A7D023E2513E00DCD162 /* SDL_joystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_joystick_c.h; sourceTree = "<group>"; };
A7D8A7D923E2513E00DCD162 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
A7D8A7DB23E2513F00DCD162 /* SDL_rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rwops.c; sourceTree = "<group>"; };
A7D8A7DD23E2513F00DCD162 /* SDL_rwopsbundlesupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rwopsbundlesupport.h; sourceTree = "<group>"; };
A7D8A7DE23E2513F00DCD162 /* SDL_rwopsbundlesupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_rwopsbundlesupport.m; sourceTree = "<group>"; };
A7D8A7DB23E2513F00DCD162 /* SDL_iostream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_iostream.c; sourceTree = "<group>"; };
A7D8A7DD23E2513F00DCD162 /* SDL_iostreambundlesupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_iostreambundlesupport.h; sourceTree = "<group>"; };
A7D8A7DE23E2513F00DCD162 /* SDL_iostreambundlesupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_iostreambundlesupport.m; sourceTree = "<group>"; };
A7D8A7E123E2513F00DCD162 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; };
A7D8A7E223E2513F00DCD162 /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; };
A7D8A7E723E2513F00DCD162 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; };
@ -867,11 +896,18 @@
BECDF66B0761BA81005FE872 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
BECDF66C0761BA81005FE872 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E2D187D228A5673500D2B4F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E41D20142BA9577D003073FA /* SDL_storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_storage.h; path = SDL3/SDL_storage.h; sourceTree = "<group>"; };
E47911872BA9555500CE3B7F /* SDL_storage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_storage.c; sourceTree = "<group>"; };
E47911882BA9555500CE3B7F /* SDL_sysstorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysstorage.h; sourceTree = "<group>"; };
E479118A2BA9555500CE3B7F /* SDL_genericstorage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_genericstorage.c; sourceTree = "<group>"; };
E4A568B52AF763940062EEC4 /* SDL_sysmain_callbacks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysmain_callbacks.c; sourceTree = "<group>"; };
E4F798192AD8D84800669F54 /* SDL_core_unsupported.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_core_unsupported.c; sourceTree = "<group>"; };
E4F7981B2AD8D85500669F54 /* SDL_dynapi_unsupported.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_unsupported.h; sourceTree = "<group>"; };
E4F7981D2AD8D86A00669F54 /* SDL_render_unsupported.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_unsupported.c; sourceTree = "<group>"; };
E4F7981F2AD8D87F00669F54 /* SDL_video_unsupported.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_video_unsupported.c; sourceTree = "<group>"; };
F316ABD62B5C3185002EF551 /* SDL_memset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_memset.c; sourceTree = "<group>"; };
F316ABD72B5C3185002EF551 /* SDL_memcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_memcpy.c; sourceTree = "<group>"; };
F316ABDA2B5CA721002EF551 /* SDL_memmove.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_memmove.c; sourceTree = "<group>"; };
F31A92C628D4CB39003BFD6A /* SDL_offscreenopengles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_offscreenopengles.h; sourceTree = "<group>"; };
F31A92C728D4CB39003BFD6A /* SDL_offscreenopengles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_offscreenopengles.c; sourceTree = "<group>"; };
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_combined.c; sourceTree = "<group>"; };
@ -885,6 +921,8 @@
F362B9162B3349E200D30B94 /* SDL_gamepad_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamepad_c.h; sourceTree = "<group>"; };
F362B9172B3349E200D30B94 /* SDL_steam_virtual_gamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_steam_virtual_gamepad.h; sourceTree = "<group>"; };
F362B9182B3349E200D30B94 /* SDL_steam_virtual_gamepad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_steam_virtual_gamepad.c; sourceTree = "<group>"; };
F3681E7E2B7AA6240002C6FD /* SDL_cocoashape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoashape.m; sourceTree = "<group>"; };
F3681E7F2B7AA6240002C6FD /* SDL_cocoashape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoashape.h; sourceTree = "<group>"; };
F36C7AD0294BA009004D61C3 /* SDL_runapp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_runapp.c; sourceTree = "<group>"; };
F376F6182559B29300CFC0BC /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
F376F61A2559B2AF00CFC0BC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@ -903,6 +941,12 @@
F37A8E1928405AA100C38E95 /* CMake */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CMake; sourceTree = "<group>"; };
F37DC5F225350EBC0002E6F7 /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
F37DC5F425350ECC0002E6F7 /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; };
F37E18512BA50E750098C111 /* SDL_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dialog.h; path = SDL3/SDL_dialog.h; sourceTree = "<group>"; };
F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoadialog.m; sourceTree = "<group>"; };
F37E18592BA50F450098C111 /* SDL_dummydialog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dummydialog.c; sourceTree = "<group>"; };
F37E185B2BAA3EF90098C111 /* SDL_time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_time.h; path = SDL3/SDL_time.h; sourceTree = "<group>"; };
F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysfilesystem.h; sourceTree = "<group>"; };
F37E18632BAA40670098C111 /* SDL_time_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_time_c.h; sourceTree = "<group>"; };
F3820712284F3609004DD584 /* controller_type.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = controller_type.c; sourceTree = "<group>"; };
F382071C284F362F004DD584 /* SDL_guid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_guid.c; sourceTree = "<group>"; };
F382339B2738ED6600F7F527 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.0.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
@ -930,15 +974,8 @@
F3B38CCE296E2E52005DA6D3 /* SDL_intrin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_intrin.h; path = SDL3/SDL_intrin.h; sourceTree = "<group>"; };
F3D60A8228C16A1800788A3A /* SDL_hidapi_wii.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_wii.c; sourceTree = "<group>"; };
F3DDCC4D2AFD42B500B0842B /* SDL_clipboard_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_clipboard_c.h; sourceTree = "<group>"; };
F3DDCC4E2AFD42B500B0842B /* SDL_surface_pixel_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_surface_pixel_impl.h; sourceTree = "<group>"; };
F3DDCC4F2AFD42B500B0842B /* SDL_video_capture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_video_capture.c; sourceTree = "<group>"; };
F3DDCC502AFD42B500B0842B /* SDL_video_capture_apple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_video_capture_apple.m; sourceTree = "<group>"; };
F3DDCC512AFD42B500B0842B /* SDL_video_capture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video_capture_c.h; sourceTree = "<group>"; };
F3DDCC522AFD42B600B0842B /* SDL_video_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video_c.h; sourceTree = "<group>"; };
F3DDCC532AFD42B600B0842B /* SDL_sysvideocapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysvideocapture.h; sourceTree = "<group>"; };
F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rect_impl.h; sourceTree = "<group>"; };
F3DDCC552AFD42B600B0842B /* SDL_video_capture_v4l2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_video_capture_v4l2.c; sourceTree = "<group>"; };
F3DDCC5F2AFD432500B0842B /* SDL_video_capture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_video_capture.h; path = SDL3/SDL_video_capture.h; sourceTree = "<group>"; };
F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_properties.c; sourceTree = "<group>"; };
F3E5A6EC2AD5E10800293D83 /* SDL_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_properties.h; path = SDL3/SDL_properties.h; sourceTree = "<group>"; };
F3F07D59269640160074468B /* SDL_hidapi_luna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_luna.c; sourceTree = "<group>"; };
@ -970,7 +1007,7 @@
F3F7D8C52933074B00816151 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = SDL3/SDL_video.h; sourceTree = "<group>"; };
F3F7D8C62933074B00816151 /* SDL_opengles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengles.h; path = SDL3/SDL_opengles.h; sourceTree = "<group>"; };
F3F7D8C72933074B00816151 /* SDL_opengles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengles2.h; path = SDL3/SDL_opengles2.h; sourceTree = "<group>"; };
F3F7D8C82933074B00816151 /* SDL_rwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_rwops.h; path = SDL3/SDL_rwops.h; sourceTree = "<group>"; };
F3F7D8C82933074B00816151 /* SDL_iostream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_iostream.h; path = SDL3/SDL_iostream.h; sourceTree = "<group>"; };
F3F7D8C92933074B00816151 /* SDL_opengles2_gl2platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengles2_gl2platform.h; path = SDL3/SDL_opengles2_gl2platform.h; sourceTree = "<group>"; };
F3F7D8CA2933074B00816151 /* SDL_hidapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_hidapi.h; path = SDL3/SDL_hidapi.h; sourceTree = "<group>"; };
F3F7D8CB2933074B00816151 /* SDL_events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_events.h; path = SDL3/SDL_events.h; sourceTree = "<group>"; };
@ -1002,6 +1039,15 @@
F3F7D8E62933074E00816151 /* SDL_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_mutex.h; path = SDL3/SDL_mutex.h; sourceTree = "<group>"; };
F3F7D8E72933074E00816151 /* SDL_begin_code.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_begin_code.h; path = SDL3/SDL_begin_code.h; sourceTree = "<group>"; };
F3F7D8E82933074E00816151 /* SDL_system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_system.h; path = SDL3/SDL_system.h; sourceTree = "<group>"; };
F3FA5A142B59ACE000FEAD97 /* yuv_rgb_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_internal.h; sourceTree = "<group>"; };
F3FA5A152B59ACE000FEAD97 /* yuv_rgb_lsx_func.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_lsx_func.h; sourceTree = "<group>"; };
F3FA5A162B59ACE000FEAD97 /* yuv_rgb_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_sse.h; sourceTree = "<group>"; };
F3FA5A172B59ACE000FEAD97 /* yuv_rgb_std.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_std.h; sourceTree = "<group>"; };
F3FA5A182B59ACE000FEAD97 /* yuv_rgb_std.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yuv_rgb_std.c; sourceTree = "<group>"; };
F3FA5A192B59ACE000FEAD97 /* yuv_rgb_sse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yuv_rgb_sse.c; sourceTree = "<group>"; };
F3FA5A1A2B59ACE000FEAD97 /* yuv_rgb_lsx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yuv_rgb_lsx.c; sourceTree = "<group>"; };
F3FA5A1B2B59ACE000FEAD97 /* yuv_rgb_lsx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_lsx.h; sourceTree = "<group>"; };
F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yuv_rgb_common.h; sourceTree = "<group>"; };
F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; };
F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; };
@ -1031,6 +1077,42 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
000004752BA2F77DECDF0000 /* unix */ = {
isa = PBXGroup;
children = (
00003F472C51CE7DF6160000 /* SDL_systime.c */,
);
path = unix;
sourceTree = "<group>";
};
000023E01FD84242AF850000 /* dummy */ = {
isa = PBXGroup;
children = (
00005BD74B46358B33A20000 /* SDL_camera_dummy.c */,
);
path = dummy;
sourceTree = "<group>";
};
00002EC7DF7A0A31B32A0000 /* camera */ = {
isa = PBXGroup;
children = (
0000DBB4B95F4CC5CAE80000 /* coremedia */,
000023E01FD84242AF850000 /* dummy */,
0000035D38C3899C7EFD0000 /* SDL_camera.c */,
00009003C7148E1126CA0000 /* SDL_camera_c.h */,
00005D3EB902478835E20000 /* SDL_syscamera.h */,
);
path = camera;
sourceTree = "<group>";
};
000050A2BB34616138570000 /* posix */ = {
isa = PBXGroup;
children = (
0000F4E6AA3EF99DA3C80000 /* SDL_sysfsops.c */,
);
path = posix;
sourceTree = "<group>";
};
000082EF09C89B62BD840000 /* main */ = {
isa = PBXGroup;
children = (
@ -1050,6 +1132,24 @@
path = ios;
sourceTree = "<group>";
};
0000DBB4B95F4CC5CAE80000 /* coremedia */ = {
isa = PBXGroup;
children = (
00008B79BF08CBCEAC460000 /* SDL_camera_coremedia.m */,
);
path = coremedia;
sourceTree = "<group>";
};
0000F5E7419220E3A8AB0000 /* time */ = {
isa = PBXGroup;
children = (
000004752BA2F77DECDF0000 /* unix */,
F37E18632BAA40670098C111 /* SDL_time_c.h */,
0000641A9BAC11AB3FBE0000 /* SDL_time.c */,
);
path = time;
sourceTree = "<group>";
};
0153844A006D81B07F000001 /* Public Headers */ = {
isa = PBXGroup;
children = (
@ -1059,10 +1159,12 @@
F3F7D8E72933074E00816151 /* SDL_begin_code.h */,
F3F7D8D82933074C00816151 /* SDL_bits.h */,
F3F7D8CE2933074C00816151 /* SDL_blendmode.h */,
000084ED0A56E3ED52F90000 /* SDL_camera.h */,
F3F7D8D72933074C00816151 /* SDL_clipboard.h */,
F3F7D8E52933074D00816151 /* SDL_close_code.h */,
F3F7D8E32933074D00816151 /* SDL_copying.h */,
F3F7D8DD2933074D00816151 /* SDL_cpuinfo.h */,
F37E18512BA50E750098C111 /* SDL_dialog.h */,
F3F7D8B82933074A00816151 /* SDL_egl.h */,
F3F7D8BE2933074A00816151 /* SDL_endian.h */,
F3F7D8BC2933074A00816151 /* SDL_error.h */,
@ -1075,6 +1177,7 @@
F3F7D8B32933074900816151 /* SDL_hints.h */,
F3B38CCC296E2E52005DA6D3 /* SDL_init.h */,
F3B38CCE296E2E52005DA6D3 /* SDL_intrin.h */,
F3F7D8C82933074B00816151 /* SDL_iostream.h */,
F3F7D8D32933074C00816151 /* SDL_joystick.h */,
F3F7D8C32933074B00816151 /* SDL_keyboard.h */,
F3F7D8CC2933074B00816151 /* SDL_keycode.h */,
@ -1107,17 +1210,17 @@
F3F7D8E22933074D00816151 /* SDL_rect.h */,
F3F7D8DE2933074D00816151 /* SDL_render.h */,
F3F7D8B42933074900816151 /* SDL_revision.h */,
F3F7D8C82933074B00816151 /* SDL_rwops.h */,
F3F7D8C12933074B00816151 /* SDL_scancode.h */,
F3F7D8C22933074B00816151 /* SDL_sensor.h */,
F3F7D8AC2933074900816151 /* SDL_stdinc.h */,
E41D20142BA9577D003073FA /* SDL_storage.h */,
F3F7D8BB2933074A00816151 /* SDL_surface.h */,
F3F7D8E82933074E00816151 /* SDL_system.h */,
F3F7D8CD2933074C00816151 /* SDL_thread.h */,
F37E185B2BAA3EF90098C111 /* SDL_time.h */,
F3F7D8B22933074900816151 /* SDL_timer.h */,
F3F7D8AF2933074900816151 /* SDL_touch.h */,
F3F7D8E42933074D00816151 /* SDL_version.h */,
F3DDCC5F2AFD432500B0842B /* SDL_video_capture.h */,
F3F7D8C52933074B00816151 /* SDL_video.h */,
F3F7D8D42933074C00816151 /* SDL_vulkan.h */,
F3F7D8CF2933074C00816151 /* SDL.h */,
@ -1158,8 +1261,10 @@
children = (
A7D8A57223E2513D00DCD162 /* atomic */,
A7D8A86423E2513F00DCD162 /* audio */,
00002EC7DF7A0A31B32A0000 /* camera */,
F36C7ACF294B9F5E004D61C3 /* core */,
A7D8A77423E2513E00DCD162 /* cpuinfo */,
F37E18542BA50EB40098C111 /* dialog */,
A7D8A5D723E2513D00DCD162 /* dynapi */,
A7D8A92923E2514000DCD162 /* events */,
A7D8A7DA23E2513E00DCD162 /* file */,
@ -1176,7 +1281,9 @@
A7D8A8DA23E2514000DCD162 /* render */,
A7D8A57623E2513D00DCD162 /* sensor */,
A7D8A8D223E2514000DCD162 /* stdlib */,
E47911832BA9555500CE3B7F /* storage */,
A7D8A77623E2513E00DCD162 /* thread */,
0000F5E7419220E3A8AB0000 /* time */,
A7D8A5DE23E2513D00DCD162 /* timer */,
A7D8A5EB23E2513D00DCD162 /* video */,
A7D8A7F523E2513F00DCD162 /* SDL_assert_c.h */,
@ -1436,15 +1543,9 @@
A7D8A76723E2513E00DCD162 /* SDL_RLEaccel_c.h */,
A7D8A61523E2513D00DCD162 /* SDL_RLEaccel.c */,
A7D8A60323E2513D00DCD162 /* SDL_stretch.c */,
F3DDCC4E2AFD42B500B0842B /* SDL_surface_pixel_impl.h */,
A7D8A61423E2513D00DCD162 /* SDL_surface.c */,
A7D8A61723E2513D00DCD162 /* SDL_sysvideo.h */,
F3DDCC532AFD42B600B0842B /* SDL_sysvideocapture.h */,
F3DDCC522AFD42B600B0842B /* SDL_video_c.h */,
F3DDCC502AFD42B500B0842B /* SDL_video_capture_apple.m */,
F3DDCC512AFD42B500B0842B /* SDL_video_capture_c.h */,
F3DDCC552AFD42B600B0842B /* SDL_video_capture_v4l2.c */,
F3DDCC4F2AFD42B500B0842B /* SDL_video_capture.c */,
E4F7981F2AD8D87F00669F54 /* SDL_video_unsupported.c */,
A7D8A60E23E2513D00DCD162 /* SDL_video.c */,
A7D8A63E23E2513D00DCD162 /* SDL_vulkan_internal.h */,
@ -1539,6 +1640,8 @@
A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */,
A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */,
A7D8A68223E2513E00DCD162 /* SDL_cocoaopengles.m */,
F3681E7F2B7AA6240002C6FD /* SDL_cocoashape.h */,
F3681E7E2B7AA6240002C6FD /* SDL_cocoashape.m */,
A7D8A69323E2513E00DCD162 /* SDL_cocoavideo.h */,
A7D8A68523E2513E00DCD162 /* SDL_cocoavideo.m */,
A7D8A68F23E2513E00DCD162 /* SDL_cocoavulkan.h */,
@ -1600,7 +1703,6 @@
A7D8A73323E2513E00DCD162 /* vulkan_fuchsia.h */,
A7D8A73B23E2513E00DCD162 /* vulkan_ios.h */,
A7D8A73623E2513E00DCD162 /* vulkan_macos.h */,
A7D8A73923E2513E00DCD162 /* vulkan_mir.h */,
A7D8A72F23E2513E00DCD162 /* vulkan_vi.h */,
A7D8A73423E2513E00DCD162 /* vulkan_wayland.h */,
A7D8A73523E2513E00DCD162 /* vulkan_win32.h */,
@ -1608,7 +1710,6 @@
A7D8A73723E2513E00DCD162 /* vulkan_xlib_xrandr.h */,
A7D8A73A23E2513E00DCD162 /* vulkan_xlib.h */,
A7D8A73023E2513E00DCD162 /* vulkan.h */,
A7D8A73223E2513E00DCD162 /* vulkan.hpp */,
);
path = vulkan;
sourceTree = "<group>";
@ -1616,9 +1717,17 @@
A7D8A76C23E2513E00DCD162 /* yuv2rgb */ = {
isa = PBXGroup;
children = (
F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */,
F3FA5A142B59ACE000FEAD97 /* yuv_rgb_internal.h */,
F3FA5A152B59ACE000FEAD97 /* yuv_rgb_lsx_func.h */,
F3FA5A1A2B59ACE000FEAD97 /* yuv_rgb_lsx.c */,
F3FA5A1B2B59ACE000FEAD97 /* yuv_rgb_lsx.h */,
A7D8A77023E2513E00DCD162 /* yuv_rgb_sse_func.h */,
F3FA5A192B59ACE000FEAD97 /* yuv_rgb_sse.c */,
F3FA5A162B59ACE000FEAD97 /* yuv_rgb_sse.h */,
A7D8A77123E2513E00DCD162 /* yuv_rgb_std_func.h */,
A7D8A76E23E2513E00DCD162 /* yuv_rgb.c */,
F3FA5A182B59ACE000FEAD97 /* yuv_rgb_std.c */,
F3FA5A172B59ACE000FEAD97 /* yuv_rgb_std.h */,
A7D8A77223E2513E00DCD162 /* yuv_rgb.h */,
);
path = yuv2rgb;
@ -1748,7 +1857,7 @@
isa = PBXGroup;
children = (
A7D8A7DC23E2513F00DCD162 /* cocoa */,
A7D8A7DB23E2513F00DCD162 /* SDL_rwops.c */,
A7D8A7DB23E2513F00DCD162 /* SDL_iostream.c */,
);
path = file;
sourceTree = "<group>";
@ -1756,8 +1865,8 @@
A7D8A7DC23E2513F00DCD162 /* cocoa */ = {
isa = PBXGroup;
children = (
A7D8A7DD23E2513F00DCD162 /* SDL_rwopsbundlesupport.h */,
A7D8A7DE23E2513F00DCD162 /* SDL_rwopsbundlesupport.m */,
A7D8A7DD23E2513F00DCD162 /* SDL_iostreambundlesupport.h */,
A7D8A7DE23E2513F00DCD162 /* SDL_iostreambundlesupport.m */,
);
path = cocoa;
sourceTree = "<group>";
@ -1795,6 +1904,9 @@
children = (
A7D8A7FD23E2513F00DCD162 /* cocoa */,
A7D8A7F723E2513F00DCD162 /* dummy */,
00002B010DB1A70931C20000 /* SDL_filesystem.c */,
F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */,
000050A2BB34616138570000 /* posix */,
);
path = filesystem;
sourceTree = "<group>";
@ -1920,6 +2032,9 @@
A7D8A8D423E2514000DCD162 /* SDL_getenv.c */,
A7D8A8D323E2514000DCD162 /* SDL_iconv.c */,
A7D8A8D923E2514000DCD162 /* SDL_malloc.c */,
F316ABD72B5C3185002EF551 /* SDL_memcpy.c */,
F316ABDA2B5CA721002EF551 /* SDL_memmove.c */,
F316ABD62B5C3185002EF551 /* SDL_memset.c */,
A7D8A8D723E2514000DCD162 /* SDL_qsort.c */,
A7D8A8D823E2514000DCD162 /* SDL_stdlib.c */,
A7D8A8D523E2514000DCD162 /* SDL_string.c */,
@ -2074,6 +2189,24 @@
path = SDL3;
sourceTree = "<group>";
};
E47911832BA9555500CE3B7F /* storage */ = {
isa = PBXGroup;
children = (
E47911872BA9555500CE3B7F /* SDL_storage.c */,
E47911882BA9555500CE3B7F /* SDL_sysstorage.h */,
E47911892BA9555500CE3B7F /* generic */,
);
path = storage;
sourceTree = "<group>";
};
E47911892BA9555500CE3B7F /* generic */ = {
isa = PBXGroup;
children = (
E479118A2BA9555500CE3B7F /* SDL_genericstorage.c */,
);
path = generic;
sourceTree = "<group>";
};
E4A568B42AF763940062EEC4 /* generic */ = {
isa = PBXGroup;
children = (
@ -2091,6 +2224,31 @@
path = core;
sourceTree = "<group>";
};
F37E18542BA50EB40098C111 /* dialog */ = {
isa = PBXGroup;
children = (
F37E18552BA50ED50098C111 /* cocoa */,
F37E18562BA50F2A0098C111 /* dummy */,
);
path = dialog;
sourceTree = "<group>";
};
F37E18552BA50ED50098C111 /* cocoa */ = {
isa = PBXGroup;
children = (
F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */,
);
path = cocoa;
sourceTree = "<group>";
};
F37E18562BA50F2A0098C111 /* dummy */ = {
isa = PBXGroup;
children = (
F37E18592BA50F450098C111 /* SDL_dummydialog.c */,
);
path = dummy;
sourceTree = "<group>";
};
F3ADAB8C2576F08500A6B1D9 /* ios */ = {
isa = PBXGroup;
children = (
@ -2131,10 +2289,12 @@
A7D8B61723E2514300DCD162 /* SDL_assert_c.h in Headers */,
F3F7D9292933074E00816151 /* SDL_atomic.h in Headers */,
F3F7D8ED2933074E00816151 /* SDL_audio.h in Headers */,
F3DDCC602AFD432500B0842B /* SDL_video_capture.h in Headers */,
A7D8B7A023E2514400DCD162 /* SDL_audio_c.h in Headers */,
F3DDCC5A2AFD42B600B0842B /* SDL_video_capture_c.h in Headers */,
F32DDACF2AB795A30041EAA5 /* SDL_audio_channel_converters.h in Headers */,
F32DDAD22AB795A30041EAA5 /* SDL_audio_resampler_filter.h in Headers */,
A7D8B7B223E2514400DCD162 /* SDL_audiodev_c.h in Headers */,
F32DDAD32AB795A30041EAA5 /* SDL_audioqueue.h in Headers */,
F32DDAD02AB795A30041EAA5 /* SDL_audioresample.h in Headers */,
F3F7D9E12933074E00816151 /* SDL_begin_code.h in Headers */,
F3F7D9A52933074E00816151 /* SDL_bits.h in Headers */,
A7D8BA0123E2514400DCD162 /* SDL_blendfillrect.h in Headers */,
@ -2145,11 +2305,12 @@
A7D8B2BA23E2514200DCD162 /* SDL_blit_auto.h in Headers */,
A7D8B39823E2514200DCD162 /* SDL_blit_copy.h in Headers */,
A7D8ADEC23E2514100DCD162 /* SDL_blit_slow.h in Headers */,
F37E184E2B8C097D0098C111 /* SDL_camera.h in Headers */,
F3F7D9A12933074E00816151 /* SDL_clipboard.h in Headers */,
F3DDCC562AFD42B600B0842B /* SDL_clipboard_c.h in Headers */,
A7D8BB6F23E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
F3F7D9D92933074E00816151 /* SDL_close_code.h in Headers */,
A7D8AECA23E2514100DCD162 /* SDL_cocoaclipboard.h in Headers */,
F3DDCC5C2AFD42B600B0842B /* SDL_sysvideocapture.h in Headers */,
A7D8AF1223E2514100DCD162 /* SDL_cocoaevents.h in Headers */,
A7D8AE8E23E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
A7D8AF0623E2514100DCD162 /* SDL_cocoamessagebox.h in Headers */,
@ -2158,31 +2319,29 @@
A7D8AF1E23E2514100DCD162 /* SDL_cocoamouse.h in Headers */,
A7D8AEDC23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */,
A7D8AEEE23E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
F3681E812B7AA6240002C6FD /* SDL_cocoashape.h in Headers */,
A7D8AF0023E2514100DCD162 /* SDL_cocoavideo.h in Headers */,
A7D8AEE823E2514100DCD162 /* SDL_cocoavulkan.h in Headers */,
A7D8AEFA23E2514100DCD162 /* SDL_cocoawindow.h in Headers */,
F32DDACF2AB795A30041EAA5 /* SDL_audio_channel_converters.h in Headers */,
F3F7D9D12933074E00816151 /* SDL_copying.h in Headers */,
A7D8B8CC23E2514400DCD162 /* SDL_coreaudio.h in Headers */,
A7D8A96F23E2514000DCD162 /* SDL_coremotionsensor.h in Headers */,
F3F7D9B92933074E00816151 /* SDL_cpuinfo.h in Headers */,
F3990E062A788303000D8759 /* SDL_hidapi_ios.h in Headers */,
A7D8B98023E2514400DCD162 /* SDL_d3dmath.h in Headers */,
F362B91A2B3349E200D30B94 /* SDL_gamepad_c.h in Headers */,
A7D8B8A223E2514400DCD162 /* SDL_diskaudio.h in Headers */,
A7D8BB3F23E2514500DCD162 /* SDL_displayevents_c.h in Headers */,
A7D8BA1923E2514400DCD162 /* SDL_draw.h in Headers */,
E479118E2BA9555500CE3B7F /* SDL_sysstorage.h in Headers */,
A7D8BA0723E2514400DCD162 /* SDL_drawline.h in Headers */,
A7D8B9EF23E2514400DCD162 /* SDL_drawpoint.h in Headers */,
A7D8BB2D23E2514500DCD162 /* SDL_dropevents_c.h in Headers */,
A7D8B79423E2514400DCD162 /* SDL_dummyaudio.h in Headers */,
A7D8A96323E2514000DCD162 /* SDL_dummysensor.h in Headers */,
A7D8AB0A23E2514100DCD162 /* SDL_dynapi.h in Headers */,
F32DDAD02AB795A30041EAA5 /* SDL_audioresample.h in Headers */,
A7D8AB1023E2514100DCD162 /* SDL_dynapi_overrides.h in Headers */,
A7D8AB1C23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
E4F7981C2AD8D85500669F54 /* SDL_dynapi_unsupported.h in Headers */,
F3F7D9252933074E00816151 /* SDL_egl.h in Headers */,
F362B9192B3349E200D30B94 /* controller_list.h in Headers */,
A7D8ABD923E2514100DCD162 /* SDL_egl_c.h in Headers */,
F3F7D93D2933074E00816151 /* SDL_endian.h in Headers */,
F3F7D9352933074E00816151 /* SDL_error.h in Headers */,
@ -2191,6 +2350,7 @@
A7D8BBA523E2514500DCD162 /* SDL_events_c.h in Headers */,
F3F7D99D2933074E00816151 /* SDL_filesystem.h in Headers */,
F3F7D9852933074E00816151 /* SDL_gamepad.h in Headers */,
F362B91A2B3349E200D30B94 /* SDL_gamepad_c.h in Headers */,
A7D8B4AC23E2514300DCD162 /* SDL_gamepad_db.h in Headers */,
A7D8BA5523E2514400DCD162 /* SDL_gles2funcs.h in Headers */,
A7D8BA7923E2514400DCD162 /* SDL_glfuncs.h in Headers */,
@ -2198,6 +2358,9 @@
F3F7D8F92933074E00816151 /* SDL_haptic.h in Headers */,
A7D8AABC23E2514100DCD162 /* SDL_haptic_c.h in Headers */,
F3F7D96D2933074E00816151 /* SDL_hidapi.h in Headers */,
F3990E042A788303000D8759 /* SDL_hidapi_c.h in Headers */,
F3990E062A788303000D8759 /* SDL_hidapi_ios.h in Headers */,
F3990E052A788303000D8759 /* SDL_hidapi_mac.h in Headers */,
A75FDBC523EA380300529352 /* SDL_hidapi_rumble.h in Headers */,
A7D8B55723E2514300DCD162 /* SDL_hidapijoystick_c.h in Headers */,
F3F7D9112933074E00816151 /* SDL_hints.h in Headers */,
@ -2206,7 +2369,6 @@
A7D8A99923E2514000DCD162 /* SDL_internal.h in Headers */,
F3B38CDF296E2E52005DA6D3 /* SDL_intrin.h in Headers */,
F395C1932569C68F00942BFF /* SDL_iokitjoystick_c.h in Headers */,
F3990E052A788303000D8759 /* SDL_hidapi_mac.h in Headers */,
F3F7D9912933074E00816151 /* SDL_joystick.h in Headers */,
A7D8B58723E2514300DCD162 /* SDL_joystick_c.h in Headers */,
F3F7D9512933074E00816151 /* SDL_keyboard.h in Headers */,
@ -2222,7 +2384,6 @@
F3F7D91D2933074E00816151 /* SDL_messagebox.h in Headers */,
F3F7D98D2933074E00816151 /* SDL_metal.h in Headers */,
F395C1BA2569C6A000942BFF /* SDL_mfijoystick_c.h in Headers */,
F362B91B2B3349E200D30B94 /* SDL_steam_virtual_gamepad.h in Headers */,
F3F7D9992933074E00816151 /* SDL_misc.h in Headers */,
F3F7D9AD2933074E00816151 /* SDL_mouse.h in Headers */,
A7D8BB1B23E2514500DCD162 /* SDL_mouse_c.h in Headers */,
@ -2235,32 +2396,35 @@
F31A92C828D4CB39003BFD6A /* SDL_offscreenopengles.h in Headers */,
A7D8AB6D23E2514100DCD162 /* SDL_offscreenvideo.h in Headers */,
A7D8AB8523E2514100DCD162 /* SDL_offscreenwindow.h in Headers */,
F37E18642BAA40670098C111 /* SDL_time_c.h in Headers */,
F3B38CDB296E2E52005DA6D3 /* SDL_oldnames.h in Headers */,
F3F7D9C92933074E00816151 /* SDL_opengl.h in Headers */,
F3F7D9452933074E00816151 /* SDL_opengl_glext.h in Headers */,
F3E5A6ED2AD5E10800293D83 /* SDL_properties.h in Headers */,
E4F7981C2AD8D85500669F54 /* SDL_dynapi_unsupported.h in Headers */,
F3F7D95D2933074E00816151 /* SDL_opengles.h in Headers */,
F3F7D9612933074E00816151 /* SDL_opengles2.h in Headers */,
F3F7D8FD2933074E00816151 /* SDL_opengles2_gl2.h in Headers */,
F3F7D9392933074E00816151 /* SDL_opengles2_gl2ext.h in Headers */,
F3F7D9692933074E00816151 /* SDL_opengles2_gl2platform.h in Headers */,
F3F7D9092933074E00816151 /* SDL_opengles2_khrplatform.h in Headers */,
F32DDAD22AB795A30041EAA5 /* SDL_audio_resampler_filter.h in Headers */,
63134A222A7902CF0021E9A6 /* SDL_pen.h in Headers */,
63134A252A7902FD0021E9A6 /* SDL_pen_c.h in Headers */,
F3F7D9192933074E00816151 /* SDL_pixels.h in Headers */,
A7D8B2C023E2514200DCD162 /* SDL_pixels_c.h in Headers */,
F3F7D8F12933074E00816151 /* SDL_platform.h in Headers */,
F3B38CD3296E2E52005DA6D3 /* SDL_platform_defines.h in Headers */,
F3F7D9B12933074E00816151 /* SDL_power.h in Headers */,
F3E5A6ED2AD5E10800293D83 /* SDL_properties.h in Headers */,
F3F7D9C12933074E00816151 /* SDL_quit.h in Headers */,
F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */,
F3F7D9CD2933074E00816151 /* SDL_rect.h in Headers */,
A7D8AC0323E2514100DCD162 /* SDL_rect_c.h in Headers */,
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */,
F3F7D9BD2933074E00816151 /* SDL_render.h in Headers */,
A7D8B9FB23E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
F3F7D9152933074E00816151 /* SDL_revision.h in Headers */,
A7D8BA3123E2514400DCD162 /* SDL_rotate.h in Headers */,
F3F7D9652933074E00816151 /* SDL_rwops.h in Headers */,
A7D8B5C323E2514300DCD162 /* SDL_rwopsbundlesupport.h in Headers */,
F3F7D9652933074E00816151 /* SDL_iostream.h in Headers */,
A7D8B5C323E2514300DCD162 /* SDL_iostreambundlesupport.h in Headers */,
F3F7D9492933074E00816151 /* SDL_scancode.h in Headers */,
F3F7D94D2933074E00816151 /* SDL_sensor.h in Headers */,
A7D8A98D23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
@ -2270,6 +2434,7 @@
A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */,
A7D8B9A123E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
F3F7D8F52933074E00816151 /* SDL_stdinc.h in Headers */,
F362B91B2B3349E200D30B94 /* SDL_steam_virtual_gamepad.h in Headers */,
A7D8BBC723E2561500DCD162 /* SDL_steamcontroller.h in Headers */,
F3F7D9312933074E00816151 /* SDL_surface.h in Headers */,
A7D8B85A23E2514400DCD162 /* SDL_sysaudio.h in Headers */,
@ -2294,13 +2459,12 @@
F3F7D9012933074E00816151 /* SDL_touch.h in Headers */,
A7D8BB6323E2514500DCD162 /* SDL_touch_c.h in Headers */,
A1626A522617008D003F1973 /* SDL_triangle.h in Headers */,
F3DDCC5D2AFD42B600B0842B /* SDL_rect_impl.h in Headers */,
A7D8BBD223E2574800DCD162 /* SDL_uikitappdelegate.h in Headers */,
A7D8BBD423E2574800DCD162 /* SDL_uikitclipboard.h in Headers */,
A7D8BBD623E2574800DCD162 /* SDL_uikitevents.h in Headers */,
F37E185C2BAA3EF90098C111 /* SDL_time.h in Headers */,
A7D8BBD823E2574800DCD162 /* SDL_uikitmessagebox.h in Headers */,
A7D8BBDA23E2574800DCD162 /* SDL_uikitmetalview.h in Headers */,
F3990E042A788303000D8759 /* SDL_hidapi_c.h in Headers */,
A7D8BBDC23E2574800DCD162 /* SDL_uikitmodes.h in Headers */,
A7D8BBDE23E2574800DCD162 /* SDL_uikitopengles.h in Headers */,
A7D8BBE023E2574800DCD162 /* SDL_uikitopenglview.h in Headers */,
@ -2309,11 +2473,11 @@
A7D8BBE623E2574800DCD162 /* SDL_uikitviewcontroller.h in Headers */,
A7D8BBE823E2574800DCD162 /* SDL_uikitvulkan.h in Headers */,
A7D8BBEA23E2574800DCD162 /* SDL_uikitwindow.h in Headers */,
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */,
F386F6F02884663E001840AA /* SDL_utils_c.h in Headers */,
F3973FA228A59BDD00B84553 /* SDL_vacopy.h in Headers */,
F3F7D9D52933074E00816151 /* SDL_version.h in Headers */,
F3F7D9592933074E00816151 /* SDL_video.h in Headers */,
F3DDCC5B2AFD42B600B0842B /* SDL_video_c.h in Headers */,
75E09163241EA924004729E1 /* SDL_virtualjoystick_c.h in Headers */,
F3F7D9952933074E00816151 /* SDL_vulkan.h in Headers */,
A7D8AD1D23E2514100DCD162 /* SDL_vulkan_internal.h in Headers */,
@ -2322,6 +2486,7 @@
A7D8B3B023E2514200DCD162 /* SDL_yuv_c.h in Headers */,
A7D8B9CB23E2514400DCD162 /* SDL_yuv_sw_c.h in Headers */,
A7D8BB4523E2514500DCD162 /* blank_cursor.h in Headers */,
F362B9192B3349E200D30B94 /* controller_list.h in Headers */,
A7D8B5B723E2514300DCD162 /* controller_type.h in Headers */,
A7D8BB4B23E2514500DCD162 /* default_cursor.h in Headers */,
A7D8B23C23E2514200DCD162 /* egl.h in Headers */,
@ -2341,30 +2506,31 @@
A7D8B56F23E2514300DCD162 /* usb_ids.h in Headers */,
A7D8B25423E2514200DCD162 /* vk_icd.h in Headers */,
A7D8B24E23E2514200DCD162 /* vk_layer.h in Headers */,
F3DDCC562AFD42B600B0842B /* SDL_clipboard_c.h in Headers */,
A7D8B26623E2514200DCD162 /* vk_platform.h in Headers */,
A7D8B2AE23E2514200DCD162 /* vk_sdk_platform.h in Headers */,
A7D8B26023E2514200DCD162 /* vulkan.h in Headers */,
A7D8B26C23E2514200DCD162 /* vulkan.hpp in Headers */,
A7D8B2B423E2514200DCD162 /* vulkan_android.h in Headers */,
A7D8B2A823E2514200DCD162 /* vulkan_core.h in Headers */,
E41D20152BA9577D003073FA /* SDL_storage.h in Headers */,
F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */,
A7D8B27223E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
A7D8B2A223E2514200DCD162 /* vulkan_ios.h in Headers */,
A7D8B28423E2514200DCD162 /* vulkan_macos.h in Headers */,
A7D8B29623E2514200DCD162 /* vulkan_mir.h in Headers */,
A7D8B25A23E2514200DCD162 /* vulkan_vi.h in Headers */,
F32DDAD32AB795A30041EAA5 /* SDL_audioqueue.h in Headers */,
A7D8B27823E2514200DCD162 /* vulkan_wayland.h in Headers */,
A7D8B27E23E2514200DCD162 /* vulkan_win32.h in Headers */,
A7D8B29023E2514200DCD162 /* vulkan_xcb.h in Headers */,
F3DDCC572AFD42B600B0842B /* SDL_surface_pixel_impl.h in Headers */,
A7D8B29C23E2514200DCD162 /* vulkan_xlib.h in Headers */,
A7D8B28A23E2514200DCD162 /* vulkan_xlib_xrandr.h in Headers */,
A7D8B3D423E2514300DCD162 /* yuv_rgb.h in Headers */,
F3FA5A252B59ACE000FEAD97 /* yuv_rgb_common.h in Headers */,
F3FA5A1D2B59ACE000FEAD97 /* yuv_rgb_internal.h in Headers */,
F3FA5A242B59ACE000FEAD97 /* yuv_rgb_lsx.h in Headers */,
F3FA5A1E2B59ACE000FEAD97 /* yuv_rgb_lsx_func.h in Headers */,
F3FA5A1F2B59ACE000FEAD97 /* yuv_rgb_sse.h in Headers */,
A7D8B3C823E2514200DCD162 /* yuv_rgb_sse_func.h in Headers */,
F3FA5A202B59ACE000FEAD97 /* yuv_rgb_std.h in Headers */,
A7D8B3CE23E2514300DCD162 /* yuv_rgb_std_func.h in Headers */,
63134A222A7902CF0021E9A6 /* SDL_pen.h in Headers */,
63134A252A7902FD0021E9A6 /* SDL_pen_c.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2459,7 +2625,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "mkdir -p build/dmg-tmp\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
shellScript = "mkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/CMake/sdl3-config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/resources/CMake/sdl3-config-version.cmake build/dmg-tmp/share/cmake/SDL3\n\nmkdir -p \n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
};
F3B38CF0296F63D1005DA6D3 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -2494,6 +2660,7 @@
9846B07C287A9020000C35C8 /* SDL_hidapi_shield.c in Sources */,
A7D8BBD923E2574800DCD162 /* SDL_uikitmessagebox.m in Sources */,
F32DDAD42AB795A30041EAA5 /* SDL_audioresample.c in Sources */,
F3FA5A212B59ACE000FEAD97 /* yuv_rgb_std.c in Sources */,
A7D8AD2923E2514100DCD162 /* SDL_vulkan_utils.c in Sources */,
A7D8A95123E2514000DCD162 /* SDL_spinlock.c in Sources */,
F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */,
@ -2504,9 +2671,9 @@
A7D8B98623E2514400DCD162 /* SDL_render_metal.m in Sources */,
A7D8AE7623E2514100DCD162 /* SDL_clipboard.c in Sources */,
A7D8AEC423E2514100DCD162 /* SDL_cocoaevents.m in Sources */,
E479118F2BA9555500CE3B7F /* SDL_genericstorage.c in Sources */,
A7D8B86623E2514400DCD162 /* SDL_audiocvt.c in Sources */,
A7D8B9F523E2514400DCD162 /* SDL_rotate.c in Sources */,
F3DDCC5E2AFD42B600B0842B /* SDL_video_capture_v4l2.c in Sources */,
A7D8BBE323E2574800DCD162 /* SDL_uikitvideo.m in Sources */,
5616CA4E252BB2A6005D5928 /* SDL_sysurl.m in Sources */,
A7D8A97523E2514000DCD162 /* SDL_coremotionsensor.m in Sources */,
@ -2522,9 +2689,8 @@
A7D8AB2523E2514100DCD162 /* SDL_log.c in Sources */,
A7D8AE8823E2514100DCD162 /* SDL_cocoaopengl.m in Sources */,
A7D8AB7323E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
A7D8B3BF23E2514200DCD162 /* yuv_rgb.c in Sources */,
F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */,
A7D8B43423E2514300DCD162 /* SDL_systhread.c in Sources */,
F3DDCC592AFD42B600B0842B /* SDL_video_capture_apple.m in Sources */,
A7D8BB3323E2514500DCD162 /* SDL_windowevents.c in Sources */,
A7D8BABB23E2514400DCD162 /* s_scalbn.c in Sources */,
F3973FAB28A59BDD00B84553 /* SDL_crc16.c in Sources */,
@ -2533,6 +2699,7 @@
A7D8B9DD23E2514400DCD162 /* SDL_blendpoint.c in Sources */,
A7D8B4EE23E2514300DCD162 /* SDL_gamepad.c in Sources */,
E4A568B62AF763940062EEC4 /* SDL_sysmain_callbacks.c in Sources */,
F316ABD82B5C3185002EF551 /* SDL_memset.c in Sources */,
A7D8BA1323E2514400DCD162 /* SDL_render_sw.c in Sources */,
A7D8B42223E2514300DCD162 /* SDL_syssem.c in Sources */,
A7D8B53923E2514300DCD162 /* SDL_hidapi_xbox360.c in Sources */,
@ -2548,6 +2715,7 @@
A7D8AB6723E2514100DCD162 /* SDL_offscreenevents.c in Sources */,
A7D8ABF123E2514100DCD162 /* SDL_nullevents.c in Sources */,
A7D8B81823E2514400DCD162 /* SDL_audiodev.c in Sources */,
E479118D2BA9555500CE3B7F /* SDL_storage.c in Sources */,
A7D8AF0C23E2514100DCD162 /* SDL_cocoaclipboard.m in Sources */,
A7D8BBE523E2574800DCD162 /* SDL_uikitview.m in Sources */,
A7D8BBE923E2574800DCD162 /* SDL_uikitvulkan.m in Sources */,
@ -2559,7 +2727,6 @@
A7D8B86023E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
A7D8BBC523E2561500DCD162 /* SDL_steamcontroller.c in Sources */,
A7D8AD3223E2514100DCD162 /* SDL_blit_N.c in Sources */,
F3DDCC582AFD42B600B0842B /* SDL_video_capture.c in Sources */,
A7D8BB7B23E2514500DCD162 /* SDL_dropevents.c in Sources */,
A7D8BACD23E2514500DCD162 /* e_atan2.c in Sources */,
A7D8BA8B23E2514400DCD162 /* s_sin.c in Sources */,
@ -2578,12 +2745,13 @@
F32DDAD12AB795A30041EAA5 /* SDL_audioqueue.c in Sources */,
A7D8B8E423E2514400DCD162 /* SDL_error.c in Sources */,
A7D8AD6823E2514100DCD162 /* SDL_blit.c in Sources */,
A7D8B5BD23E2514300DCD162 /* SDL_rwops.c in Sources */,
A7D8B5BD23E2514300DCD162 /* SDL_iostream.c in Sources */,
A7D8BA9123E2514400DCD162 /* s_cos.c in Sources */,
A7D8B9D123E2514400DCD162 /* SDL_yuv_sw.c in Sources */,
A7D8B76A23E2514300DCD162 /* SDL_wave.c in Sources */,
5616CA4C252BB2A6005D5928 /* SDL_url.c in Sources */,
A7D8BAD323E2514500DCD162 /* s_tan.c in Sources */,
F316ABDB2B5CA721002EF551 /* SDL_memmove.c in Sources */,
A7D8AA6523E2514000DCD162 /* SDL_hints.c in Sources */,
A7D8B53F23E2514300DCD162 /* SDL_hidapi_ps4.c in Sources */,
F362B91C2B3349E200D30B94 /* SDL_steam_virtual_gamepad.c in Sources */,
@ -2597,6 +2765,7 @@
F395C1B12569C6A000942BFF /* SDL_mfijoystick.m in Sources */,
A7D8B99223E2514400DCD162 /* SDL_shaders_metal.metal in Sources */,
F3990DF52A787C10000D8759 /* SDL_sysurl.m in Sources */,
F316ABD92B5C3185002EF551 /* SDL_memcpy.c in Sources */,
A7D8B97A23E2514400DCD162 /* SDL_render.c in Sources */,
A7D8ABD323E2514100DCD162 /* SDL_stretch.c in Sources */,
A7D8BAFD23E2514500DCD162 /* s_floor.c in Sources */,
@ -2639,6 +2808,7 @@
A7D8ACE723E2514100DCD162 /* SDL_rect.c in Sources */,
A7D8AE9A23E2514100DCD162 /* SDL_cocoaopengles.m in Sources */,
A7D8B96823E2514400DCD162 /* SDL_qsort.c in Sources */,
F3FA5A222B59ACE000FEAD97 /* yuv_rgb_sse.c in Sources */,
A7D8B55123E2514300DCD162 /* SDL_hidapi_switch.c in Sources */,
A7D8B96223E2514400DCD162 /* SDL_strtokr.c in Sources */,
A7D8BB7523E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
@ -2655,12 +2825,13 @@
A7D8AADA23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
A7D8BAE523E2514500DCD162 /* e_exp.c in Sources */,
A7D8BB8123E2514500DCD162 /* SDL_quit.c in Sources */,
F3FA5A232B59ACE000FEAD97 /* yuv_rgb_lsx.c in Sources */,
A7D8AEA623E2514100DCD162 /* SDL_cocoawindow.m in Sources */,
A7D8B43A23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
A7D8AAB023E2514100DCD162 /* SDL_syshaptic.c in Sources */,
F3F07D5A269640160074468B /* SDL_hidapi_luna.c in Sources */,
A7D8BBD523E2574800DCD162 /* SDL_uikitclipboard.m in Sources */,
A7D8B5C923E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
A7D8B5C923E2514300DCD162 /* SDL_iostreambundlesupport.m in Sources */,
F386F6F92884663E001840AA /* SDL_utils.c in Sources */,
E4F7981E2AD8D86A00669F54 /* SDL_render_unsupported.c in Sources */,
A7D8AC0F23E2514100DCD162 /* SDL_video.c in Sources */,
@ -2675,7 +2846,9 @@
A7D8A99323E2514000DCD162 /* SDL_sensor.c in Sources */,
A7D8BAA923E2514400DCD162 /* k_sin.c in Sources */,
A7D8AB4923E2514100DCD162 /* SDL_systimer.c in Sources */,
F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */,
A7D8BA2523E2514400DCD162 /* SDL_drawpoint.c in Sources */,
F3681E802B7AA6240002C6FD /* SDL_cocoashape.m in Sources */,
F388C95528B5F6F700661ECF /* SDL_hidapi_ps3.c in Sources */,
A7D8BAF723E2514500DCD162 /* e_sqrt.c in Sources */,
F36C7AD1294BA009004D61C3 /* SDL_runapp.c in Sources */,
@ -2688,6 +2861,13 @@
000040E76FDC6AE48CBF0000 /* SDL_hashtable.c in Sources */,
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */,
000028F8113A53F4333E0000 /* SDL_main_callbacks.c in Sources */,
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */,
00001B2471F503DD3C1B0000 /* SDL_camera_dummy.c in Sources */,
00002B20A48E055EB0350000 /* SDL_camera_coremedia.m in Sources */,
000080903BC03006F24E0000 /* SDL_filesystem.c in Sources */,
0000481D255AF155B42C0000 /* SDL_sysfsops.c in Sources */,
0000494CC93F3E624D3C0000 /* SDL_systime.c in Sources */,
000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2709,8 +2889,8 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_COMPATIBILITY_VERSION = 101.0.0;
DYLIB_CURRENT_VERSION = 101.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
@ -2740,13 +2920,14 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_STYLE = "non-global";
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
SUPPORTS_MACCATALYST = YES;
TVOS_DEPLOYMENT_TARGET = 9.0;
XROS_DEPLOYMENT_TARGET = 1.0;
};
name = Release;
};
@ -2765,8 +2946,8 @@
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_COMPATIBILITY_VERSION = 101.0.0;
DYLIB_CURRENT_VERSION = 101.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -2796,14 +2977,15 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_INSTALLED_PRODUCT = NO;
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
SUPPORTED_PLATFORMS = "xrsimulator xros macosx iphonesimulator iphoneos appletvsimulator appletvos";
SUPPORTS_MACCATALYST = YES;
TVOS_DEPLOYMENT_TARGET = 9.0;
XROS_DEPLOYMENT_TARGET = 1.0;
};
name = Debug;
};

View File

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

View File

@ -1,14 +1,31 @@
# based on the files generated by CMake's write_basic_package_version_file
# SDL CMake version configuration file:
# This file is meant to be placed in Resources/CMake of a SDL3 framework
# This file is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h")
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL3.framework")
cmake_minimum_required(VERSION 3.12)
get_filename_component(_sdl3_xcframework_parent_path "${CMAKE_CURRENT_LIST_DIR}" REALPATH) # /share/cmake/SDL3/
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" REALPATH) # /share/cmake/SDL3/
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /share/cmake
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /share
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /
set(_sdl3_xcframework "${_sdl3_xcframework_parent_path}/SDL3.xcframework") # /SDL3.xcframework
set(_sdl3_framework "${_sdl3_xcframework}/macos-arm64_x86_64/SDL3.framework") # /SDL3.xcframework/macos-arm64_x86_64/SDL3.framework
set(_sdl3_version_h "${_sdl3_framework}/Headers/SDL_version.h") # /SDL3.xcframework/macos-arm64_x86_64/SDL3.framework/Headers/SDL_version.h
if(NOT EXISTS "${_sdl3_version_h}")
message(AUTHOR_WARNING "Cannot not find ${_sdl3_framework}. This script is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework")
return()
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h" _sdl_version_h)
file(READ "${_sdl3_version_h}" _sdl_version_h)
unset(_sdl3_xcframework_parent_path)
unset(_sdl3_framework)
unset(_sdl3_xcframework)
unset(_sdl3_version_h)
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
set(_sdl_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
@ -22,6 +39,13 @@ else()
return()
endif()
unset(_sdl_major_re)
unset(_sdl_major)
unset(_sdl_minor_re)
unset(_sdl_minor)
unset(_sdl_patch_re)
unset(_sdl_patch)
if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
@ -42,7 +66,11 @@ else()
endif()
endif()
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
# The SDL3.xcframework only contains 64-bit archives
if(NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
if(NOT CMAKE_SYSTEM_NAME MATCHES "^(Darwin|iOS|tvOS)$")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

View File

@ -1,5 +1,5 @@
# SDL CMake configuration file:
# This file is meant to be placed in Resources/CMake of a SDL3 framework
# This file is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework
# INTERFACE_LINK_OPTIONS needs CMake 3.12
cmake_minimum_required(VERSION 3.12)
@ -31,15 +31,50 @@ endmacro()
set(SDL3_FOUND TRUE)
# Compute the installation prefix relative to this file.
get_filename_component(_sdl3_framework_path "${CMAKE_CURRENT_LIST_FILE}" PATH) # /SDL3.framework/Resources/CMake/
get_filename_component(_sdl3_framework_path "${_IMPORT_PREFIX}" PATH) # /SDL3.framework/Resources/
get_filename_component(_sdl3_framework_path "${_IMPORT_PREFIX}" PATH) # /SDL3.framework/
get_filename_component(_sdl3_framework_parent_path "${_sdl3_framework_path}" PATH) # /
macro(_check_target_is_simulator)
include(CheckCSourceCompiles)
check_c_source_compiles([===[
#include <TargetConditionals.h>
#if defined(TARGET_OS_SIMULATOR)
int target_is_simulator;
#endif
int main(int argc, char *argv[]) { return target_is_simulator; }
]===] SDL_TARGET_IS_SIMULATOR)
endmacro()
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
_check_target_is_simulator()
if(SDL_TARGET_IS_SIMULATOR)
set(_xcfw_target_subdir "ios-arm64_x86_64-simulator")
else()
set(_xcfw_target_subdir "ios-arm64")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "tvOS")
_check_target_is_simulator()
if(SDL_TARGET_IS_SIMULATOR)
set(_xcfw_target_subdir "tvos-arm64_x86_64-simulator")
else()
set(_xcfw_target_subdir "tvos-arm64")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(_xcfw_target_subdir "macos-arm64_x86_64")
else()
message(WARNING "Unsupported Apple platform (${CMAKE_SYSTEM_NAME}) and broken sdl3-config-version.cmake")
set(SDL3_FOUND FALSE)
return()
endif()
# Compute the installation prefix relative to this file.
get_filename_component(_sdl3_xcframework_parent_path "${CMAKE_CURRENT_LIST_DIR}" REALPATH) # /share/cmake/SDL3/
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" REALPATH) # /share/cmake/SDL3/
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /share/cmake
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /share
get_filename_component(_sdl3_xcframework_parent_path "${_sdl3_xcframework_parent_path}" PATH) # /
set_and_check(_sdl3_xcframework_path "${_sdl3_xcframework_parent_path}/SDL3.xcframework") # /SDL3.xcframework
set_and_check(_sdl3_framework_parent_path "${_sdl3_xcframework_path}/${_xcfw_target_subdir}") # /SDL3.xcframework/macos-arm64_x86_64
set_and_check(_sdl3_framework_path "${_sdl3_framework_parent_path}/SDL3.framework") # /SDL3.xcframework/macos-arm64_x86_64/SDL3.framework
set_and_check(_sdl3_include_dirs "${_sdl3_framework_path}/Headers")
set(SDL3_LIBRARIES "SDL3::SDL3")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3-target.cmake files.
@ -53,16 +88,26 @@ if(NOT TARGET SDL3::Headers)
)
endif()
set(SDL3_Headers_FOUND TRUE)
unset(_sdl3_include_dirs)
if(NOT TARGET SDL3::SDL3-shared)
add_library(SDL3::SDL3-shared SHARED IMPORTED)
if(CMAKE_VERSION GREATER_EQUAL "3.28")
set_target_properties(SDL3::SDL3-shared
PROPERTIES
FRAMEWORK "TRUE"
IMPORTED_LOCATION "${_sdl3_xcframework_path}"
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
)
else()
set_target_properties(SDL3::SDL3-shared
PROPERTIES
FRAMEWORK "TRUE"
IMPORTED_LOCATION "${_sdl3_framework_path}/SDL3"
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
)
endif()
set_target_properties(SDL3::SDL3-shared
PROPERTIES
FRAMEWORK "TRUE"
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
IMPORTED_LOCATION "${_sdl3_framework_path}/SDL3"
IMPORTED_SONAME "${_sdl3_framework_path}/SDL3"
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
INTERFACE_SDL3_SHARED "ON"
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
@ -75,10 +120,13 @@ set(SDL3_SDL3-static FALSE)
set(SDL3_SDL3_test FALSE)
unset(_sdl3_xcframework_parent_path)
unset(_sdl3_xcframework_path)
unset(_sdl3_framework_parent_path)
unset(_sdl3_framework_path)
unset(_sdl3_include_dirs)
if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
if(SDL3_SDL3-shared_FOUND)
set(SDL3_SDL3_FOUND TRUE)
endif()
@ -96,9 +144,13 @@ endfunction()
if(NOT TARGET SDL3::SDL3)
if(TARGET SDL3::SDL3-shared)
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
else()
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-static)
endif()
endif()
check_required_components(SDL3)
set(SDL3_LIBRARIES SDL3::SDL3)
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
set(SDL3_STATIC_PRIVATE_LIBS)
set(SDL3TEST_LIBRARY SDL3::SDL3_test)

View File

@ -137,7 +137,7 @@
F35E56CF2983130F00A43A5F /* testautomation_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56B62983130A00A43A5F /* testautomation_main.c */; };
F35E56D02983130F00A43A5F /* testautomation_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56B72983130A00A43A5F /* testautomation_hints.c */; };
F35E56D12983130F00A43A5F /* testautomation_render.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56B82983130A00A43A5F /* testautomation_render.c */; };
F35E56D22983130F00A43A5F /* testautomation_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56B92983130B00A43A5F /* testautomation_rwops.c */; };
F35E56D22983130F00A43A5F /* testautomation_iostream.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56B92983130B00A43A5F /* testautomation_iostream.c */; };
F35E56D32983130F00A43A5F /* testautomation_math.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56BA2983130B00A43A5F /* testautomation_math.c */; };
F35E56D42983130F00A43A5F /* testautomation_events.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56BB2983130B00A43A5F /* testautomation_events.c */; };
F35E56D52983130F00A43A5F /* testautomation_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56BC2983130B00A43A5F /* testautomation_clipboard.c */; };
@ -1312,7 +1312,7 @@
F35E56B62983130A00A43A5F /* testautomation_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_main.c; sourceTree = "<group>"; };
F35E56B72983130A00A43A5F /* testautomation_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_hints.c; sourceTree = "<group>"; };
F35E56B82983130A00A43A5F /* testautomation_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_render.c; sourceTree = "<group>"; };
F35E56B92983130B00A43A5F /* testautomation_rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_rwops.c; sourceTree = "<group>"; };
F35E56B92983130B00A43A5F /* testautomation_iostream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_iostream.c; sourceTree = "<group>"; };
F35E56BA2983130B00A43A5F /* testautomation_math.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_math.c; sourceTree = "<group>"; };
F35E56BB2983130B00A43A5F /* testautomation_events.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_events.c; sourceTree = "<group>"; };
F35E56BC2983130B00A43A5F /* testautomation_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_clipboard.c; sourceTree = "<group>"; };
@ -1774,7 +1774,7 @@
F35E56C32983130D00A43A5F /* testautomation_platform.c */,
F35E56C52983130D00A43A5F /* testautomation_rect.c */,
F35E56B82983130A00A43A5F /* testautomation_render.c */,
F35E56B92983130B00A43A5F /* testautomation_rwops.c */,
F35E56B92983130B00A43A5F /* testautomation_iostream.c */,
F35E56C82983130E00A43A5F /* testautomation_sdltest.c */,
F35E56BE2983130C00A43A5F /* testautomation_stdlib.c */,
F35E56CB2983130F00A43A5F /* testautomation_surface.c */,
@ -3355,7 +3355,7 @@
files = (
F35E56D12983130F00A43A5F /* testautomation_render.c in Sources */,
F399C6512A7892D800C86979 /* testautomation_intrinsics.c in Sources */,
F35E56D22983130F00A43A5F /* testautomation_rwops.c in Sources */,
F35E56D22983130F00A43A5F /* testautomation_iostream.c in Sources */,
F35E56E32983130F00A43A5F /* testautomation_surface.c in Sources */,
F35E56DB2983130F00A43A5F /* testautomation_platform.c in Sources */,
F35E56DD2983130F00A43A5F /* testautomation_rect.c in Sources */,

View File

@ -15,3 +15,71 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
void manualBackButton();
boolean setActivityTitle(java.lang.String);
void setWindowStyle(boolean);
void setOrientation(int, int, boolean, java.lang.String);
void minimizeWindow();
boolean shouldMinimizeOnFocusLoss();
boolean isScreenKeyboardShown();
boolean supportsRelativeMouse();
boolean setRelativeMouseEnabled(boolean);
boolean sendMessage(int, int);
android.content.Context getContext();
boolean isAndroidTV();
boolean isTablet();
boolean isChromebook();
boolean isDeXMode();
boolean getManifestEnvironmentVariables();
boolean showTextInput(int, int, int, int);
android.view.Surface getNativeSurface();
void initTouch();
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
boolean clipboardHasText();
java.lang.String clipboardGetText();
void clipboardSetText(java.lang.String);
int createCustomCursor(int[], int, int, int, int);
void destroyCustomCursor(int);
boolean setCustomCursor(int);
boolean setSystemCursor(int);
void requestPermission(java.lang.String, int);
int openURL(java.lang.String);
int showToast(java.lang.String, int, int, int, int);
native java.lang.String nativeGetHint(java.lang.String);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
boolean initialize(boolean, boolean);
boolean openDevice(int);
int writeReport(int, byte[], boolean);
boolean readReport(int, byte[], boolean);
void closeDevice(int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
void registerAudioDeviceCallback();
void unregisterAudioDeviceCallback();
int[] audioOpen(int, int, int, int, int);
void audioWriteFloatBuffer(float[]);
void audioWriteShortBuffer(short[]);
void audioWriteByteBuffer(byte[]);
int[] captureOpen(int, int, int, int, int);
int captureReadFloatBuffer(float[], boolean);
int captureReadShortBuffer(short[], boolean);
int captureReadByteBuffer(byte[], boolean);
void audioClose();
void captureClose();
void audioSetThreadPriority(boolean, int);
int nativeSetupJNI();
void removeAudioDevice(boolean, int);
void addAudioDevice(boolean, java.lang.String, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
void pollInputDevices();
void pollHapticDevices();
void hapticRun(int, float, int);
void hapticStop(int);
}

View File

@ -37,6 +37,13 @@
android:name="android.hardware.microphone"
android:required="false" /> -->
<!-- Camera support -->
<!-- if you want to record video, uncomment this. -->
<!--
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
-->
<!-- Allow downloading to the external storage on Android 5.1 and older -->
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
@ -66,7 +73,7 @@
android:hardwareAccelerated="true" >
<!-- Example of setting SDL hints from AndroidManifest.xml:
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
<meta-data android:name="SDL_ENV.SDL_ANDROID_TRAP_BACK_BUTTON" android:value="0"/>
-->
<activity android:name="SDLActivity"

View File

@ -193,7 +193,11 @@ public class HIDDeviceManager {
filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
filter.addAction(HIDDeviceManager.ACTION_USB_PERMISSION);
mContext.registerReceiver(mUsbBroadcast, filter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
mContext.registerReceiver(mUsbBroadcast, filter, Context.RECEIVER_EXPORTED);
} else {
mContext.registerReceiver(mUsbBroadcast, filter);
}
for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) {
handleUsbDeviceAttached(usbDevice);
@ -403,7 +407,11 @@ public class HIDDeviceManager {
IntentFilter filter = new IntentFilter();
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
mContext.registerReceiver(mBluetoothBroadcast, filter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
mContext.registerReceiver(mBluetoothBroadcast, filter, Context.RECEIVER_EXPORTED);
} else {
mContext.registerReceiver(mBluetoothBroadcast, filter);
}
if (mIsChromebook) {
mHandler = new Handler(Looper.getMainLooper());

View File

@ -54,7 +54,7 @@ import java.util.Locale;
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 3;
private static final int SDL_MINOR_VERSION = 0;
private static final int SDL_MINOR_VERSION = 1;
private static final int SDL_MICRO_VERSION = 0;
/*
// Display InputType.SOURCE/CLASS of events and devices
@ -1465,17 +1465,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (device != null && ((device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) == InputDevice.SOURCE_TOUCHSCREEN
|| device.isVirtual())) {
int touchDevId = device.getId();
/*
* Prevent id to be -1, since it's used in SDL internal for synthetic events
* Appears when using Android emulator, eg:
* adb shell input mouse tap 100 100
* adb shell input touchscreen tap 100 100
*/
if (touchDevId < 0) {
touchDevId -= 1;
}
nativeAddTouch(touchDevId, device.getName());
nativeAddTouch(device.getId(), device.getName());
}
}
}

View File

@ -23,7 +23,7 @@ public class SDLControllerManager
public static native int nativeAddJoystick(int device_id, String name, String desc,
int vendor_id, int product_id,
boolean is_accelerometer, int button_mask,
int button_mask,
int naxes, int axis_mask, int nhats);
public static native int nativeRemoveJoystick(int device_id);
public static native int nativeAddHaptic(int device_id, String name);
@ -235,7 +235,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
mJoysticks.add(joystick);
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
getVendorId(joystickDevice), getProductId(joystickDevice), false,
getVendorId(joystickDevice), getProductId(joystickDevice),
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2);
}
}
@ -546,13 +546,15 @@ class SDLHapticHandler {
if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator();
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
if (vib != null) {
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
}

View File

@ -222,16 +222,6 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
int i = -1;
float x,y,p;
/*
* Prevent id to be -1, since it's used in SDL internal for synthetic events
* Appears when using Android emulator, eg:
* adb shell input mouse tap 100 100
* adb shell input touchscreen tap 100 100
*/
if (touchDevId < 0) {
touchDevId -= 1;
}
// 12290 = Samsung DeX mode desktop mouse
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
// 0x2 = SOURCE_CLASS_POINTER

View File

@ -1051,7 +1051,7 @@ typedef SDL_GameController, SDL_Gamepad;
@@
@@
- SDL_GameControllerAddMappingsFromRW
+ SDL_AddGamepadMappingsFromRW
+ SDL_AddGamepadMappingsFromIO
(...)
@@
typedef SDL_GameControllerAxis, SDL_GamepadAxis;
@ -1205,21 +1205,6 @@ typedef SDL_GameControllerButton, SDL_GamepadButton;
(...)
@@
@@
- SDL_GameControllerHasLED
+ SDL_GamepadHasLED
(...)
@@
@@
- SDL_GameControllerHasRumble
+ SDL_GamepadHasRumble
(...)
@@
@@
- SDL_GameControllerHasRumbleTriggers
+ SDL_GamepadHasRumbleTriggers
(...)
@@
@@
- SDL_GameControllerHasSensor
+ SDL_GamepadHasSensor
(...)
@ -1819,25 +1804,15 @@ expression e2;
@@
@@
- RW_SEEK_CUR
+ SDL_RW_SEEK_CUR
+ SDL_IO_SEEK_CUR
@@
@@
- RW_SEEK_END
+ SDL_RW_SEEK_END
+ SDL_IO_SEEK_END
@@
@@
- RW_SEEK_SET
+ SDL_RW_SEEK_SET
@@
@@
- SDL_AllocRW
+ SDL_CreateRW
(...)
@@
@@
- SDL_FreeRW
+ SDL_DestroyRW
(...)
+ SDL_IO_SEEK_SET
@@
@@
- SDL_SensorClose
@ -2168,6 +2143,10 @@ expression e;
+ SDL_EVENT_JOYSTICK_AXIS_MOTION
@@
@@
- SDL_JOYBALLMOTION
+ SDL_EVENT_JOYSTICK_BALL_MOTION
@@
@@
- SDL_JOYHATMOTION
+ SDL_EVENT_JOYSTICK_HAT_MOTION
@@
@ -2428,21 +2407,41 @@ SDL_Event e1;
- e1.caxis
+ e1.gaxis
@@
SDL_Event *e1;
@@
- e1->caxis
+ e1->gaxis
@@
SDL_Event e1;
@@
- e1.cbutton
+ e1.gbutton
@@
SDL_Event *e1;
@@
- e1->cbutton
+ e1->gbutton
@@
SDL_Event e1;
@@
- e1.cdevice
+ e1.gdevice
@@
SDL_Event *e1;
@@
- e1->cdevice
+ e1->gdevice
@@
SDL_Event e1;
@@
- e1.ctouchpad
+ e1.gtouchpad
@@
SDL_Event *e1;
@@
- e1->ctouchpad
+ e1->gtouchpad
@@
SDL_Event e1;
@@
- e1.csensor
@ -2450,29 +2449,49 @@ SDL_Event e1;
@@
SDL_Event *e1;
@@
- e1->caxis
+ e1->gaxis
@@
SDL_Event *e1;
@@
- e1->cbutton
+ e1->gbutton
@@
SDL_Event *e1;
@@
- e1->cdevice
+ e1->gdevice
@@
SDL_Event *e1;
@@
- e1->ctouchpad
+ e1->gtouchpad
@@
SDL_Event *e1;
@@
- e1->csensor
+ e1->gsensor
@@
SDL_Event e1;
@@
- e1.wheel.mouseX
+ e1.wheel.mouse_x
@@
SDL_Event *e1;
@@
- e1->wheel.mouseX
+ e1->wheel.mouse_x
@@
SDL_Event e1;
@@
- e1.wheel.mouseY
+ e1.wheel.mouse_y
@@
SDL_Event *e1;
@@
- e1->wheel.mouseY
+ e1->wheel.mouse_y
@@
SDL_Event e1;
@@
- e1.tfinger.touchId
+ e1.tfinger.touchID
@@
SDL_Event *e1;
@@
- e1->tfinger.touchId
+ e1->tfinger.touchID
@@
SDL_Event e1;
@@
- e1.tfinger.fingerId
+ e1.tfinger.fingerID
@@
SDL_Event *e1;
@@
- e1->tfinger.fingerId
+ e1->tfinger.fingerID
@@
expression e1, e2, e3, e4;
@@
- SDL_CreateWindow(e1, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, e2, e3, e4)
@ -2764,3 +2783,339 @@ expression e1, e2, e3, e4;
@@
- SDL_SoftStretchLinear(e1, e2, e3, e4)
+ SDL_SoftStretch(e1, e2, e3, e4, SDL_SCALEMODE_LINEAR)
@@
@@
- SDL_HapticClose
+ SDL_CloseHaptic
(...)
@@
@@
- SDL_HapticOpen
+ SDL_OpenHaptic
(...)
@@
@@
- SDL_HapticOpenFromMouse
+ SDL_OpenHapticFromMouse
(...)
@@
@@
- SDL_HapticOpenFromJoystick
+ SDL_OpenHapticFromJoystick
(...)
@@
@@
- SDL_MouseIsHaptic
+ SDL_IsMouseHaptic
(...)
@@
@@
- SDL_JoystickIsHaptic
+ SDL_IsJoystickHaptic
(...)
@@
@@
- SDL_HapticNumEffects
+ SDL_GetMaxHapticEffects
(...)
@@
@@
- SDL_HapticNumEffectsPlaying
+ SDL_GetMaxHapticEffectsPlaying
(...)
@@
@@
- SDL_HapticQuery
+ SDL_GetHapticFeatures
(...)
@@
@@
- SDL_HapticNumAxes
+ SDL_GetNumHapticAxes
(...)
@@
@@
- SDL_HapticNewEffect
+ SDL_CreateHapticEffect
(...)
@@
@@
- SDL_HapticUpdateEffect
+ SDL_UpdateHapticEffect
(...)
@@
@@
- SDL_HapticRunEffect
+ SDL_RunHapticEffect
(...)
@@
@@
- SDL_HapticStopEffect
+ SDL_StopHapticEffect
(...)
@@
@@
- SDL_HapticDestroyEffect
+ SDL_DestroyHapticEffect
(...)
@@
@@
- SDL_HapticGetEffectStatus
+ SDL_GetHapticEffectStatus
(...)
@@
@@
- SDL_HapticSetGain
+ SDL_SetHapticGain
(...)
@@
@@
- SDL_HapticSetAutocenter
+ SDL_SetHapticAutocenter
(...)
@@
@@
- SDL_HapticPause
+ SDL_PauseHaptic
(...)
@@
@@
- SDL_HapticUnpause
+ SDL_ResumeHaptic
(...)
@@
@@
- SDL_HapticStopAll
+ SDL_StopHapticEffects
(...)
@@
@@
- SDL_HapticRumbleInit
+ SDL_InitHapticRumble
(...)
@@
@@
- SDL_HapticRumblePlay
+ SDL_PlayHapticRumble
(...)
@@
@@
- SDL_HapticRumbleStop
+ SDL_StopHapticRumble
(...)
@@
@@
- SDL_AtomicTryLock
+ SDL_TryLockSpinlock
(...)
@@
@@
- SDL_AtomicLock
+ SDL_LockSpinlock
(...)
@@
@@
- SDL_AtomicUnlock
+ SDL_UnlockSpinlock
(...)
@@
@@
- SDL_AtomicCAS
+ SDL_AtomicCompareAndSwap
(...)
@@
@@
- SDL_AtomicCASPtr
+ SDL_AtomicCompareAndSwapPointer
(...)
@@
@@
- SDL_ThreadID
+ SDL_GetCurrentThreadID
(...)
@@
@@
- SDL_threadID
+ SDL_ThreadID
(...)
@@
@@
- SDL_HasWindowSurface
+ SDL_WindowHasSurface
(...)
@@
SDL_PixelFormat e1;
@@
- e1.BitsPerPixel
+ e1.bits_per_pixel
@@
SDL_PixelFormat *e1;
@@
- e1->BitsPerPixel
+ e1->bits_per_pixel
@@
SDL_PixelFormat e1;
@@
- e1.BytesPerPixel
+ e1.bytes_per_pixel
@@
SDL_PixelFormat *e1;
@@
- e1->BytesPerPixel
+ e1->bytes_per_pixel
@@
SDL_MessageBoxButtonData e1;
@@
- e1.buttonid
+ e1.buttonID
@@
SDL_MessageBoxButtonData *e1;
@@
- e1->buttonid
+ e1->buttonID
@@
SDL_GamepadBinding e1;
@@
- e1.inputType
+ e1.input_type
@@
SDL_GamepadBinding *e1;
@@
- e1->inputType
+ e1->input_type
@@
SDL_GamepadBinding e1;
@@
- e1.outputType
+ e1.output_type
@@
SDL_GamepadBinding *e1;
@@
- e1->outputType
+ e1->output_type
@@
typedef SDL_version, SDL_Version;
@@
- SDL_version
+ SDL_Version
@@
@@
- SDL_HINT_ALLOW_TOPMOST
+ SDL_HINT_WINDOW_ALLOW_TOPMOST
@@
@@
- SDL_HINT_DIRECTINPUT_ENABLED
+ SDL_HINT_JOYSTICK_DIRECTINPUT
@@
@@
- SDL_HINT_GDK_TEXTINPUT_DEFAULT
+ SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
@@
@@
- SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE
+ SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE
@@
@@
- SDL_HINT_LINUX_DIGITAL_HATS
+ SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS
@@
@@
- SDL_HINT_LINUX_HAT_DEADZONES
+ SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
@@
@@
- SDL_HINT_LINUX_JOYSTICK_CLASSIC
+ SDL_HINT_JOYSTICK_LINUX_CLASSIC
@@
@@
- SDL_HINT_LINUX_JOYSTICK_DEADZONES
+ SDL_HINT_JOYSTICK_LINUX_DEADZONES
@@
@@
- SDL_HINT_PS2_DYNAMIC_VSYNC
+ SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
@@
@@
- SDL_JoystickNumBalls
+ SDL_GetNumJoystickBalls
(...)
@@
@@
- SDL_JoystickGetBall
+ SDL_GetJoystickBall
(...)
@@
@@
- SDL_RWclose
+ SDL_CloseIO
(...)
@@
@@
- SDL_RWread
+ SDL_ReadIO
(...)
@@
@@
- SDL_RWwrite
+ SDL_WriteIO
(...)
@@
@@
- SDL_RWtell
+ SDL_TellIO
(...)
@@
@@
- SDL_RWsize
+ SDL_SizeIO
(...)
@@
@@
- SDL_RWseek
+ SDL_SeekIO
(...)
@@
@@
- SDL_LoadBMP_RW
+ SDL_LoadBMP_IO
(...)
@@
@@
- SDL_LoadWAV_RW
+ SDL_LoadWAV_IO
(...)
@@
@@
- SDL_SaveBMP_RW
+ SDL_SaveBMP_IO
(...)
@@
@@
- SDL_RWFromFile
+ SDL_IOFromFile
(...)
@@
@@
- SDL_RWFromMem
+ SDL_IOFromMem
(...)
@@
@@
- SDL_RWFromConstMem
+ SDL_IOFromConstMem
(...)
@@
typedef SDL_RWops, SDL_IOStream;
@@
- SDL_RWops
+ SDL_IOStream
@@
@@
- SDL_LogGetOutputFunction
+ SDL_GetLogOutputFunction
(...)
@@
@@
- SDL_LogSetOutputFunction
+ SDL_SetLogOutputFunction
(...)

View File

@ -80,7 +80,8 @@ do
cd $folder
done
ACTIVITY="${folder}Activity"
# Uppercase the first char in the activity class name because it's Java
ACTIVITY="$(echo $folder | awk '{$1=toupper(substr($1,0,1))substr($1,2)}1')Activity"
sed -i -e "s|\"SDLActivity\"|\"$ACTIVITY\"|g" $BUILDPATH/app/src/main/AndroidManifest.xml
# Fill in a default Activity

View File

@ -0,0 +1,641 @@
#!/usr/bin/env python
import argparse
import collections
import contextlib
import datetime
import io
import json
import logging
import os
from pathlib import Path
import platform
import re
import shutil
import subprocess
import sys
import tarfile
import tempfile
import textwrap
import typing
import zipfile
logger = logging.getLogger(__name__)
VcArchDevel = collections.namedtuple("VcArchDevel", ("dll", "imp", "test"))
GIT_HASH_FILENAME = ".git-hash"
def itertools_batched(iterator: typing.Iterable, count: int):
iterator = iter(iterator)
while True:
items = []
for _ in range(count):
obj = next(iterator, None)
if obj is None:
yield tuple(items)
return
items.append(obj)
yield tuple(items)
class Executer:
def __init__(self, root: Path, dry: bool=False):
self.root = root
self.dry = dry
def run(self, cmd, stdout=False, dry_out=None, force=False):
sys.stdout.flush()
logger.info("Executing args=%r", cmd)
if self.dry and not force:
if stdout:
return subprocess.run(["echo", "-E", dry_out or ""], stdout=subprocess.PIPE if stdout else None, text=True, check=True, cwd=self.root)
else:
return subprocess.run(cmd, stdout=subprocess.PIPE if stdout else None, text=True, check=True, cwd=self.root)
class SectionPrinter:
@contextlib.contextmanager
def group(self, title: str):
print(f"{title}:")
yield
class GitHubSectionPrinter(SectionPrinter):
def __init__(self):
super().__init__()
self.in_group = False
@contextlib.contextmanager
def group(self, title: str):
print(f"::group::{title}")
assert not self.in_group, "Can enter a group only once"
self.in_group = True
yield
self.in_group = False
print("::endgroup::")
class VisualStudio:
def __init__(self, executer: Executer, year: typing.Optional[str]=None):
self.executer = executer
self.vsdevcmd = self.find_vsdevcmd(year)
self.msbuild = self.find_msbuild()
@property
def dry(self):
return self.executer.dry
VS_YEAR_TO_VERSION = {
"2022": 17,
"2019": 16,
"2017": 15,
"2015": 14,
"2013": 12,
}
def find_vsdevcmd(self, year: typing.Optional[str]=None) -> typing.Optional[Path]:
vswhere_spec = ["-latest"]
if year is not None:
try:
version = cls.VS_YEAR_TO_VERSION[year]
except KeyError:
logger.error("Invalid Visual Studio year")
return None
vswhere_spec.extend(["-version", f"[{version},{version+1})"])
vswhere_cmd = ["vswhere"] + vswhere_spec + ["-property", "installationPath"]
vs_install_path = Path(self.executer.run(vswhere_cmd, stdout=True, dry_out="/tmp").stdout.strip())
logger.info("VS install_path = %s", vs_install_path)
assert vs_install_path.is_dir(), "VS installation path does not exist"
vsdevcmd_path = vs_install_path / "Common7/Tools/vsdevcmd.bat"
logger.info("vsdevcmd path = %s", vsdevcmd_path)
if self.dry:
vsdevcmd_path.parent.mkdir(parents=True, exist_ok=True)
vsdevcmd_path.touch(exist_ok=True)
assert vsdevcmd_path.is_file(), "vsdevcmd.bat batch file does not exist"
return vsdevcmd_path
def find_msbuild(self) -> typing.Optional[Path]:
vswhere_cmd = ["vswhere", "-latest", "-requires", "Microsoft.Component.MSBuild", "-find", "MSBuild\**\Bin\MSBuild.exe"]
msbuild_path = Path(self.executer.run(vswhere_cmd, stdout=True, dry_out="/tmp/MSBuild.exe").stdout.strip())
logger.info("MSBuild path = %s", msbuild_path)
if self.dry:
msbuild_path.parent.mkdir(parents=True, exist_ok=True)
msbuild_path.touch(exist_ok=True)
assert msbuild_path.is_file(), "MSBuild.exe does not exist"
return msbuild_path
def build(self, arch: str, platform: str, configuration: str, projects: list[Path]):
assert projects, "Need at least one project to build"
vsdev_cmd_str = f"\"{self.vsdevcmd}\" -arch={arch}"
msbuild_cmd_str = " && ".join([f"\"{self.msbuild}\" \"{project}\" /m /p:BuildInParallel=true /p:Platform={platform} /p:Configuration={configuration}" for project in projects])
bat_contents = f"{vsdev_cmd_str} && {msbuild_cmd_str}\n"
bat_path = Path(tempfile.gettempdir()) / "cmd.bat"
with bat_path.open("w") as f:
f.write(bat_contents)
logger.info("Running cmd.exe script (%s): %s", bat_path, bat_contents)
cmd = ["cmd.exe", "/D", "/E:ON", "/V:OFF", "/S", "/C", f"CALL {str(bat_path)}"]
self.executer.run(cmd)
class Releaser:
def __init__(self, project: str, commit: str, root: Path, dist_path: Path, section_printer: SectionPrinter, executer: Executer, cmake_generator: str):
self.project = project
self.version = self.extract_sdl_version(root=root, project=project)
self.root = root
self.commit = commit
self.dist_path = dist_path
self.section_printer = section_printer
self.executer = executer
self.cmake_generator = cmake_generator
self.artifacts = {}
@property
def dry(self):
return self.executer.dry
def prepare(self):
logger.debug("Creating dist folder")
self.dist_path.mkdir(parents=True, exist_ok=True)
GitLsTreeResult = collections.namedtuple("GitLsTreeResult", ("path", "mode", "object_type", "object_name"))
def _git_ls_tree(self, commit) -> dict[str, GitLsTreeResult]:
logger.debug("Getting source listing from git")
dry_out = textwrap.dedent("""\
"CMakeLists.txt": {"object_name": "9e5e4bcf094bfbde94f19c3f314808031ec8f141", "mode": "100644", "type": "blob"},
""")
last_key = "zzzzzz"
dict_tree_items = "{" + self.executer.run(["git", "ls-tree", "-r", """--format="%(path)": {"object_name": "%(objectname)", "mode": "%(objectmode)", "type": "%(objecttype)"},""", commit], stdout=True, dry_out=dry_out).stdout + f'"{last_key}": null' + "}"
with open("/tmp/a.txt", "w") as f:
f.write(dict_tree_items)
f.write("\n")
dict_tree_items = json.loads(dict_tree_items)
del dict_tree_items[last_key]
tree_items = {path: self.GitLsTreeResult(path=path, mode=int(v["mode"], 8), object_type=v["type"], object_name=v["object_name"]) for path, v in dict_tree_items.items()}
assert all(item.object_type == "blob" for item in tree_items.values())
return tree_items
def _git_cat_file(self, tree_items: dict[str, GitLsTreeResult]) -> dict[str, bytes]:
logger.debug("Getting source binary data from git")
if self.dry:
return {
"CMakeLists.txt": b"cmake_minimum_required(VERSION 3.20)\nproject(SDL)\n",
}
git_cat = subprocess.Popen(["git", "cat-file", "--batch"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=False, bufsize=50 * 1024 * 1024)
data_tree = {}
batch_size = 60
for batch in itertools_batched(tree_items.items(), batch_size):
for object_path, tree_item in batch:
logger.debug("Requesting data of file '%s' (object=%s)...", object_path, tree_item.object_name)
git_cat.stdin.write(f"{tree_item.object_name}\n".encode())
git_cat.stdin.flush()
for object_path, tree_item in batch:
header = git_cat.stdout.readline().decode()
object_name, object_type, obj_size = header.strip().split(maxsplit=3)
assert tree_item.object_name == object_name
assert tree_item.object_type == object_type
obj_size = int(obj_size)
data_tree[object_path] = git_cat.stdout.read(obj_size)
logger.debug("File data received '%s'", object_path)
assert git_cat.stdout.readline() == b"\n"
assert len(data_tree) == len(tree_items)
logger.debug("No more file!")
git_cat.stdin.close()
git_cat.wait()
assert git_cat.returncode == 0
logger.debug("All data received!")
return data_tree
def _get_file_times(self, tree_items: dict[str, GitLsTreeResult]) -> dict[str, datetime.datetime]:
dry_out = textwrap.dedent("""\
time=2024-03-14T15:40:25-07:00
M\tCMakeLists.txt
""")
git_log_out = self.executer.run(["git", "log", "--name-status", '--pretty=time=%cI'], stdout=True, dry_out=dry_out).stdout.splitlines(keepends=False)
current_time = None
tree_paths = {item.path for item in tree_items.values()}
path_times = {}
for line in git_log_out:
if not line:
continue
if line.startswith("time="):
current_time = datetime.datetime.fromisoformat(line.removeprefix("time="))
continue
mod_type, paths = line.split(maxsplit=1)
assert current_time is not None
for path in paths.split():
if path in tree_paths and path not in path_times:
path_times[path] = current_time
assert set(path_times.keys()) == tree_paths
return path_times
@staticmethod
def _path_filter(path: str):
if path.startswith(".git"):
return False
return True
TreeItem = collections.namedtuple("TreeItem", ("path", "mode", "data", "time"))
def _get_git_contents(self) -> dict[str, (TreeItem, bytes, datetime.datetime)]:
commit_file_tree = self._git_ls_tree(self.commit)
git_datas = self._git_cat_file(commit_file_tree)
git_times = self._get_file_times(commit_file_tree)
git_contents = {path: self.TreeItem(path=path, data=git_datas[path], mode=item.mode, time=git_times[path]) for path, item in commit_file_tree.items() if self._path_filter(path)}
return git_contents
def create_source_archives(self):
archive_base = f"{self.project}-{self.version}"
git_contents = self._get_git_contents()
git_files = list(git_contents.values())
assert len(git_contents) == len(git_files)
latest_mod_time = max(item.time for item in git_files)
git_files.append(self.TreeItem(path="VERSION.txt", data=f"{self.version}\n".encode(), mode=0o100644, time=latest_mod_time))
git_files.append(self.TreeItem(path=GIT_HASH_FILENAME, data=f"{self.commit}\n".encode(), mode=0o100644, time=latest_mod_time))
git_files.sort(key=lambda v: v.time)
zip_path = self.dist_path / f"{archive_base}.zip"
logger.info("Creating .zip source archive (%s)...", zip_path)
if self.dry:
zip_path.touch()
else:
with zipfile.ZipFile(zip_path, "w", compression=zipfile.ZIP_DEFLATED) as zip_object:
for git_file in git_files:
file_data_time = (git_file.time.year, git_file.time.month, git_file.time.day, git_file.time.hour, git_file.time.minute, git_file.time.second)
zip_info = zipfile.ZipInfo(filename=f"{archive_base}/{git_file.path}", date_time=file_data_time)
zip_info.external_attr = git_file.mode << 16
zip_info.compress_type = zipfile.ZIP_DEFLATED
zip_object.writestr(zip_info, data=git_file.data)
self.artifacts["src-zip"] = zip_path
tar_types = (
(".tar.gz", "gz"),
(".tar.xz", "xz"),
)
for ext, comp in tar_types:
tar_path = self.dist_path / f"{archive_base}{ext}"
logger.info("Creating %s source archive (%s)...", ext, tar_path)
if self.dry:
tar_path.touch()
else:
with tarfile.open(tar_path, f"w:{comp}") as tar_object:
for git_file in git_files:
tar_info = tarfile.TarInfo(f"{archive_base}/{git_file.path}")
tar_info.mode = git_file.mode
tar_info.size = len(git_file.data)
tar_info.mtime = git_file.time.timestamp()
tar_object.addfile(tar_info, fileobj=io.BytesIO(git_file.data))
if tar_path.suffix == ".gz":
# Zero the embedded timestamp in the gzip'ed tarball
with open(tar_path, "r+b") as f:
f.seek(4, 0)
f.write(b"\x00\x00\x00\x00")
self.artifacts[f"src-tar-{comp}"] = tar_path
def create_xcframework(self, configuration: str="Release"):
dmg_in = self.root / f"Xcode/SDL/build/SDL3.dmg"
dmg_in.unlink(missing_ok=True)
self.executer.run(["xcodebuild", "-project", self.root / "Xcode/SDL/SDL.xcodeproj", "-target", "SDL3.dmg", "-configuration", configuration])
if self.dry:
dmg_in.parent.mkdir(parents=True, exist_ok=True)
dmg_in.touch()
assert dmg_in.is_file(), "SDL3.dmg was not created by xcodebuild"
dmg_out = self.dist_path / f"{self.project}-{self.version}.dmg"
shutil.copy(dmg_in, dmg_out)
self.artifacts["dmg"] = dmg_out
@property
def git_hash_data(self):
return f"{self.commit}\n".encode()
def _tar_add_git_hash(self, tar_object: tarfile.TarFile, root: typing.Optional[str]=None, time: typing.Optional[datetime.datetime]=None):
if not time:
time = datetime.datetime(year=2024, month=4, day=1)
path = GIT_HASH_FILENAME
if root:
path = f"{root}/{path}"
tar_info = tarfile.TarInfo(path)
tar_info.mode = 0o100644
tar_info.size = len(self.git_hash_data)
tar_info.mtime = time.timestamp()
tar_object.addfile(tar_info, fileobj=io.BytesIO(self.git_hash_data))
def _zip_add_git_hash(self, zip_file: zipfile.ZipFile, root: typing.Optional[str]=None, time: typing.Optional[datetime.datetime]=None):
if not time:
time = datetime.datetime(year=2024, month=4, day=1)
path = GIT_HASH_FILENAME
if root:
path = f"{root}/{path}"
file_data_time = (time.year, time.month, time.day, time.hour, time.minute, time.second)
zip_info = zipfile.ZipInfo(filename=path, date_time=file_data_time)
zip_info.external_attr = 0o100644 << 16
zip_info.compress_type = zipfile.ZIP_DEFLATED
zip_file.writestr(zip_info, data=self.git_hash_data)
def create_mingw_archives(self):
build_type = "Release"
mingw_archs = ("i686", "x86_64")
build_parent_dir = self.root / "build-mingw"
zip_path = self.dist_path / f"{self.project}-devel-{self.version}-mingw.zip"
tar_exts = ("gz", "xz")
tar_paths = { ext: self.dist_path / f"{self.project}-devel-{self.version}-mingw.tar.{ext}" for ext in tar_exts}
arch_install_paths = {}
arch_files = {}
for arch in mingw_archs:
build_path = build_parent_dir / f"build-{arch}"
install_path = build_parent_dir / f"install-{arch}"
arch_install_paths[arch] = install_path
shutil.rmtree(install_path, ignore_errors=True)
build_path.mkdir(parents=True, exist_ok=True)
with self.section_printer.group(f"Configuring MinGW {arch}"):
self.executer.run([
"cmake", "-S", str(self.root), "-B", str(build_path),
"--fresh",
"-DSDL_SHARED=ON",
"-DSDL_STATIC=ON",
"-DSDL_DISABLE_INSTALL_DOCS=ON",
"-DSDL_TEST_LIBRARY=ON",
"-DSDL_TESTS=OFF",
"-DCMAKE_INSTALL_BINDIR=bin",
"-DCMAKE_INSTALL_DATAROOTDIR=share",
"-DCMAKE_INSTALL_INCLUDEDIR=include",
"-DCMAKE_INSTALL_LIBDIR=lib",
f"-DCMAKE_BUILD_TYPE={build_type}",
f"-DCMAKE_TOOLCHAIN_FILE={self.root}/build-scripts/cmake-toolchain-mingw64-{arch}.cmake",
f"-G{self.cmake_generator}",
f"-DCMAKE_INSTALL_PREFIX={install_path}",
])
with self.section_printer.group(f"Build MinGW {arch}"):
self.executer.run(["cmake", "--build", str(build_path), "--verbose", "--config", build_type])
with self.section_printer.group(f"Install MinGW {arch}"):
self.executer.run(["cmake", "--install", str(build_path), "--strip", "--config", build_type])
arch_files[arch] = list(Path(r) / f for r, _, files in os.walk(install_path) for f in files)
extra_files = [
("mingw/pkg-support/INSTALL.txt", ""),
("mingw/pkg-support/Makefile", ""),
("mingw/pkg-support/cmake/sdl3-config.cmake", "cmake/"),
("mingw/pkg-support/cmake/sdl3-config-version.cmake", "cmake/"),
("BUGS.txt", ""),
("CREDITS.md", ""),
("README-SDL.txt", ""),
("WhatsNew.txt", ""),
("LICENSE.txt", ""),
("README.md", ""),
]
test_files = list(Path(r) / f for r, _, files in os.walk(self.root / "test") for f in files)
# FIXME: split SDL3.dll debug information into debug library
# objcopy --only-keep-debug SDL3.dll SDL3.debug.dll
# objcopy --add-gnu-debuglink=SDL3.debug.dll SDL3.dll
# objcopy --strip-debug SDL3.dll
for comp in tar_exts:
logger.info("Creating %s...", tar_paths[comp])
with tarfile.open(tar_paths[comp], f"w:{comp}") as tar_object:
arc_root = f"{self.project}-{self.version}"
for file_path, arcdirname in extra_files:
assert not arcdirname or arcdirname[-1] == "/"
arcname = f"{arc_root}/{arcdirname}{Path(file_path).name}"
tar_object.add(self.root / file_path, arcname=arcname)
for arch in mingw_archs:
install_path = arch_install_paths[arch]
arcname_parent = f"{arc_root}/{arch}-w64-mingw32"
for file in arch_files[arch]:
arcname = os.path.join(arcname_parent, file.relative_to(install_path))
tar_object.add(file, arcname=arcname)
for test_file in test_files:
arcname = f"{arc_root}/test/{test_file.relative_to(self.root/'test')}"
tar_object.add(test_file, arcname=arcname)
self._tar_add_git_hash(tar_object=tar_object, root=arc_root)
self.artifacts[f"mingw-devel-tar-{comp}"] = tar_paths[comp]
def build_vs(self, arch: str, platform: str, vs: VisualStudio, configuration: str="Release"):
dll_path = self.root / f"VisualC/SDL/{platform}/{configuration}/{self.project}.dll"
imp_path = self.root / f"VisualC/SDL/{platform}/{configuration}/{self.project}.lib"
test_path = self.root / f"VisualC/SDL_test/{platform}/{configuration}/{self.project}_test.lib"
dll_path.unlink(missing_ok=True)
imp_path.unlink(missing_ok=True)
test_path.unlink(missing_ok=True)
projects = [
self.root / "VisualC/SDL/SDL.vcxproj",
self.root / "VisualC/SDL_test/SDL_test.vcxproj",
]
vs.build(arch=arch, platform=platform, configuration=configuration, projects=projects)
if self.dry:
dll_path.parent.mkdir(parents=True, exist_ok=True)
dll_path.touch()
imp_path.touch()
test_path.parent.mkdir(parents=True, exist_ok=True)
test_path.touch()
assert dll_path.is_file(), "SDL3.dll has not been created"
assert imp_path.is_file(), "SDL3.lib has not been created"
assert test_path.is_file(), "SDL3_test.lib has not been created"
zip_path = self.dist_path / f"{self.project}-{self.version}-win32-{arch}.zip"
zip_path.unlink(missing_ok=True)
logger.info("Creating %s", zip_path)
with zipfile.ZipFile(zip_path, mode="w", compression=zipfile.ZIP_DEFLATED) as zf:
logger.debug("Adding %s", dll_path.name)
zf.write(dll_path, arcname=dll_path.name)
logger.debug("Adding %s", "README-SDL.txt")
zf.write(self.root / "README-SDL.txt", arcname="README-SDL.txt")
self._zip_add_git_hash(zip_file=zf)
self.artifacts[f"VC-{arch}"] = zip_path
return VcArchDevel(dll=dll_path, imp=imp_path, test=test_path)
def build_vs_devel(self, arch_vc: dict[str, VcArchDevel]):
zip_path = self.dist_path / f"{self.project}-devel-{self.version}-VC.zip"
archive_prefix = f"{self.project}-{self.version}"
def zip_file(zf: zipfile.ZipFile, path: Path, arcrelpath: str):
arcname = f"{archive_prefix}/{arcrelpath}"
logger.debug("Adding %s to %s", path, arcname)
zf.write(path, arcname=arcname)
def zip_directory(zf: zipfile.ZipFile, directory: Path, arcrelpath: str):
for f in directory.iterdir():
if f.is_file():
arcname = f"{archive_prefix}/{arcrelpath}/{f.name}"
logger.debug("Adding %s to %s", f, arcname)
zf.write(f, arcname=arcname)
with zipfile.ZipFile(zip_path, mode="w", compression=zipfile.ZIP_DEFLATED) as zf:
for arch, binaries in arch_vc.items():
zip_file(zf, path=binaries.dll, arcrelpath=f"lib/{arch}/{binaries.dll.name}")
zip_file(zf, path=binaries.imp, arcrelpath=f"lib/{arch}/{binaries.imp.name}")
zip_file(zf, path=binaries.test, arcrelpath=f"lib/{arch}/{binaries.test.name}")
zip_directory(zf, directory=self.root / "include/SDL3", arcrelpath="include/SDL3")
zip_directory(zf, directory=self.root / "docs", arcrelpath="docs")
zip_directory(zf, directory=self.root / "VisualC/pkg-support/cmake", arcrelpath="cmake")
for txt in ("BUGS.txt", "README-SDL.txt", "WhatsNew.txt"):
zip_file(zf, path=self.root / txt, arcrelpath=txt)
zip_file(zf, path=self.root / "LICENSE.txt", arcrelpath="COPYING.txt")
zip_file(zf, path=self.root / "README.md", arcrelpath="README.txt")
self._zip_add_git_hash(zip_file=zf, root=archive_prefix)
self.artifacts["VC-devel"] = zip_path
@classmethod
def extract_sdl_version(cls, root: Path, project: str):
with open(root / f"include/{project}/SDL_version.h", "r") as f:
text = f.read()
major = next(re.finditer(r"^#define SDL_MAJOR_VERSION\s+([0-9]+)$", text, flags=re.M)).group(1)
minor = next(re.finditer(r"^#define SDL_MINOR_VERSION\s+([0-9]+)$", text, flags=re.M)).group(1)
patch = next(re.finditer(r"^#define SDL_PATCHLEVEL\s+([0-9]+)$", text, flags=re.M)).group(1)
return f"{major}.{minor}.{patch}"
def main(argv=None):
parser = argparse.ArgumentParser(allow_abbrev=False, description="Create SDL release artifacts")
parser.add_argument("--root", metavar="DIR", type=Path, default=Path(__file__).resolve().parents[1], help="Root of SDL")
parser.add_argument("--out", "-o", metavar="DIR", dest="dist_path", type=Path, default="dist", help="Output directory")
parser.add_argument("--github", action="store_true", help="Script is running on a GitHub runner")
parser.add_argument("--commit", default="HEAD", help="Git commit/tag of which a release should be created")
parser.add_argument("--project", required=True, help="Name of the project")
parser.add_argument("--create", choices=["source", "mingw", "win32", "xcframework"], required=True,action="append", dest="actions", help="SDL version")
parser.set_defaults(loglevel=logging.INFO)
parser.add_argument('--vs-year', dest="vs_year", help="Visual Studio year")
parser.add_argument('--cmake-generator', dest="cmake_generator", default="Ninja", help="CMake Generator")
parser.add_argument('--debug', action='store_const', const=logging.DEBUG, dest="loglevel", help="Print script debug information")
parser.add_argument('--dry-run', action='store_true', dest="dry", help="Don't execute anything")
parser.add_argument('--force', action='store_true', dest="force", help="Ignore a non-clean git tree")
args = parser.parse_args(argv)
logging.basicConfig(level=args.loglevel, format='[%(levelname)s] %(message)s')
args.actions = set(args.actions)
args.dist_path = args.dist_path.resolve()
args.root = args.root.resolve()
args.dist_path = args.dist_path.resolve()
if args.dry:
args.dist_path = args.dist_path / "dry"
if args.github:
section_printer = GitHubSectionPrinter()
else:
section_printer = SectionPrinter()
executer = Executer(root=args.root, dry=args.dry)
root_git_hash_path = args.root / GIT_HASH_FILENAME
root_is_maybe_archive = root_git_hash_path.is_file()
if root_is_maybe_archive:
logger.warning("%s detected: Building from archive", GIT_HASH_FILENAME)
archive_commit = root_git_hash_path.read_text().strip()
if args.commit != archive_commit:
logger.warn("Commit argument is %s, but archive commit is %s. Using %s.", args.commit, archive_commit, archive_commit)
args.commit = archive_commit
else:
args.commit = executer.run(["git", "rev-parse", args.commit], stdout=True, dry_out="e5812a9fd2cda317b503325a702ba3c1c37861d9").stdout.strip()
logger.info("Using commit %s", args.commit)
releaser = Releaser(
project=args.project,
commit=args.commit,
root=args.root,
dist_path=args.dist_path,
executer=executer,
section_printer=section_printer,
cmake_generator=args.cmake_generator,
)
if root_is_maybe_archive:
logger.warn("Building from archive. Skipping clean git tree check.")
else:
porcelain_status = executer.run(["git", "status", "--ignored", "--porcelain"], stdout=True, dry_out="\n").stdout.strip()
if porcelain_status:
print(porcelain_status)
logger.warning("The tree is dirty! Do not publish any generated artifacts!")
if not args.force:
raise Exception("The git repo contains modified and/or non-committed files. Run with --force to ignore.")
with section_printer.group("Arguments"):
print(f"project = {args.project}")
print(f"version = {releaser.version}")
print(f"commit = {args.commit}")
print(f"out = {args.dist_path}")
print(f"actions = {args.actions}")
print(f"dry = {args.dry}")
print(f"force = {args.force}")
print(f"cmake_generator = {args.cmake_generator}")
releaser.prepare()
if "source" in args.actions:
if root_is_maybe_archive:
raise Exception("Cannot build source archive from source archive")
with section_printer.group("Create source archives"):
releaser.create_source_archives()
if "xcframework" in args.actions:
if platform.system() != "Darwin" and not args.dry:
parser.error("xcframework artifact(s) can only be built on Darwin")
releaser.create_xcframework()
if "win32" in args.actions:
if platform.system() != "Windows" and not args.dry:
parser.error("win32 artifact(s) can only be built on Windows")
with section_printer.group("Find Visual Studio"):
vs = VisualStudio(executer=executer)
with section_printer.group("Build x86 VS binary"):
x86 = releaser.build_vs(arch="x86", platform="Win32", vs=vs)
with section_printer.group("Build x64 VS binary"):
x64 = releaser.build_vs(arch="x64", platform="x64", vs=vs)
with section_printer.group("Create SDL VC development zip"):
arch_vc = {
"x86": x86,
"x64": x64,
}
releaser.build_vs_devel(arch_vc)
if "mingw" in args.actions:
releaser.create_mingw_archives()
with section_printer.group("Summary"):
print(f"artifacts = {releaser.artifacts}")
if args.github:
if args.dry:
os.environ["GITHUB_OUTPUT"] = "/tmp/github_output.txt"
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"project={releaser.project}\n")
f.write(f"version={releaser.version}\n")
for k, v in releaser.artifacts.items():
f.write(f"{k}={v.name}\n")
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@ -42,6 +42,7 @@ words = [
'atanf',
'atof',
'atoi',
'bsearch',
'calloc',
'ceil',
'ceilf',
@ -90,6 +91,8 @@ words = [
'pow',
'powf',
'qsort',
'qsort_r',
'qsort_s',
'realloc',
'round',
'roundf',

View File

@ -3,6 +3,7 @@ set(CMAKE_SYSTEM_PROCESSOR x86)
find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc)
find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++)
find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres)
if(NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
@ -11,3 +12,7 @@ endif()
if(NOT CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
endif()
if(NOT CMAKE_RC_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
endif()

View File

@ -3,6 +3,7 @@ set(CMAKE_SYSTEM_PROCESSOR x86_64)
find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc)
find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++)
find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres)
if(NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
@ -11,3 +12,7 @@ endif()
if(NOT CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
endif()
if(NOT CMAKE_RC_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
endif()

View File

@ -0,0 +1,6 @@
#!/bin/sh
commit=$(git rev-parse HEAD)
echo "Creating release workflow for commit $commit"
gh workflow run release.yml --ref main -f commit=$commit

View File

@ -7,17 +7,22 @@ import pathlib
import re
def main():
def do_include_replacements(paths):
replacements = [
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_image.h(?:[\">])"), r"<SDL3_image/SDL_image.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_mixer.h(?:[\">])"), r"<SDL3_mixer/SDL_mixer.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_net.h(?:[\">])"), r"<SDL3_net/SDL_net.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_rtf.h(?:[\">])"), r"<SDL3_rtf/SDL_rtf.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_ttf.h(?:[\">])"), r"<SDL3_ttf/SDL_ttf.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_gamecontroller.h(?:[\">])"), r"<SDL3/SDL_gamepad.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?begin_code.h(?:[\">])"), r"<SDL3/SDL_begin_code.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?close_code.h(?:[\">])"), r"<SDL3/SDL_close_code.h>" ),
( re.compile(r"(?:[\"<])(?:SDL2/)?(SDL[_a-z0-9]*\.h)(?:[\">])"), r"<SDL3/\1>" )
]
for entry in args.args:
for entry in paths:
path = pathlib.Path(entry)
if not path.exists():
print("%s doesn't exist, skipping" % entry)
print("{} does not exist, skipping".format(entry))
continue
replace_headers_in_path(path, replacements)
@ -55,17 +60,16 @@ def replace_headers_in_path(path, replacements):
replace_headers_in_file(path, replacements)
if __name__ == "__main__":
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
parser.add_argument("args", nargs="*")
def main():
parser = argparse.ArgumentParser(fromfile_prefix_chars='@', description="Rename #include's for SDL3.")
parser.add_argument("args", metavar="PATH", nargs="*", help="Input source file")
args = parser.parse_args()
try:
main()
do_include_replacements(args.args)
except Exception as e:
print(e)
exit(-1)
exit(0)
return 1
if __name__ == "__main__":
raise SystemExit(main())

View File

@ -0,0 +1,383 @@
#!/usr/bin/env python3
#
# This script renames SDL macros in the specified paths
import argparse
import pathlib
import re
class TextReplacer:
def __init__(self, macros, repl_format):
if isinstance(macros, dict):
macros_keys = macros.keys()
else:
macros_keys = macros
self.macros = macros
self.re_macros = re.compile(r"\W(" + "|".join(macros_keys) + r")(?:\W|$)")
self.repl_format = repl_format
def apply(self, contents):
def cb(m):
macro = m.group(1)
original = m.group(0)
match_start, _ = m.span(0)
platform_start, platform_end = m.span(1)
if isinstance(self.macros, dict):
repl_args = (macro, self.macros[macro])
else:
repl_args = macro,
new_text = self.repl_format.format(*repl_args)
r = original[:(platform_start-match_start)] + new_text + original[platform_end-match_start:]
return r
contents, _ = self.re_macros.subn(cb, contents)
return contents
class MacrosCheck:
def __init__(self):
self.renamed_platform_macros = TextReplacer(RENAMED_MACROS, "{1}")
self.deprecated_platform_macros = TextReplacer(DEPRECATED_PLATFORM_MACROS, "{0} /* {0} has been removed in SDL3 */")
def run(self, contents):
contents = self.renamed_platform_macros.apply(contents)
contents = self.deprecated_platform_macros.apply(contents)
return contents
def apply_checks(paths):
checks = (
MacrosCheck(),
)
for entry in paths:
path = pathlib.Path(entry)
if not path.exists():
print("{} does not exist, skipping".format(entry))
continue
apply_checks_in_path(path, checks)
def apply_checks_in_file(file, checks):
try:
with file.open("r", encoding="UTF-8", newline="") as rfp:
original = rfp.read()
contents = original
for check in checks:
contents = check.run(contents)
if contents != original:
with file.open("w", encoding="UTF-8", newline="") as wfp:
wfp.write(contents)
except UnicodeDecodeError:
print("%s is not text, skipping" % file)
except Exception as err:
print("%s" % err)
def apply_checks_in_dir(path, checks):
for entry in path.glob("*"):
if entry.is_dir():
apply_checks_in_dir(entry, checks)
else:
print("Processing %s" % entry)
apply_checks_in_file(entry, checks)
def apply_checks_in_path(path, checks):
if path.is_dir():
apply_checks_in_dir(path, checks)
else:
apply_checks_in_file(path, checks)
def main():
parser = argparse.ArgumentParser(fromfile_prefix_chars='@', description="Rename macros for SDL3")
parser.add_argument("args", nargs="*", help="Input source files")
args = parser.parse_args()
try:
apply_checks(args.args)
except Exception as e:
print(e)
return 1
RENAMED_MACROS = {
"__AIX__": "SDL_PLATFORM_AIX",
"__HAIKU__": "SDL_PLATFORM_HAIKU",
"__BSDI__": "SDL_PLATFORM_BSDI",
"__FREEBSD__": "SDL_PLATFORM_FREEBSD",
"__HPUX__": "SDL_PLATFORM_HPUX",
"__IRIX__": "SDL_PLATFORM_IRIX",
"__LINUX__": "SDL_PLATFORM_LINUX",
"__OS2__": "SDL_PLATFORM_OS2",
# "__ANDROID__": "SDL_PLATFORM_ANDROID,
"__NGAGE__": "SDL_PLATFORM_NGAGE",
"__APPLE__": "SDL_PLATFORM_APPLE",
"__TVOS__": "SDL_PLATFORM_TVOS",
"__IPHONEOS__": "SDL_PLATFORM_IOS",
"__MACOSX__": "SDL_PLATFORM_MACOS",
"__NETBSD__": "SDL_PLATFORM_NETBSD",
"__OPENBSD__": "SDL_PLATFORM_OPENBSD",
"__OSF__": "SDL_PLATFORM_OSF",
"__QNXNTO__": "SDL_PLATFORM_QNXNTO",
"__RISCOS__": "SDL_PLATFORM_RISCOS",
"__SOLARIS__": "SDL_PLATFORM_SOLARIS",
"__PSP__": "SDL_PLATFORM_PSP",
"__PS2__": "SDL_PLATFORM_PS2",
"__VITA__": "SDL_PLATFORM_VITA",
"__3DS__": "SDL_PLATFORM_3DS",
# "__unix__": "SDL_PLATFORM_UNIX,
"__WINRT__": "SDL_PLATFORM_WINRT",
"__XBOXSERIES__": "SDL_PLATFORM_XBOXSERIES",
"__XBOXONE__": "SDL_PLATFORM_XBOXONE",
"__WINDOWS__": "SDL_PLATFORM_WINDOWS",
"__WIN32__": "SDL_PLATFORM_WIN32",
# "__CYGWIN_": "SDL_PLATFORM_CYGWIN",
"__WINGDK__": "SDL_PLATFORM_WINGDK",
"__GDK__": "SDL_PLATFORM_GDK",
# "__EMSCRIPTEN__": "SDL_PLATFORM_EMSCRIPTEN",
}
DEPRECATED_PLATFORM_MACROS = {
"__DREAMCAST__",
"__NACL__",
"__PNACL__",
"__WINDOWS__",
"SDL_ALTIVEC_BLITTERS",
"SDL_ARM_NEON_BLITTERS",
"SDL_ARM_SIMD_BLITTERS",
"SDL_ATOMIC_DISABLED",
"SDL_AUDIO_DISABLED",
"SDL_AUDIO_DRIVER_AAUDIO",
"SDL_AUDIO_DRIVER_ALSA",
"SDL_AUDIO_DRIVER_ALSA_DYNAMIC",
"SDL_AUDIO_DRIVER_ANDROID",
"SDL_AUDIO_DRIVER_ARTS",
"SDL_AUDIO_DRIVER_ARTS_DYNAMIC",
"SDL_AUDIO_DRIVER_COREAUDIO",
"SDL_AUDIO_DRIVER_DISK",
"SDL_AUDIO_DRIVER_DSOUND",
"SDL_AUDIO_DRIVER_DUMMY",
"SDL_AUDIO_DRIVER_EMSCRIPTEN",
"SDL_AUDIO_DRIVER_ESD",
"SDL_AUDIO_DRIVER_ESD_DYNAMIC",
"SDL_AUDIO_DRIVER_FUSIONSOUND",
"SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC",
"SDL_AUDIO_DRIVER_HAIKU",
"SDL_AUDIO_DRIVER_JACK",
"SDL_AUDIO_DRIVER_JACK_DYNAMIC",
"SDL_AUDIO_DRIVER_N3DS",
"SDL_AUDIO_DRIVER_NAS",
"SDL_AUDIO_DRIVER_NAS_DYNAMIC",
"SDL_AUDIO_DRIVER_NETBSD",
"SDL_AUDIO_DRIVER_OPENSLES",
"SDL_AUDIO_DRIVER_OS2",
"SDL_AUDIO_DRIVER_OSS",
"SDL_AUDIO_DRIVER_PAUDIO",
"SDL_AUDIO_DRIVER_PIPEWIRE",
"SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC",
"SDL_AUDIO_DRIVER_PS2",
"SDL_AUDIO_DRIVER_PSP",
"SDL_AUDIO_DRIVER_PULSEAUDIO",
"SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC",
"SDL_AUDIO_DRIVER_QSA",
"SDL_AUDIO_DRIVER_SNDIO",
"SDL_AUDIO_DRIVER_SNDIO_DYNAMIC",
"SDL_AUDIO_DRIVER_SUNAUDIO",
"SDL_AUDIO_DRIVER_VITA",
"SDL_AUDIO_DRIVER_WASAPI",
"SDL_AUDIO_DRIVER_WINMM",
"SDL_CPUINFO_DISABLED",
"SDL_DEFAULT_ASSERT_LEVEL",
"SDL_EVENTS_DISABLED",
"SDL_FILESYSTEM_ANDROID",
"SDL_FILESYSTEM_COCOA",
"SDL_FILESYSTEM_DISABLED",
"SDL_FILESYSTEM_DUMMY",
"SDL_FILESYSTEM_EMSCRIPTEN",
"SDL_FILESYSTEM_HAIKU",
"SDL_FILESYSTEM_N3DS",
"SDL_FILESYSTEM_OS2",
"SDL_FILESYSTEM_PS2",
"SDL_FILESYSTEM_PSP",
"SDL_FILESYSTEM_RISCOS",
"SDL_FILESYSTEM_UNIX",
"SDL_FILESYSTEM_VITA",
"SDL_FILESYSTEM_WINDOWS",
"SDL_FILE_DISABLED",
"SDL_HAPTIC_ANDROID",
"SDL_HAPTIC_DINPUT",
"SDL_HAPTIC_DISABLED",
"SDL_HAPTIC_DUMMY",
"SDL_HAPTIC_IOKIT",
"SDL_HAPTIC_LINUX",
"SDL_HAPTIC_XINPUT",
"SDL_HAVE_LIBDECOR_GET_MIN_MAX",
"SDL_HAVE_MACHINE_JOYSTICK_H",
"SDL_HIDAPI_DISABLED",
"SDL_INPUT_FBSDKBIO",
"SDL_INPUT_LINUXEV",
"SDL_INPUT_LINUXKD",
"SDL_INPUT_WSCONS",
"SDL_IPHONE_KEYBOARD",
"SDL_IPHONE_LAUNCHSCREEN",
"SDL_JOYSTICK_ANDROID",
"SDL_JOYSTICK_DINPUT",
"SDL_JOYSTICK_DISABLED",
"SDL_JOYSTICK_DUMMY",
"SDL_JOYSTICK_EMSCRIPTEN",
"SDL_JOYSTICK_HAIKU",
"SDL_JOYSTICK_HIDAPI",
"SDL_JOYSTICK_IOKIT",
"SDL_JOYSTICK_LINUX",
"SDL_JOYSTICK_MFI",
"SDL_JOYSTICK_N3DS",
"SDL_JOYSTICK_OS2",
"SDL_JOYSTICK_PS2",
"SDL_JOYSTICK_PSP",
"SDL_JOYSTICK_RAWINPUT",
"SDL_JOYSTICK_USBHID",
"SDL_JOYSTICK_VIRTUAL",
"SDL_JOYSTICK_VITA",
"SDL_JOYSTICK_WGI",
"SDL_JOYSTICK_XINPUT",
"SDL_LIBSAMPLERATE_DYNAMIC",
"SDL_LIBUSB_DYNAMIC",
"SDL_LOADSO_DISABLED",
"SDL_LOADSO_DLOPEN",
"SDL_LOADSO_DUMMY",
"SDL_LOADSO_LDG",
"SDL_LOADSO_OS2",
"SDL_LOADSO_WINDOWS",
"SDL_LOCALE_DISABLED",
"SDL_LOCALE_DUMMY",
"SDL_MISC_DISABLED",
"SDL_MISC_DUMMY",
"SDL_POWER_ANDROID",
"SDL_POWER_DISABLED",
"SDL_POWER_EMSCRIPTEN",
"SDL_POWER_HAIKU",
"SDL_POWER_HARDWIRED",
"SDL_POWER_LINUX",
"SDL_POWER_MACOSX",
"SDL_POWER_N3DS",
"SDL_POWER_PSP",
"SDL_POWER_UIKIT",
"SDL_POWER_VITA",
"SDL_POWER_WINDOWS",
"SDL_POWER_WINRT",
"SDL_RENDER_DISABLED",
"SDL_SENSOR_ANDROID",
"SDL_SENSOR_COREMOTION",
"SDL_SENSOR_DISABLED",
"SDL_SENSOR_DUMMY",
"SDL_SENSOR_N3DS",
"SDL_SENSOR_VITA",
"SDL_SENSOR_WINDOWS",
"SDL_THREADS_DISABLED",
"SDL_THREAD_GENERIC_COND_SUFFIX",
"SDL_THREAD_N3DS",
"SDL_THREAD_OS2",
"SDL_THREAD_PS2",
"SDL_THREAD_PSP",
"SDL_THREAD_PTHREAD",
"SDL_THREAD_PTHREAD_RECURSIVE_MUTEX",
"SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP",
"SDL_THREAD_VITA",
"SDL_THREAD_WINDOWS",
"SDL_TIMERS_DISABLED",
"SDL_TIMER_DUMMY",
"SDL_TIMER_HAIKU",
"SDL_TIMER_N3DS",
"SDL_TIMER_OS2",
"SDL_TIMER_PS2",
"SDL_TIMER_PSP",
"SDL_TIMER_UNIX",
"SDL_TIMER_VITA",
"SDL_TIMER_WINDOWS",
"SDL_UDEV_DYNAMIC",
"SDL_USE_IME",
"SDL_USE_LIBICONV",
"SDL_VIDEO_DISABLED",
"SDL_VIDEO_DRIVER_ANDROID",
"SDL_VIDEO_DRIVER_COCOA",
"SDL_VIDEO_DRIVER_DIRECTFB",
"SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC",
"SDL_VIDEO_DRIVER_DUMMY",
"SDL_VIDEO_DRIVER_EMSCRIPTEN",
"SDL_VIDEO_DRIVER_HAIKU",
"SDL_VIDEO_DRIVER_KMSDRM",
"SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC",
"SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM",
"SDL_VIDEO_DRIVER_N3DS",
"SDL_VIDEO_DRIVER_OFFSCREEN",
"SDL_VIDEO_DRIVER_OS2",
"SDL_VIDEO_DRIVER_PS2",
"SDL_VIDEO_DRIVER_PSP",
"SDL_VIDEO_DRIVER_QNX",
"SDL_VIDEO_DRIVER_RISCOS",
"SDL_VIDEO_DRIVER_RPI",
"SDL_VIDEO_DRIVER_UIKIT",
"SDL_VIDEO_DRIVER_VITA",
"SDL_VIDEO_DRIVER_VIVANTE",
"SDL_VIDEO_DRIVER_VIVANTE_VDK",
"SDL_VIDEO_DRIVER_WAYLAND",
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC",
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR",
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL",
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR",
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON",
"SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH",
"SDL_VIDEO_DRIVER_WINDOWS",
"SDL_VIDEO_DRIVER_WINRT",
"SDL_VIDEO_DRIVER_X11",
"SDL_VIDEO_DRIVER_X11_DYNAMIC",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR",
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS",
"SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM",
"SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS",
"SDL_VIDEO_DRIVER_X11_XCURSOR",
"SDL_VIDEO_DRIVER_X11_XDBE",
"SDL_VIDEO_DRIVER_X11_XFIXES",
"SDL_VIDEO_DRIVER_X11_XINPUT2",
"SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH",
"SDL_VIDEO_DRIVER_X11_XRANDR",
"SDL_VIDEO_DRIVER_X11_XSCRNSAVER",
"SDL_VIDEO_DRIVER_X11_XSHAPE",
"SDL_VIDEO_METAL",
"SDL_VIDEO_OPENGL",
"SDL_VIDEO_OPENGL_BGL",
"SDL_VIDEO_OPENGL_CGL",
"SDL_VIDEO_OPENGL_EGL",
"SDL_VIDEO_OPENGL_ES",
"SDL_VIDEO_OPENGL_ES2",
"SDL_VIDEO_OPENGL_GLX",
"SDL_VIDEO_OPENGL_OSMESA",
"SDL_VIDEO_OPENGL_OSMESA_DYNAMIC",
"SDL_VIDEO_OPENGL_WGL",
"SDL_VIDEO_RENDER_D3D",
"SDL_VIDEO_RENDER_D3D11",
"SDL_VIDEO_RENDER_D3D12",
"SDL_VIDEO_RENDER_DIRECTFB",
"SDL_VIDEO_RENDER_METAL",
"SDL_VIDEO_RENDER_OGL",
"SDL_VIDEO_RENDER_OGL_ES",
"SDL_VIDEO_RENDER_OGL_ES2",
"SDL_VIDEO_RENDER_PS2",
"SDL_VIDEO_RENDER_PSP",
"SDL_VIDEO_RENDER_VITA_GXM",
"SDL_VIDEO_VITA_PIB",
"SDL_VIDEO_VITA_PVR",
"SDL_VIDEO_VITA_PVR_OGL",
"SDL_VIDEO_VULKAN",
}
if __name__ == "__main__":
raise SystemExit(main())

View File

@ -25,7 +25,7 @@ not_ok () {
failed=1
}
version=$(sed -Ene 's/^project\(SDL[0-9]+ LANGUAGES C CXX VERSION "([0-9.]*)"\)$/\1/p' CMakeLists.txt)
version=$(sed -Ene 's/^project\(SDL[0-9]+ LANGUAGES C VERSION "([0-9.]*)"\)$/\1/p' CMakeLists.txt)
if [ "$ref_version" = "$version" ]; then
ok "CMakeLists.txt $version"

73
external/sdl/SDL/cmake/FindLibUSB.cmake vendored Normal file
View File

@ -0,0 +1,73 @@
include(FindPackageHandleStandardArgs)
set(LibUSB_PKG_CONFIG_SPEC libusb-1.0>=1.0.16)
set(LibUSB_MIN_API_VERSION 0x01000102)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LibUSB ${LibUSB_PKG_CONFIG_SPEC})
endif()
find_library(LibUSB_LIBRARY
NAMES usb-1.0 libusb-1.0
HINTS ${PC_LibUSB_LIBRARY_DIRS}
)
find_path(LibUSB_INCLUDE_PATH
NAMES libusb.h
PATH_SUFFIXES libusb-1.0
HINTS ${PC_LibUSB_INCLUDE_DIRS}
)
set(LibUSB_API_VERSION "LibUSB_API_VERSION-NOTFOUND")
if(LibUSB_INCLUDE_PATH AND EXISTS "${LibUSB_INCLUDE_PATH}/libusb.h")
file(READ "${LibUSB_INCLUDE_PATH}/libusb.h" LIBUSB_H_TEXT)
if("${LIBUSB_H_TEXT}" MATCHES "#define[ \t]+LIBUSBX?_API_VERSION[ \t]+(0x[0-9a-fA-F]+)" )
set(LibUSB_API_VERSION "${CMAKE_MATCH_1}")
endif()
endif()
if(LibUSB_API_VERSION)
math(EXPR LibUSB_MIN_API_VERSION_decimal "${LibUSB_MIN_API_VERSION}")
math(EXPR LibUSB_API_VERSION_decimal "${LibUSB_API_VERSION}")
if(NOT LibUSB_MIN_API_VERSION_decimal LESS_EQUAL LibUSB_API_VERSION_decimal)
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
endif()
else()
set(LibUSB_LIBRARY "LibUSB_LIBRARY-NOTFOUND")
endif()
set(LibUSB_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of LibUSB")
set(LibUSB_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of LibUSB")
set(LibUSB_LINK_FLAGS "" CACHE STRING "Extra link flags of LibUSB")
if(LibUSB_LIBRARY AND LibUSB_INCLUDE_PATH)
if(PC_LibUSB_FOUND)
set(LibUSB_VERSION "${PC_LibUSB_VERSION}")
else()
set(LibUSB_VERSION "1.0.16-or-higher")
endif()
else()
set(LibUSB_VERSION "LibUSB_VERSION-NOTFOUND")
endif()
find_package_handle_standard_args(LibUSB
VERSION_VAR LibUSB_VERSION
REQUIRED_VARS LibUSB_LIBRARY LibUSB_INCLUDE_PATH
)
if(LibUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
add_library(LibUSB::LibUSB IMPORTED UNKNOWN)
set_target_properties(LibUSB::LibUSB
PROPERTIES
IMPORTED_LOCATION "${LibUSB_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LibUSB_INCLUDE_PATH}"
INTERFACE_COMPILE_OPTIONS "${LibUSB_COMPILE_OPTIONS}"
INTERFACE_LINK_LIBRARIES "${LibUSB_LINK_LIBRARIES}"
INTERFACE_LINK_OPTIONS "${LibUSB_LINK_OPTIONS}"
)
endif()

View File

@ -100,6 +100,199 @@ function(SDL_detect_linker)
endif()
endfunction()
function(read_absolute_symlink DEST PATH)
file(READ_SYMLINK "${PATH}" p)
if(NOT IS_ABSOLUTE "${p}")
get_filename_component(pdir "${PATH}" DIRECTORY)
set(p "${pdir}/${p}")
endif()
get_filename_component(p "${p}" ABSOLUTE)
set("${DEST}" "${p}" PARENT_SCOPE)
endfunction()
function(win32_implib_identify_dll DEST IMPLIB)
cmake_parse_arguments(ARGS "NOTFATAL" "" "" ${ARGN})
if(CMAKE_DLLTOOL)
execute_process(
COMMAND "${CMAKE_DLLTOOL}" --identify "${IMPLIB}"
RESULT_VARIABLE retcode
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr)
if(NOT retcode EQUAL 0)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "${CMAKE_DLLTOOL} failed.")
else()
set("${DEST}" "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
string(STRIP "${stdout}" result)
set(${DEST} "${result}" PARENT_SCOPE)
elseif(MSVC)
get_filename_component(CMAKE_C_COMPILER_DIRECTORY "${CMAKE_C_COMPILER}" DIRECTORY CACHE)
find_program(CMAKE_DUMPBIN NAMES dumpbin PATHS "${CMAKE_C_COMPILER_DIRECTORY}")
if(CMAKE_DUMPBIN)
execute_process(
COMMAND "${CMAKE_DUMPBIN}" "-headers" "${IMPLIB}"
RESULT_VARIABLE retcode
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr)
if(NOT retcode EQUAL 0)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "dumpbin failed.")
else()
set(${DEST} "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
string(REGEX MATCH "DLL name[ ]+:[ ]+([^\n]+)\n" match "${stdout}")
if(NOT match)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "dumpbin did not find any associated dll for ${IMPLIB}.")
else()
set(${DEST} "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
set(result "${CMAKE_MATCH_1}")
set(${DEST} "${result}" PARENT_SCOPE)
else()
message(FATAL_ERROR "Cannot find dumpbin, please set CMAKE_DUMPBIN cmake variable")
endif()
else()
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "Don't know how to identify dll from import library. Set CMAKE_DLLTOOL (for mingw) or CMAKE_DUMPBIN (for MSVC)")
else()
set(${DEST} "${DEST}-NOTFOUND")
endif()
endif()
endfunction()
function(get_actual_target)
set(dst "${ARGV0}")
set(target "${${dst}}")
set(input "${target}")
get_target_property(alias "${target}" ALIASED_TARGET)
while(alias)
set(target "${alias}")
get_target_property(alias "${target}" ALIASED_TARGET)
endwhile()
message(DEBUG "get_actual_target(\"${input}\") -> \"${target}\"")
set("${dst}" "${target}" PARENT_SCOPE)
endfunction()
function(target_get_dynamic_library DEST TARGET)
set(result)
get_actual_target(TARGET)
if(WIN32)
# Use the target dll of the import library
set(props_to_check IMPORTED_IMPLIB)
if(CMAKE_BUILD_TYPE)
list(APPEND props_to_check IMPORTED_IMPLIB_${CMAKE_BUILD_TYPE})
endif()
list(APPEND props_to_check IMPORTED_LOCATION)
if(CMAKE_BUILD_TYPE)
list(APPEND props_to_check IMPORTED_LOCATION_${CMAKE_BUILD_TYPE})
endif()
foreach (config_type ${CMAKE_CONFIGURATION_TYPES} RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
list(APPEND props_to_check IMPORTED_IMPLIB_${config_type})
list(APPEND props_to_check IMPORTED_LOCATION_${config_type})
endforeach()
foreach(prop_to_check ${props_to_check})
if(NOT result)
get_target_property(propvalue "${TARGET}" ${prop_to_check})
if(propvalue AND EXISTS "${propvalue}")
win32_implib_identify_dll(result "${propvalue}" NOTFATAL)
endif()
endif()
endforeach()
else()
# 1. find the target library a file might be symbolic linking to
# 2. find all other files in the same folder that symolic link to it
# 3. sort all these files, and select the 1st item on Linux, and last on Macos
set(location_properties IMPORTED_LOCATION)
if(CMAKE_BUILD_TYPE)
list(APPEND location_properties IMPORTED_LOCATION_${CMAKE_BUILD_TYPE})
endif()
foreach (config_type ${CMAKE_CONFIGURATION_TYPES} RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
list(APPEND location_properties IMPORTED_LOCATION_${config_type})
endforeach()
if(APPLE)
set(valid_shared_library_regex "\\.[0-9]+\\.dylib$")
else()
set(valid_shared_library_regex "\\.so\\.([0-9.]+)?[0-9]")
endif()
foreach(location_property ${location_properties})
if(NOT result)
get_target_property(library_path "${TARGET}" ${location_property})
message(DEBUG "get_target_property(${TARGET} ${location_propert}) -> ${library_path}")
if(EXISTS "${library_path}")
get_filename_component(library_path "${library_path}" ABSOLUTE)
while (IS_SYMLINK "${library_path}")
read_absolute_symlink(library_path "${library_path}")
endwhile()
message(DEBUG "${TARGET} -> ${library_path}")
get_filename_component(libdir "${library_path}" DIRECTORY)
file(GLOB subfiles "${libdir}/*")
set(similar_files "${library_path}")
foreach(subfile ${subfiles})
if(IS_SYMLINK "${subfile}")
read_absolute_symlink(subfile_target "${subfile}")
while(IS_SYMLINK "${subfile_target}")
read_absolute_symlink(subfile_target "${subfile_target}")
endwhile()
get_filename_component(subfile_target "${subfile_target}" ABSOLUTE)
if(subfile_target STREQUAL library_path AND subfile MATCHES "${valid_shared_library_regex}")
list(APPEND similar_files "${subfile}")
endif()
endif()
endforeach()
list(SORT similar_files)
message(DEBUG "files that are similar to \"${library_path}\"=${similar_files}")
if(APPLE)
list(REVERSE similar_files)
endif()
list(GET similar_files 0 item)
get_filename_component(result "${item}" NAME)
endif()
endif()
endforeach()
endif()
if(result)
string(TOLOWER "${result}" result_lower)
if(WIN32 OR OS2)
if(NOT result_lower MATCHES ".*dll")
message(FATAL_ERROR "\"${result}\" is not a .dll library")
endif()
elseif(APPLE)
if(NOT result_lower MATCHES ".*dylib.*")
message(FATAL_ERROR "\"${result}\" is not a .dylib shared library")
endif()
else()
if(NOT result_lower MATCHES ".*so.*")
message(FATAL_ERROR "\"${result}\" is not a .so shared library")
endif()
endif()
else()
get_target_property(target_type ${TARGET} TYPE)
if(target_type MATCHES "SHARED_LIBRARY|MODULE_LIBRARY")
# OK
elseif(target_type MATCHES "STATIC_LIBRARY|OBJECT_LIBRARY|INTERFACE_LIBRARY|EXECUTABLE")
message(SEND_ERROR "${TARGET} is not a shared library, but has type=${target_type}")
else()
message(WARNING "Unable to extract dynamic library from target=${TARGET}, type=${target_type}.")
endif()
# TARGET_SONAME_FILE is not allowed for DLL target platforms.
if(WIN32)
set(result "$<TARGET_FILE_NAME:${TARGET}>")
else()
set(result "$<TARGET_SONAME_FILE_NAME:${TARGET}>")
endif()
endif()
set(${DEST} ${result} PARENT_SCOPE)
endfunction()
function(check_linker_supports_version_file VAR)
SDL_detect_linker()
if(CMAKE_C_COMPILER_LINKER_ID MATCHES "^(MSVC)$")

View File

@ -557,9 +557,20 @@ macro(CheckWayland)
set(LibDecor_PKG_CONFIG_SPEC libdecor-0)
pkg_check_modules(PC_LIBDECOR IMPORTED_TARGET ${LibDecor_PKG_CONFIG_SPEC})
if(PC_LIBDECOR_FOUND)
# Version 0.2.0 or higher is needed for suspended window state and statically linked min/max getters.
# Libdecor doesn't provide internal version defines, so generate them here.
if (PC_LIBDECOR_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(SDL_LIBDECOR_VERSION_MAJOR ${CMAKE_MATCH_1})
set(SDL_LIBDECOR_VERSION_MINOR ${CMAKE_MATCH_2})
set(SDL_LIBDECOR_VERSION_PATCH ${CMAKE_MATCH_3})
else()
message(WARNING "Failed to parse libdecor version; defaulting to lowest supported (0.1.0)")
set(SDL_LIBDECOR_VERSION_MAJOR 0)
set(SDL_LIBDECOR_VERSION_MINOR 1)
set(SDL_LIBDECOR_VERSION_PATCH 0)
endif()
if(PC_LIBDECOR_VERSION VERSION_GREATER_EQUAL "0.2.0")
set(SDL_HAVE_LIBDECOR_VER_0_2_0 1)
set(LibDecor_PKG_CONFIG_SPEC "libdecor-0>=0.2.0")
endif()
set(HAVE_WAYLAND_LIBDECOR TRUE)
@ -652,6 +663,7 @@ macro(CheckEGL)
cmake_push_check_state()
find_package(OpenGL MODULE)
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENGL_EGL_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES "${SDL3_SOURCE_DIR}/src/video/khronos")
check_c_source_compiles("
#define EGL_API_FB
#define MESA_EGL_NO_X11_HEADERS
@ -686,18 +698,21 @@ endmacro()
# - nada
macro(CheckOpenGLES)
if(SDL_OPENGLES)
cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_INCLUDES "${SDL3_SOURCE_DIR}/src/video/khronos")
check_c_source_compiles("
#include <GLES/gl.h>
#include <GLES/glext.h>
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V1)
if(HAVE_OPENGLES_V1)
set(HAVE_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES 1)
endif()
check_c_source_compiles("
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V2)
cmake_pop_check_state()
if(HAVE_OPENGLES_V1)
set(HAVE_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES 1)
endif()
if(HAVE_OPENGLES_V2)
set(HAVE_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES2 1)
@ -710,6 +725,10 @@ macro(CheckVulkan)
if(SDL_VULKAN)
set(SDL_VIDEO_VULKAN 1)
set(HAVE_VULKAN TRUE)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
set(HAVE_RENDER_VULKAN TRUE)
endif()
endif()
endmacro()
@ -737,7 +756,7 @@ endmacro()
# PTHREAD_LIBS
macro(CheckPTHREAD)
cmake_push_check_state()
if(SDL_THREADS AND SDL_PTHREADS)
if(SDL_PTHREADS)
if(ANDROID)
# the android libc provides built-in support for pthreads, so no
# additional linking or compile flags are necessary
@ -1020,13 +1039,10 @@ macro(CheckHIDAPI)
set(HAVE_HIDAPI ON)
if(SDL_HIDAPI_LIBUSB)
set(HAVE_LIBUSB FALSE)
set(LibUSB_PKG_CONFIG_SPEC libusb-1.0>=1.0.16)
pkg_check_modules(PC_LIBUSB IMPORTED_TARGET ${LibUSB_PKG_CONFIG_SPEC})
if(PC_LIBUSB_FOUND)
find_package(LibUSB)
if(LibUSB_FOUND)
cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_INCLUDES ${PC_LIBUSB_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES PkgConfig::PC_LIBUSB)
list(APPEND CMAKE_REQUIRED_LIBRARIES LibUSB::LibUSB)
check_c_source_compiles("
#include <stddef.h>
#include <libusb.h>
@ -1037,13 +1053,13 @@ macro(CheckHIDAPI)
cmake_pop_check_state()
if(HAVE_LIBUSB_H)
set(HAVE_LIBUSB TRUE)
FindLibraryAndSONAME("usb-1.0" LIBDIRS ${PC_LIBUSB_LIBRARY_DIRS})
if(SDL_HIDAPI_LIBUSB_SHARED AND USB_1.0_LIB_SONAME)
target_get_dynamic_library(dynamic_libusb LibUSB::LibUSB)
if(SDL_HIDAPI_LIBUSB_SHARED AND dynamic_libusb)
set(HAVE_HIDAPI_LIBUSB_SHARED ON)
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:PkgConfig::PC_LIBUSB,INTERFACE_INCLUDE_DIRECTORIES>)
set(SDL_LIBUSB_DYNAMIC "\"${dynamic_libusb}\"")
sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
else()
sdl_link_dependency(hidapi LIBS PkgConfig::PC_LIBUSB PKG_CONFIG_PREFIX PC_LIBUSB PKG_CONFIG_SPECS ${LibUSB_PKG_CONFIG_SPEC})
sdl_link_dependency(hidapi LIBS LibUSB::LibUSB PKG_CONFIG_SPECS "${LibUSB_PKG_CONFIG_SPEC}" CMAKE_MODULE LibUSB)
endif()
endif()
endif()
@ -1052,6 +1068,7 @@ macro(CheckHIDAPI)
if(HAVE_HIDAPI)
if(ANDROID)
enable_language(CXX)
sdl_sources("${SDL3_SOURCE_DIR}/src/hidapi/android/hid.cpp")
endif()
if(IOS OR TVOS)

View File

@ -19,6 +19,13 @@ macro(SDL_DetectCompiler)
endif()
endmacro()
function(sdl_target_compile_option_all_languages TARGET OPTION)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:${OPTION}>")
if(CMAKE_OBJC_COMPILER)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:OBJC>:${OPTION}>")
endif()
endfunction()
function(SDL_AddCommonCompilerFlags TARGET)
option(SDL_WERROR "Enable -Werror" OFF)
@ -41,20 +48,20 @@ function(SDL_AddCommonCompilerFlags TARGET)
if(MSVC_CLANG)
target_compile_options(${TARGET} PRIVATE "/W3")
elseif(HAVE_GCC_WALL)
target_compile_options(${TARGET} PRIVATE "-Wall")
sdl_target_compile_option_all_languages(${TARGET} "-Wall")
if(HAIKU)
target_compile_options(${TARGET} PRIVATE "-Wno-multichar")
sdl_target_compile_option_all_languages(${TARGET} "-Wno-multichar")
endif()
endif()
check_c_compiler_flag(-Wundef HAVE_GCC_WUNDEF)
if(HAVE_GCC_WUNDEF)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wundef>")
sdl_target_compile_option_all_languages(${TARGET} "-Wundef")
endif()
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
if(HAVE_GCC_NO_STRICT_ALIASING)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fno-strict-aliasing>")
sdl_target_compile_option_all_languages(${TARGET} "-fno-strict-aliasing")
endif()
check_c_compiler_flag(-Wdocumentation HAVE_GCC_WDOCUMENTATION)
@ -62,10 +69,10 @@ function(SDL_AddCommonCompilerFlags TARGET)
if(SDL_WERROR)
check_c_compiler_flag(-Werror=documentation HAVE_GCC_WERROR_DOCUMENTATION)
if(HAVE_GCC_WERROR_DOCUMENTATION)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=documentation>")
sdl_target_compile_option_all_languages(${TARGET} "-Werror=documentation")
endif()
endif()
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wdocumentation>")
sdl_target_compile_option_all_languages(${TARGET} "-Wdocumentation")
endif()
check_c_compiler_flag(-Wdocumentation-unknown-command HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
@ -73,30 +80,35 @@ function(SDL_AddCommonCompilerFlags TARGET)
if(SDL_WERROR)
check_c_compiler_flag(-Werror=documentation-unknown-command HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
if(HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=documentation-unknown-command>")
sdl_target_compile_option_all_languages(${TARGET} "-Werror=documentation-unknown-command")
endif()
endif()
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wdocumentation-unknown-command>")
sdl_target_compile_option_all_languages(${TARGET} "-Wdocumentation-unknown-command")
endif()
check_c_compiler_flag(-fcomment-block-commands=threadsafety HAVE_GCC_COMMENT_BLOCK_COMMANDS)
if(HAVE_GCC_COMMENT_BLOCK_COMMANDS)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fcomment-block-commands=threadsafety>")
sdl_target_compile_option_all_languages(${TARGET} "-fcomment-block-commands=threadsafety")
else()
check_c_compiler_flag(/clang:-fcomment-block-commands=threadsafety HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
if(HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:/clang:-fcomment-block-commands=threadsafety>")
sdl_target_compile_option_all_languages(${TARGET} "/clang:-fcomment-block-commands=threadsafety")
endif()
endif()
check_c_compiler_flag(-Wshadow HAVE_GCC_WSHADOW)
if(HAVE_GCC_WSHADOW)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wshadow>")
sdl_target_compile_option_all_languages(${TARGET} "-Wshadow")
endif()
check_c_compiler_flag(-Wunused-local-typedefs HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS)
if(HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-local-typedefs>")
sdl_target_compile_option_all_languages(${TARGET} "-Wno-unused-local-typedefs")
endif()
check_c_compiler_flag(-Wimplicit-fallthrough HAVE_GCC_WIMPLICIT_FALLTHROUGH)
if(HAVE_GCC_WIMPLICIT_FALLTHROUGH)
sdl_target_compile_option_all_languages(${TARGET} "-Wimplicit-fallthrough")
endif()
endif()
@ -109,7 +121,7 @@ function(SDL_AddCommonCompilerFlags TARGET)
elseif(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QNX)
check_c_compiler_flag(-Werror HAVE_WERROR)
if(HAVE_WERROR)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror>")
sdl_target_compile_option_all_languages(${TARGET} "-Werror")
endif()
endif()
endif()
@ -117,12 +129,12 @@ function(SDL_AddCommonCompilerFlags TARGET)
if(USE_CLANG)
check_c_compiler_flag("-fcolor-diagnostics" COMPILER_SUPPORTS_FCOLOR_DIAGNOSTICS)
if(COMPILER_SUPPORTS_FCOLOR_DIAGNOSTICS)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fcolor-diagnostics>")
sdl_target_compile_option_all_languages(${TARGET} "-fcolor-diagnostics")
endif()
else()
check_c_compiler_flag("-fdiagnostics-color=always" COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR_ALWAYS)
if(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR_ALWAYS)
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fdiagnostics-color=always>")
sdl_target_compile_option_all_languages(${TARGET} "-fdiagnostics-color=always")
endif()
endif()
endfunction()

View File

@ -1,4 +1,4 @@
# This cmake build script is meant for verifying the various CMake configuration script.
# This cmake build script is meant for verifying the various CMake configuration scripts.
cmake_minimum_required(VERSION 3.12)
project(sdl_test LANGUAGES C)
@ -35,9 +35,14 @@ add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
option(TEST_TEST "Test linking to SDL3_test library" ON)
add_feature_info("TEST_TEST" TEST_STATIC "Test linking to SDL test library")
option(TEST_FULL "Run complete SDL test suite" OFF)
add_feature_info("TEST_FULL" TEST_FULL "Build full SDL testsuite")
find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers)
add_library(headers_test OBJECT inc_sdl_slash.c inc_sdl_noslash.c)
target_link_libraries(headers_test PRIVATE SDL3::Headers)
add_library(headers_test_slash OBJECT inc_sdl_slash.c)
target_link_libraries(headers_test_slash PRIVATE SDL3::Headers)
add_library(headers_test_noslash OBJECT inc_sdl_noslash.c)
target_link_libraries(headers_test_noslash PRIVATE SDL3::Headers)
if(TEST_SHARED)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3-shared)
@ -93,6 +98,15 @@ find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
add_executable(gui-whatever WIN32 main_gui.c)
target_link_libraries(gui-whatever PRIVATE SDL3::SDL3)
if(TEST_FULL)
enable_testing()
set(SDL_TESTS_TIMEOUT_MULTIPLIER "1" CACHE STRING "Test timeout multiplier")
set(SDL_TESTS_LINK_SHARED ${TEST_SHARED})
add_definitions(-DNO_BUILD_CONFIG)
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../../test" SDL_test)
endif()
if(ANDROID)
find_package(SDL3 REQUIRED CONFIG COMPONENTS Jar)
endif()

View File

@ -3,6 +3,6 @@
void inc_sdl_noslash(void) {
SDL_SetMainReady();
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Init(0);
SDL_Quit();
}

View File

@ -3,6 +3,6 @@
void inc_sdl_slash(void) {
SDL_SetMainReady();
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Init(0);
SDL_Quit();
}

View File

@ -165,7 +165,7 @@ Loading assets
Any files you put in the "app/src/main/assets" directory of your project
directory will get bundled into the application package and you can load
them using the standard functions in SDL_rwops.h.
them using the standard functions in SDL_iostream.h.
There are also a few Android specific functions that allow you to get other
useful paths for saving and loading data:

View File

@ -8,14 +8,15 @@ The CMake build system is supported on the following platforms:
* Linux
* Microsoft Visual C
* MinGW and Msys
* macOS, iOS, and tvOS, with support for XCode
* macOS, iOS, tvOS, and visionOS with support for XCode
* Android
* Emscripten
* FreeBSD
* NetBSD
* Haiku
* Nintendo 3DS
* Playstation 2
* Playstation Vita
* PlayStation 2
* PlayStation Portable
* PlayStation Vita
* QNX 7.x/8.x
* RiscOS
@ -136,27 +137,88 @@ flags to the compiler.
cmake .. -DCMAKE_C_FLAGS="/ARCH:AVX2" -DCMAKE_CXX_FLAGS="/ARCH:AVX2"
```
### iOS/tvOS
### Apple
CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
using Xcode or Make, possibly among other build-systems.
CMake documentation for cross building for Apple:
[link](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos)
When using a recent version of CMake (3.14+), it should be possible to:
#### iOS/tvOS/visionOS
- build SDL for iOS, both static and dynamic
- build SDL test apps (as iOS/tvOS .app bundles)
- generate a working SDL_build_config.h for iOS (using SDL_build_config.h.cmake as a basis)
CMake 3.14+ natively includes support for iOS, tvOS and watchOS. visionOS requires CMake 3.28+.
SDL binaries may be built using Xcode or Make, possibly among other build-systems.
To use, set the following CMake variables when running CMake's configuration stage:
When using a compatible version of CMake, it should be possible to:
- `CMAKE_SYSTEM_NAME=<OS>` (either `iOS` or `tvOS`)
- `CMAKE_OSX_SYSROOT=<SDK>` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
`appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
- build SDL dylibs, both static and dynamic dylibs
- build SDL frameworks, only shared
- build SDL test apps
#### Frameworks
Configure with `-DSDL_FRAMEWORK=ON` to build a SDL framework instead of a dylib shared library.
Only shared frameworks are supported, no static ones.
#### Platforms
Use `-DCMAKE_PLATFORM_NAME=<value>` to configure the platform. CMake can target only one platform at a time.
| Apple platform | `CMAKE_SYSTEM_NAME` value |
|-----------------|---------------------------|
| macOS (MacOS X) | `Darwin` |
| iOS | `iOS` |
| tvOS | `tvOS` |
| visionOS | `visionOS` |
| watchOS | `watchOS` |
#### Universal binaries
A universal binaries, can be built by configuring CMake with
`-DCMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>`.
For example `-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"` will build binaries that run on both Intel cpus and Apple silicon.
SDL supports following Apple architectures:
| Platform | `CMAKE_OSX_ARCHITECTURES` value |
|----------------------------|---------------------------------|
| 64-bit ARM (Apple Silicon) | `arm64` |
| x86_64 | `x86_64` |
| 32-bit ARM | `armv7s` |
CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html)
#### Simulators and/or non-default maxOS platform SDK
Use `-DCMAKE_OSX_SYSROOT=<value>` to configure a different platform SDK.
The value can be either the name of the SDK, or a full path to the sdk (e.g. `/full/path/to/iPhoneOS.sdk`).
| SDK | `CMAKE_OSX_SYSROOT` value |
|----------------------|---------------------------|
| iphone | `iphoneos` |
| iphonesimulator | `iphonesimulator` |
| appleTV | `appletvos` |
| appleTV simulator | `appletvsimulator` |
| visionOS | `xr` |
| visionOS simulator | `xrsimulator` |
| watchOS | `watchos` |
| watchOS simulator | `watchsimulator` |
Append with a version number to target a specific SDK revision: e.g. `iphoneos12.4`, `appletvos12.4`.
CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html)
#### Examples
- for macOS, building a dylib and/or static library for x86_64 and arm64:
```bash
cmake ~/sdl -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
- for macOS, building an universal framework for x86_64 and arm64:
```bash
cmake ~/sdl -DSDL_FRAMEWORK=ON -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
- for iOS-Simulator, using the latest, installed SDK:
```bash
@ -275,9 +337,15 @@ file(WRITE main.c [===========================================[
/* START of source modifications */
#include <SDL3/SDL.h>
/*
* SDL3/SDL_main.h is explicitly not included such that a terminal window would appear on Windows.
*/
int main(int argc, char *argv[]) {
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
(void)argc;
(void)argv;
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
SDL_Log("SDL_Init failed (%s)", SDL_GetError());
return 1;
}
@ -314,6 +382,7 @@ int main(int argc, char *argv[]) {
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
/* END of source modifications */

View File

@ -35,7 +35,7 @@ SDL now has, internally, a table of function pointers. So, this is what SDL_Init
now looks like:
```c
UInt32 SDL_Init(Uint32 flags)
Uint32 SDL_Init(Uint32 flags)
{
return jump_table.SDL_Init(flags);
}
@ -100,7 +100,7 @@ a shared library of its own). If so, it loads that library and looks for and
calls a single function:
```c
SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
Sint32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
```
That function takes a version number (more on that in a moment), the address of

View File

@ -301,7 +301,7 @@ Your game probably has data files. Here's how to access them.
Filesystem access works like a Unix filesystem; you have a single directory
tree, possibly interpolated from several mounted locations, no drive letters,
'/' for a path separator. You can access them with standard file APIs like
open() or fopen() or SDL_RWops. You can read or write from the filesystem.
open() or fopen() or SDL_IOStream. You can read or write from the filesystem.
By default, you probably have a "MEMFS" filesystem (all files are stored in
memory, but access to them is immediate and doesn't need to block). There are

View File

@ -21,7 +21,7 @@ Windows GDK Status
The Windows GDK port supports the full set of Win32 APIs, renderers, controllers, input devices, etc., as the normal Windows x64 build of SDL.
* Additionally, the GDK port adds the following:
* Compile-time platform detection for SDL programs. The `__GDK__` is `#define`d on every GDK platform, and the `__WINGDK__` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
* Compile-time platform detection for SDL programs. The `SDL_PLATFORM_GDK` is `#define`d on every GDK platform, and the `SDL_PLATFORM_WINGDK` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
* GDK-specific setup:
* Initializing/uninitializing the game runtime, and initializing Xbox Live services
* Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
@ -149,7 +149,7 @@ Xbox GDKX Setup
In general, the same process in the Windows GDK instructions work. There are just a few additional notes:
* For Xbox One consoles, use the Gaming.Xbox.XboxOne.x64 target
* For Xbox Series consoles, use the Gaming.Xbox.Scarlett.x64 target
* The Xbox One target sets the `__XBOXONE__` define and the Xbox Series target sets the `__XBOXSERIES__` define
* The Xbox One target sets the `SDL_PLATFORM_XBOXONE` define and the Xbox Series target sets the `SDL_PLATFORM_XBOXSERIES` define
* You don't need to link against the Xbox.Services Thunks lib nor include that dll in your package (it doesn't exist for Xbox)
* The shader blobs for Xbox are created in a pre-build step for the Xbox targets, rather than included in the source (due to NDA and version compatability reasons)
* To create a package, use:

View File

@ -238,7 +238,7 @@ e.g.
{
... initialize game ...
#ifdef __IOS__
#ifdef SDL_PLATFORM_IOS
// Initialize the Game Center for scoring and matchmaking
InitGameCenter();

View File

@ -137,7 +137,7 @@ functions:
First:
```c
int SDL_AppInit(int argc, char **argv);
int SDL_AppInit(void **appstate, int argc, char **argv);
```
This will be called _once_ before anything else. argc/argv work like they
@ -148,10 +148,17 @@ an exit code that reports success to the platform. This function should not
go into an infinite mainloop; it should do any one-time startup it requires
and then return.
If you want to, you can assign a pointer to `*appstate`, and this pointer
will be made available to you in later functions calls in their `appstate`
parameter. This allows you to avoid global variables, but is totally
optional. If you don't set this, the pointer will be NULL in later function
calls.
Then:
```c
int SDL_AppIterate(void);
int SDL_AppIterate(void *appstate);
```
This is called over and over, possibly at the refresh rate of the display or
@ -171,7 +178,7 @@ as fast as possible. You do not check the event queue in this function
Next:
```c
int SDL_AppEvent(const SDL_Event *event);
int SDL_AppEvent(void *appstate, const SDL_Event *event);
```
This will be called whenever an SDL event arrives, on the thread that runs
@ -183,7 +190,7 @@ SDL_AppIterate(), so you can terminate in response to SDL_EVENT_QUIT, etc.
Finally:
```c
void SDL_AppQuit(void);
void SDL_AppQuit(void *appstate);
```
This is called once before terminating the app--assuming the app isn't being
@ -192,3 +199,5 @@ SDL will call SDL_Quit so the app doesn't have to (but it's safe for the app
to call it, too). Process termination proceeds as if the app returned normally
from main(), so atexit handles will run, if your platform supports that.
If you set `*appstate` during SDL_AppInit, this is where you should free that
data, as this pointer will not be provided to your app again.

View File

@ -13,11 +13,17 @@ rename_symbols.py --all-symbols source_code_path
It's also possible to apply a semantic patch to migrate more easily to SDL3: [SDL_migration.cocci](https://github.com/libsdl-org/SDL/blob/main/build-scripts/SDL_migration.cocci)
SDL headers should now be included as `#include <SDL3/SDL.h>`. Typically that's the only header you'll need in your application unless you are using OpenGL or Vulkan functionality. We have provided a handy Python script [rename_headers.py](https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_headers.py) to rename SDL2 headers to their SDL3 counterparts:
SDL headers should now be included as `#include <SDL3/SDL.h>`. Typically that's the only SDL header you'll need in your application unless you are using OpenGL or Vulkan functionality. SDL_image, SDL_mixer, SDL_net, SDL_ttf and SDL_rtf have also their preferred include path changed: for SDL_image, it becomes `#include <SDL3_image/SDL_image.h>`. We have provided a handy Python script [rename_headers.py](https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_headers.py) to rename SDL2 headers to their SDL3 counterparts:
```sh
rename_headers.py source_code_path
```
Some macros are renamed and/or removed in SDL3. We have provided a handy Python script [rename_macros.py](https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_macros.py) to replace these, and also add fixme comments on how to further improve the code:
```sh
rename_macros.py source_code_path
```
CMake users should use this snippet to include SDL support in their project:
```
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
@ -47,6 +53,13 @@ The vi format comments have been removed from source code. Vim users can use the
The following structures have been renamed:
- SDL_atomic_t => SDL_AtomicInt
The following functions have been renamed:
* SDL_AtomicCAS() => SDL_AtomicCompareAndSwap()
* SDL_AtomicCASPtr() => SDL_AtomicCompareAndSwapPointer()
* SDL_AtomicLock() => SDL_LockSpinlock()
* SDL_AtomicTryLock() => SDL_TryLockSpinlock()
* SDL_AtomicUnlock() => SDL_UnlockSpinlock()
## SDL_audio.h
The audio subsystem in SDL3 is dramatically different than SDL2. The primary way to play audio is no longer an audio callback; instead you bind SDL_AudioStreams to devices; however, there is still a callback method available if needed.
@ -178,7 +191,7 @@ SDL_FreeWAV has been removed and calls can be replaced with SDL_free.
SDL_LoadWAV() is a proper function now and no longer a macro (but offers the same functionality otherwise).
SDL_LoadWAV_RW() and SDL_LoadWAV() return an int now: zero on success, -1 on error, like most of SDL. They no longer return a pointer to an SDL_AudioSpec.
SDL_LoadWAV_IO() and SDL_LoadWAV() return an int now: zero on success, -1 on error, like most of SDL. They no longer return a pointer to an SDL_AudioSpec.
SDL_AudioCVT interface has been removed, the SDL_AudioStream interface (for audio supplied in pieces) or the new SDL_ConvertAudioSamples() function (for converting a complete audio buffer in one call) can be used instead.
@ -240,6 +253,7 @@ The following functions have been renamed:
* SDL_AudioStreamGet() => SDL_GetAudioStreamData()
* SDL_AudioStreamPut() => SDL_PutAudioStreamData()
* SDL_FreeAudioStream() => SDL_DestroyAudioStream()
* SDL_LoadWAV_RW() => SDL_LoadWAV_IO()
* SDL_NewAudioStream() => SDL_CreateAudioStream()
@ -303,7 +317,7 @@ The timestamp_us member of the sensor events has been renamed sensor_timestamp a
You should set the event.common.timestamp field before passing an event to SDL_PushEvent(). If the timestamp is 0 it will be filled in with SDL_GetTicksNS().
Event memory is now managed by SDL, so you should not free the data in SDL_EVENT_DROP_FILE, and if you want to hold onto the text in SDL_EVENT_TEXT_EDITING and SDL_EVENT_TEXT_INPUT events, you should make a copy of it.
Event memory is now managed by SDL, so you should not free the data in SDL_EVENT_DROP_FILE, and if you want to hold onto the text in SDL_EVENT_TEXT_EDITING and SDL_EVENT_TEXT_INPUT events, you should make a copy of it. SDL_TEXTINPUTEVENT_TEXT_SIZE is no longer necessary and has been removed.
Mouse events use floating point values for mouse coordinates and relative motion values. You can get sub-pixel motion depending on the platform and display scaling.
@ -317,10 +331,16 @@ The SDL_EVENT_WINDOW_SIZE_CHANGED event has been removed, and you can use SDL_EV
The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor have been renamed gaxis, gbutton, gdevice, gtouchpad, and gsensor.
The mouseX and mouseY fields of SDL_MouseWheelEvent have been renamed mouse_x and mouse_y.
The touchId and fingerId fields of SDL_TouchFingerEvent have been renamed touchID and fingerID.
SDL_QUERY, SDL_IGNORE, SDL_ENABLE, and SDL_DISABLE have been removed. You can use the functions SDL_SetEventEnabled() and SDL_EventEnabled() to set and query event processing state.
SDL_AddEventWatch() now returns -1 if it fails because it ran out of memory and couldn't add the event watch callback.
SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events.
The following symbols have been renamed:
* SDL_APP_DIDENTERBACKGROUND => SDL_EVENT_DID_ENTER_BACKGROUND
* SDL_APP_DIDENTERFOREGROUND => SDL_EVENT_DID_ENTER_FOREGROUND
@ -351,6 +371,7 @@ The following symbols have been renamed:
* SDL_FINGERUP => SDL_EVENT_FINGER_UP
* SDL_FIRSTEVENT => SDL_EVENT_FIRST
* SDL_JOYAXISMOTION => SDL_EVENT_JOYSTICK_AXIS_MOTION
* SDL_JOYBALLMOTION => SDL_EVENT_JOYSTICK_BALL_MOTION
* SDL_JOYBATTERYUPDATED => SDL_EVENT_JOYSTICK_BATTERY_UPDATED
* SDL_JOYBUTTONDOWN => SDL_EVENT_JOYSTICK_BUTTON_DOWN
* SDL_JOYBUTTONUP => SDL_EVENT_JOYSTICK_BUTTON_UP
@ -371,12 +392,14 @@ The following symbols have been renamed:
* SDL_RENDER_DEVICE_RESET => SDL_EVENT_RENDER_DEVICE_RESET
* SDL_RENDER_TARGETS_RESET => SDL_EVENT_RENDER_TARGETS_RESET
* SDL_SENSORUPDATE => SDL_EVENT_SENSOR_UPDATE
* SDL_SYSWMEVENT => SDL_EVENT_SYSWM
* SDL_TEXTEDITING => SDL_EVENT_TEXT_EDITING
* SDL_TEXTEDITING_EXT => SDL_EVENT_TEXT_EDITING_EXT
* SDL_TEXTINPUT => SDL_EVENT_TEXT_INPUT
* SDL_USEREVENT => SDL_EVENT_USER
The following symbols have been removed:
* SDL_SYSWMEVENT - you can use SDL_SetWindowsMessageHook() and SDL_SetX11EventHook() to watch and modify system events before SDL sees them.
The following structures have been renamed:
* SDL_ControllerAxisEvent => SDL_GamepadAxisEvent
* SDL_ControllerButtonEvent => SDL_GamepadButtonEvent
@ -491,6 +514,8 @@ SDL_bool SDL_IsJoystickNVIDIASHIELDController(Uint16 vendor_id, Uint16 product_i
}
```
The inputType and outputType fields of SDL_GamepadBinding have been renamed input_type and output_type.
The following enums have been renamed:
* SDL_GameControllerAxis => SDL_GamepadAxis
* SDL_GameControllerBindType => SDL_GamepadBindingType
@ -503,7 +528,7 @@ The following structures have been renamed:
The following functions have been renamed:
* SDL_GameControllerAddMapping() => SDL_AddGamepadMapping()
* SDL_GameControllerAddMappingsFromFile() => SDL_AddGamepadMappingsFromFile()
* SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromRW()
* SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromIO()
* SDL_GameControllerClose() => SDL_CloseGamepad()
* SDL_GameControllerFromInstanceID() => SDL_GetGamepadFromInstanceID()
* SDL_GameControllerFromPlayerIndex() => SDL_GetGamepadFromPlayerIndex()
@ -532,9 +557,6 @@ The following functions have been renamed:
* SDL_GameControllerGetVendor() => SDL_GetGamepadVendor()
* SDL_GameControllerHasAxis() => SDL_GamepadHasAxis()
* SDL_GameControllerHasButton() => SDL_GamepadHasButton()
* SDL_GameControllerHasLED() => SDL_GamepadHasLED()
* SDL_GameControllerHasRumble() => SDL_GamepadHasRumble()
* SDL_GameControllerHasRumbleTriggers() => SDL_GamepadHasRumbleTriggers()
* SDL_GameControllerHasSensor() => SDL_GamepadHasSensor()
* SDL_GameControllerIsSensorEnabled() => SDL_GamepadSensorEnabled()
* SDL_GameControllerMapping() => SDL_GetGamepadMapping()
@ -555,12 +577,15 @@ The following functions have been removed:
* SDL_GameControllerEventState() - replaced with SDL_SetGamepadEventsEnabled() and SDL_GamepadEventsEnabled()
* SDL_GameControllerGetBindForAxis() - replaced with SDL_GetGamepadBindings()
* SDL_GameControllerGetBindForButton() - replaced with SDL_GetGamepadBindings()
* SDL_GameControllerHasLED() - replaced with SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN
* SDL_GameControllerHasRumble() - replaced with SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN
* SDL_GameControllerHasRumbleTriggers() - replaced with SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN
* SDL_GameControllerMappingForDeviceIndex() - replaced with SDL_GetGamepadInstanceMapping()
* SDL_GameControllerMappingForIndex() - replaced with SDL_GetGamepadMappings()
* SDL_GameControllerNameForIndex() - replaced with SDL_GetGamepadInstanceName()
* SDL_GameControllerNumMappings() - replaced with SDL_GetGamepadMappings()
* SDL_GameControllerPathForIndex() - replaced with SDL_GetGamepadInstancePath()
* SDL_GameControllerTypeForIndex() - replaced with SDL_GetGamepadInstanceType()
* SDL_GameControllerNumMappings() - replaced with SDL_GetGamepadMappings()
* SDL_GameControllerMappingForIndex() - replaced with SDL_GetGamepadMappings()
The following symbols have been renamed:
* SDL_CONTROLLER_AXIS_INVALID => SDL_GAMEPAD_AXIS_INVALID
@ -618,6 +643,65 @@ be dropped into an SDL3 or SDL2 program, to continue to provide this
functionality to your app and aid migration. That is located in the
[SDL_gesture GitHub repository](https://github.com/libsdl-org/SDL_gesture).
## SDL_haptic.h
Gamepads with simple rumble capability no longer show up in the SDL haptics interface, instead you should use SDL_RumbleGamepad().
Rather than iterating over haptic devices using device index, there is a new function SDL_GetHaptics() to get the current list of haptic devices, and new functions to get information about haptic devices from their instance ID:
```c
{
if (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0) {
int i, num_haptics;
SDL_HapticID *haptics = SDL_GetHaptics(&num_haptics);
if (haptics) {
for (i = 0; i < num_haptics; ++i) {
SDL_HapticID instance_id = haptics[i];
const char *name = SDL_GetHapticInstanceName(instance_id);
SDL_Log("Haptic %" SDL_PRIu32 ": %s\n",
instance_id, name ? name : "Unknown");
}
SDL_free(haptics);
}
SDL_QuitSubSystem(SDL_INIT_HAPTIC);
}
}
```
SDL_HapticEffectSupported(), SDL_HapticRumbleSupported(), and SDL_IsJoystickHaptic() now return SDL_bool instead of an optional negative error code.
The following functions have been renamed:
* SDL_HapticClose() => SDL_CloseHaptic()
* SDL_HapticDestroyEffect() => SDL_DestroyHapticEffect()
* SDL_HapticGetEffectStatus() => SDL_GetHapticEffectStatus()
* SDL_HapticNewEffect() => SDL_CreateHapticEffect()
* SDL_HapticNumAxes() => SDL_GetNumHapticAxes()
* SDL_HapticNumEffects() => SDL_GetMaxHapticEffects()
* SDL_HapticNumEffectsPlaying() => SDL_GetMaxHapticEffectsPlaying()
* SDL_HapticOpen() => SDL_OpenHaptic()
* SDL_HapticOpenFromJoystick() => SDL_OpenHapticFromJoystick()
* SDL_HapticOpenFromMouse() => SDL_OpenHapticFromMouse()
* SDL_HapticPause() => SDL_PauseHaptic()
* SDL_HapticQuery() => SDL_GetHapticFeatures()
* SDL_HapticRumbleInit() => SDL_InitHapticRumble()
* SDL_HapticRumblePlay() => SDL_PlayHapticRumble()
* SDL_HapticRumbleStop() => SDL_StopHapticRumble()
* SDL_HapticRunEffect() => SDL_RunHapticEffect()
* SDL_HapticSetAutocenter() => SDL_SetHapticAutocenter()
* SDL_HapticSetGain() => SDL_SetHapticGain()
* SDL_HapticStopAll() => SDL_StopHapticEffects()
* SDL_HapticStopEffect() => SDL_StopHapticEffect()
* SDL_HapticUnpause() => SDL_ResumeHaptic()
* SDL_HapticUpdateEffect() => SDL_UpdateHapticEffect()
* SDL_JoystickIsHaptic() => SDL_IsJoystickHaptic()
* SDL_MouseIsHaptic() => SDL_IsMouseHaptic()
The following functions have been removed:
* SDL_HapticIndex() - replaced with SDL_GetHapticInstanceID()
* SDL_HapticName() - replaced with SDL_GetHapticInstanceName()
* SDL_HapticOpened() - replaced with SDL_GetHapticFromInstanceID()
* SDL_NumHaptics() - replaced with SDL_GetHaptics()
## SDL_hints.h
SDL_AddHintCallback() now returns a standard int result instead of void, returning 0 if the function succeeds or a negative error code if there was an error.
@ -625,24 +709,47 @@ SDL_AddHintCallback() now returns a standard int result instead of void, returni
Calling SDL_GetHint() with the name of the hint being changed from within a hint callback will now return the new value rather than the old value. The old value is still passed as a parameter to the hint callback.
The following hints have been removed:
* SDL_HINT_ACCELEROMETER_AS_JOYSTICK
* SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS - gamepad buttons are always positional
* SDL_HINT_IDLE_TIMER_DISABLED - use SDL_DisableScreenSaver instead
* SDL_HINT_GRAB_KEYBOARD - use SDL_SetWindowKeyboardGrab() instead
* SDL_HINT_IDLE_TIMER_DISABLED - use SDL_DisableScreenSaver() instead
* SDL_HINT_IME_SUPPORT_EXTENDED_TEXT - the normal text editing event has extended text
* SDL_HINT_MOUSE_RELATIVE_SCALING - mouse coordinates are no longer automatically scaled by the SDL renderer
* SDL_HINT_RENDER_LOGICAL_SIZE_MODE - the logical size mode is explicitly set with SDL_SetRenderLogicalPresentation()
* SDL_HINT_RENDER_BATCHING - Render batching is always enabled, apps should call SDL_FlushRenderer() before calling into a lower-level graphics API.
* SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL - replaced with the "opengl" property in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowWithProperties()
* SDL_HINT_RENDER_LOGICAL_SIZE_MODE - the logical size mode is explicitly set with SDL_SetRenderLogicalPresentation()
* SDL_HINT_RENDER_OPENGL_SHADERS - shaders are always used if they are available
* SDL_HINT_RENDER_SCALE_QUALITY - textures now default to linear filtering, use SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST) if you want nearest pixel mode instead
* SDL_HINT_VIDEO_EXTERNAL_CONTEXT - replaced with SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN in SDL_CreateWindowWithProperties()
* SDL_HINT_THREAD_STACK_SIZE - the stack size can be specified using SDL_CreateThreadWithStackSize()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL - replaced with SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_HIGHDPI_DISABLED - high DPI support is always enabled
* SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT - replaced with the "win32.pixel_format_hwnd" in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT - replaced with SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_X11_FORCE_EGL - use SDL_HINT_VIDEO_FORCE_EGL instead
* SDL_HINT_VIDEO_X11_XINERAMA - Xinerama no longer supported by the X11 backend
* SDL_HINT_VIDEO_X11_XVIDMODE - Xvidmode no longer supported by the X11 backend
* SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING - SDL now properly handles the 0x406D1388 Exception if no debugger intercepts it, preventing its propagation.
* SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 - replaced with SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, defaulting to SDL_TRUE
* SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING
* Renamed hints SDL_HINT_VIDEODRIVER and SDL_HINT_AUDIODRIVER to SDL_HINT_VIDEO_DRIVER and SDL_HINT_AUDIO_DRIVER
* Renamed environment variables SDL_VIDEODRIVER and SDL_AUDIODRIVER to SDL_VIDEO_DRIVER and SDL_AUDIO_DRIVER
* The environment variables SDL_VIDEO_X11_WMCLASS and SDL_VIDEO_WAYLAND_WMCLASS have been removed and replaced with the unified hint SDL_HINT_APP_ID
The following hints have been renamed:
* SDL_HINT_ALLOW_TOPMOST => SDL_HINT_WINDOW_ALLOW_TOPMOST
* SDL_HINT_DIRECTINPUT_ENABLED => SDL_HINT_JOYSTICK_DIRECTINPUT
* SDL_HINT_GDK_TEXTINPUT_DEFAULT => SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
* SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE => SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE
* SDL_HINT_LINUX_DIGITAL_HATS => SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS
* SDL_HINT_LINUX_HAT_DEADZONES => SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
* SDL_HINT_LINUX_JOYSTICK_CLASSIC => SDL_HINT_JOYSTICK_LINUX_CLASSIC
* SDL_HINT_LINUX_JOYSTICK_DEADZONES => SDL_HINT_JOYSTICK_LINUX_DEADZONES
* SDL_HINT_PS2_DYNAMIC_VSYNC => SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
The following functions have been removed:
* SDL_ClearHints() - replaced with SDL_ResetHints()
## SDL_init.h
The following symbols have been renamed:
@ -650,6 +757,7 @@ The following symbols have been renamed:
The following symbols have been removed:
* SDL_INIT_NOPARACHUTE
* SDL_INIT_EVERYTHING - you should only initialize the subsystems you are using
## SDL_joystick.h
@ -694,6 +802,7 @@ The following functions have been renamed:
* SDL_JoystickGetAttached() => SDL_JoystickConnected()
* SDL_JoystickGetAxis() => SDL_GetJoystickAxis()
* SDL_JoystickGetAxisInitialState() => SDL_GetJoystickAxisInitialState()
* SDL_JoystickGetBall() => SDL_GetJoystickBall()
* SDL_JoystickGetButton() => SDL_GetJoystickButton()
* SDL_JoystickGetFirmwareVersion() => SDL_GetJoystickFirmwareVersion()
* SDL_JoystickGetGUID() => SDL_GetJoystickGUID()
@ -710,6 +819,7 @@ The following functions have been renamed:
* SDL_JoystickIsVirtual() => SDL_IsJoystickVirtual()
* SDL_JoystickName() => SDL_GetJoystickName()
* SDL_JoystickNumAxes() => SDL_GetNumJoystickAxes()
* SDL_JoystickNumBalls() => SDL_GetNumJoystickBalls()
* SDL_JoystickNumButtons() => SDL_GetNumJoystickButtons()
* SDL_JoystickNumHats() => SDL_GetNumJoystickHats()
* SDL_JoystickOpen() => SDL_OpenJoystick()
@ -736,8 +846,10 @@ The following functions have been removed:
* SDL_JoystickGetDeviceProductVersion() - replaced with SDL_GetJoystickInstanceProductVersion()
* SDL_JoystickGetDeviceType() - replaced with SDL_GetJoystickInstanceType()
* SDL_JoystickGetDeviceVendor() - replaced with SDL_GetJoystickInstanceVendor()
* SDL_JoystickHasLED() - replaced with SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN
* SDL_JoystickHasRumble() - replaced with SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN
* SDL_JoystickHasRumbleTriggers() - replaced with SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN
* SDL_JoystickNameForIndex() - replaced with SDL_GetJoystickInstanceName()
* SDL_JoystickNumBalls() - API has been removed, see https://github.com/libsdl-org/SDL/issues/6766
* SDL_JoystickPathForIndex() - replaced with SDL_GetJoystickInstancePath()
* SDL_NumJoysticks() - replaced with SDL_GetJoysticks()
@ -746,13 +858,19 @@ The following symbols have been removed:
## SDL_keyboard.h
Text input is no longer automatically enabled when initializing video, you should call SDL_StartTextInput() when you want to receive text input and call SDL_StopTextInput() when you are done. Starting text input may shown an input method editor (IME) and cause key up/down events to be skipped, so should only be enabled when the application wants text input.
The following functions have been renamed:
* SDL_IsScreenKeyboardShown() => SDL_ScreenKeyboardShown()
* SDL_IsTextInputActive() => SDL_TextInputActive()
* SDL_IsTextInputShown() => SDL_TextInputShown()
The following functions have been removed:
* SDL_IsTextInputShown()
## SDL_keycode.h
SDL_Keycode is now an enum instead of Sint32.
The following symbols have been renamed:
* KMOD_ALT => SDL_KMOD_ALT
* KMOD_CAPS => SDL_KMOD_CAPS
@ -777,13 +895,31 @@ The following symbols have been renamed:
SDL_LoadFunction() now returns `SDL_FunctionPointer` instead of `void *`, and should be cast to the appropriate function type. You can define SDL_FUNCTION_POINTER_IS_VOID_POINTER in your project to restore the previous behavior.
## SDL_log.h
The following functions have been renamed:
* SDL_LogGetOutputFunction() => SDL_GetLogOutputFunction()
* SDL_LogSetOutputFunction() => SDL_SetLogOutputFunction()
## SDL_main.h
SDL3 doesn't have a static libSDLmain to link against anymore.
Instead SDL_main.h is now a header-only library **and not included by SDL.h anymore**.
Using it is really simple: Just `#include <SDL3/SDL_main.h>` in the source file with your standard
`int main(int argc, char* argv[])` function.
`int main(int argc, char* argv[])` function. See docs/README-main-functions.md for details.
Several platform-specific entry point functions have been removed as unnecessary. If for some reason you explicitly need them, here are easy replacements:
```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_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
```
## SDL_messagebox.h
The buttonid field of SDL_MessageBoxButtonData has been renamed buttonID.
## SDL_metal.h
@ -826,6 +962,10 @@ The following symbols have been renamed:
SDL_CalculateGammaRamp has been removed, because SDL_SetWindowGammaRamp has been removed as well due to poor support in modern operating systems (see [SDL_video.h](#sdl_videoh)).
The BitsPerPixel and BytesPerPixel fields of SDL_PixelFormat have been renamed bits_per_pixel and bytes_per_pixel.
SDL_PixelFormatEnum is used instead of Uint32 for API functions that refer to pixel format by enumerated value.
The following functions have been renamed:
* SDL_AllocFormat() => SDL_CreatePixelFormat()
* SDL_AllocPalette() => SDL_CreatePalette()
@ -860,7 +1000,53 @@ The following symbols have been renamed:
## SDL_platform.h
The preprocessor symbol `__MACOSX__` has been renamed `__MACOS__`, and `__IPHONEOS__` has been renamed `__IOS__`
The following platform preprocessor macros have been renamed:
| SDL2 | SDL3 |
|-------------------|---------------------------|
| `__3DS__` | `SDL_PLATFORM_3DS` |
| `__AIX__` | `SDL_PLATFORM_AIX` |
| `__ANDROID__` | `SDL_PLATFORM_ANDROID` |
| `__APPLE__` | `SDL_PLATFORM_APPLE` |
| `__BSDI__` | `SDL_PLATFORM_BSDI` |
| `__CYGWIN_` | `SDL_PLATFORM_CYGWIN` |
| `__EMSCRIPTEN__` | `SDL_PLATFORM_EMSCRIPTEN` |
| `__FREEBSD__` | `SDL_PLATFORM_FREEBSD` |
| `__GDK__` | `SDL_PLATFORM_GDK` |
| `__HAIKU__` | `SDL_PLATFORM_HAIKU` |
| `__HPUX__` | `SDL_PLATFORM_HPUX` |
| `__IPHONEOS__` | `SDL_PLATFORM_IOS` |
| `__IRIX__` | `SDL_PLATFORM_IRIX` |
| `__LINUX__` | `SDL_PLATFORM_LINUX` |
| `__MACOSX__` | `SDL_PLATFORM_MACOS` |
| `__NETBSD__` | `SDL_PLATFORM_NETBSD` |
| `__NGAGE__` | `SDL_PLATFORM_NGAGE` |
| `__OPENBSD__` | `SDL_PLATFORM_OPENBSD` |
| `__OS2__` | `SDL_PLATFORM_OS2` |
| `__OSF__` | `SDL_PLATFORM_OSF` |
| `__PS2__` | `SDL_PLATFORM_PS2` |
| `__PSP__` | `SDL_PLATFORM_PSP` |
| `__QNXNTO__` | `SDL_PLATFORM_QNXNTO` |
| `__RISCOS__` | `SDL_PLATFORM_RISCOS` |
| `__SOLARIS__` | `SDL_PLATFORM_SOLARIS` |
| `__TVOS__` | `SDL_PLATFORM_TVOS` |
| `__unix__` | `SDL_PLATFORM_UNI` |
| `__VITA__` | `SDL_PLATFORM_VITA` |
| `__WIN32__` | `SDL_PLATFORM_WIN32` |
| `__WINGDK__` | `SDL_PLATFORM_WINGDK` |
| `__WINRT__` | `SDL_PLATFORM_WINRT` |
| `__XBOXONE__` | `SDL_PLATFORM_XBOXONE` |
| `__XBOXSERIES__` | `SDL_PLATFORM_XBOXSERIES` |
You can use the Python script [rename_macros.py](https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_macros.py) to automatically rename these in your source code.
A new macro `SDL_PLATFORM_WINDOWS` has been added that is true for all Windows platforms, including Xbox, GDK, etc.
The following platform preprocessor macros have been removed:
* `__DREAMCAST__`
* `__NACL__`
* `__PNACL__`
* `__WINDOWS__`
## SDL_rect.h
@ -904,13 +1090,6 @@ to decide for you.
The SDL_RENDERER_TARGETTEXTURE flag has been removed, all current renderers support target texture functionality.
When a renderer is created, it will automatically set the logical size to the size of
the window in points. For high DPI displays, this will set up scaling from points to
pixels. You can disable this scaling with:
```c
SDL_SetRenderLogicalPresentation(renderer, 0, 0, SDL_LOGICAL_PRESENTATION_DISABLED, SDL_SCALEMODE_NEAREST);
```
Mouse and touch events are no longer filtered to change their coordinates, instead you
can call SDL_ConvertEventToRenderCoordinates() to explicitly map event coordinates into
the rendering viewport.
@ -919,6 +1098,10 @@ SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() have been renamed SD
The viewport, clipping state, and scale for render targets are now persistent and will remain set whenever they are active.
SDL_Vertex has been changed to use floating point colors, in the range of [0..1] for SDR content.
SDL_RenderReadPixels() returns a surface instead of filling in preallocated memory.
The following functions have been renamed:
* SDL_GetRendererOutputSize() => SDL_GetCurrentRenderOutputSize()
* SDL_RenderCopy() => SDL_RenderTexture()
@ -951,7 +1134,6 @@ The following functions have been renamed:
* SDL_RenderIsClipEnabled() => SDL_RenderClipEnabled()
* SDL_RenderLogicalToWindow() => SDL_RenderCoordinatesToWindow()
* SDL_RenderSetClipRect() => SDL_SetRenderClipRect()
* SDL_RenderSetIntegerScale() => SDL_SetRenderIntegerScale()
* SDL_RenderSetLogicalSize() => SDL_SetRenderLogicalPresentation()
* SDL_RenderSetScale() => SDL_SetRenderScale()
* SDL_RenderSetVSync() => SDL_SetRenderVSync()
@ -968,6 +1150,7 @@ The following functions have been removed:
* SDL_SetTextureUserData() - use SDL_GetTextureProperties() instead
The following symbols have been renamed:
* SDL_RendererFlip => SDL_FlipMode
* SDL_ScaleModeBest => SDL_SCALEMODE_BEST
* SDL_ScaleModeLinear => SDL_SCALEMODE_LINEAR
* SDL_ScaleModeNearest => SDL_SCALEMODE_NEAREST
@ -975,11 +1158,19 @@ The following symbols have been renamed:
## SDL_rwops.h
The following symbols have been renamed:
* RW_SEEK_CUR => SDL_RW_SEEK_CUR
* RW_SEEK_END => SDL_RW_SEEK_END
* RW_SEEK_SET => SDL_RW_SEEK_SET
* RW_SEEK_CUR => SDL_IO_SEEK_CUR
* RW_SEEK_END => SDL_IO_SEEK_END
* RW_SEEK_SET => SDL_IO_SEEK_SET
SDL_RWread and SDL_RWwrite (and SDL_RWops::read, SDL_RWops::write) have a different function signature in SDL3.
SDL_rwops.h is now named SDL_iostream.h
SDL_RWops is now an opaque structure, and has been renamed to SDL_IOStream. The SDL3 APIs to create an SDL_IOStream (SDL_IOFromFile, etc) are renamed but otherwise still function as they did in SDL2. However, to make a custom SDL_IOStream with app-provided function pointers, call SDL_OpenIO and provide the function pointers through there. To call into an SDL_IOStream's functionality, use the standard APIs (SDL_ReadIO, etc), as the function pointers are internal.
SDL_IOStream is not to be confused with the unrelated standard C++ iostream class!
The RWops function pointers are now in a separate structure called SDL_IOStreamInterface, which is provided to SDL_OpenIO when creating a custom SDL_IOStream implementation. All the functions now take a `void *` userdata argument for their first parameter instead of an SDL_IOStream, since that's now an opaque structure.
SDL_RWread and SDL_RWwrite (and the read and write function pointers) have a different function signature in SDL3, in addition to being renamed.
Previously they looked more like stdio:
@ -991,55 +1182,67 @@ size_t SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size, size_t maxn
But now they look more like POSIX:
```c
size_t SDL_RWread(SDL_RWops *context, void *ptr, size_t size);
size_t SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size);
size_t SDL_ReadIO(void *userdata, void *ptr, size_t size);
size_t SDL_WriteIO(void *userdata, const void *ptr, size_t size);
```
Code that used to look like this:
```
```c
size_t custom_read(void *ptr, size_t size, size_t nitems, SDL_RWops *stream)
{
return SDL_RWread(stream, ptr, size, nitems);
}
```
should be changed to:
```
size_t custom_read(void *ptr, size_t size, size_t nitems, SDL_RWops *stream)
```c
size_t custom_read(void *ptr, size_t size, size_t nitems, SDL_IOStream *stream)
{
if (size > 0 && nitems > 0) {
return SDL_RWread(stream, ptr, size * nitems) / size;
return SDL_ReadIO(stream, ptr, size * nitems) / size;
}
return 0;
}
```
SDL_RWops::type was removed; it wasn't meaningful for app-provided implementations at all, and wasn't much use for SDL's internal implementations, either. If you _have_ to identify the type, you can examine the SDL_IOStream's properties to detect built-in implementations.
SDL_IOStreamInterface::close implementations should clean up their own userdata, but not call SDL_CloseIO on themselves; now the contract is always that SDL_CloseIO is called, which calls `->close` before freeing the opaque object.
SDL_AllocRW(), SDL_FreeRW(), SDL_RWclose() and direct access to the `->close` function pointer have been removed from the API, so there's only one path to manage RWops lifetimes now: SDL_OpenIO() and SDL_CloseIO().
SDL_RWFromFP has been removed from the API, due to issues when the SDL library uses a different C runtime from the application.
You can implement this in your own code easily:
```c
#include <stdio.h>
static Sint64 SDLCALL stdio_seek(SDL_RWops *context, Sint64 offset, int whence)
typedef struct IOStreamStdioFPData
{
FILE *fp;
SDL_bool autoclose;
} IOStreamStdioFPData;
static Sint64 SDLCALL stdio_seek(void *userdata, Sint64 offset, int whence)
{
FILE *fp = ((IOStreamStdioFPData *) userdata)->fp;
int stdiowhence;
switch (whence) {
case SDL_RW_SEEK_SET:
case SDL_IO_SEEK_SET:
stdiowhence = SEEK_SET;
break;
case SDL_RW_SEEK_CUR:
case SDL_IO_SEEK_CUR:
stdiowhence = SEEK_CUR;
break;
case SDL_RW_SEEK_END:
case SDL_IO_SEEK_END:
stdiowhence = SEEK_END;
break;
default:
return SDL_SetError("Unknown value for 'whence'");
}
if (fseek((FILE *)context->hidden.stdio.fp, (fseek_off_t)offset, stdiowhence) == 0) {
Sint64 pos = ftell((FILE *)context->hidden.stdio.fp);
if (fseek(fp, (fseek_off_t)offset, stdiowhence) == 0) {
const Sint64 pos = ftell(fp);
if (pos < 0) {
return SDL_SetError("Couldn't get stream offset");
}
@ -1048,63 +1251,82 @@ static Sint64 SDLCALL stdio_seek(SDL_RWops *context, Sint64 offset, int whence)
return SDL_Error(SDL_EFSEEK);
}
static size_t SDLCALL stdio_read(SDL_RWops *context, void *ptr, size_t size)
static size_t SDLCALL stdio_read(void *userdata, void *ptr, size_t size, SDL_IOStatus *status)
{
size_t bytes;
bytes = fread(ptr, 1, size, (FILE *)context->hidden.stdio.fp);
if (bytes == 0 && ferror((FILE *)context->hidden.stdio.fp)) {
FILE *fp = ((IOStreamStdioFPData *) userdata)->fp;
const size_t bytes = fread(ptr, 1, size, fp);
if (bytes == 0 && ferror(fp)) {
SDL_Error(SDL_EFREAD);
}
return bytes;
}
static size_t SDLCALL stdio_write(SDL_RWops *context, const void *ptr, size_t size)
static size_t SDLCALL stdio_write(void *userdata, const void *ptr, size_t size, SDL_IOStatus *status)
{
size_t bytes;
bytes = fwrite(ptr, 1, size, (FILE *)context->hidden.stdio.fp);
if (bytes == 0 && ferror((FILE *)context->hidden.stdio.fp)) {
FILE *fp = ((IOStreamStdioFPData *) userdata)->fp;
const size_t bytes = fwrite(ptr, 1, size, fp);
if (bytes == 0 && ferror(fp)) {
SDL_Error(SDL_EFWRITE);
}
return bytes;
}
static int SDLCALL stdio_close(SDL_RWops *context)
static int SDLCALL stdio_close(void *userdata)
{
IOStreamStdioData *rwopsdata = (IOStreamStdioData *) userdata;
int status = 0;
if (context->hidden.stdio.autoclose) {
if (fclose((FILE *)context->hidden.stdio.fp) != 0) {
if (rwopsdata->autoclose) {
if (fclose(rwopsdata->fp) != 0) {
status = SDL_Error(SDL_EFWRITE);
}
}
SDL_DestroyRW(context);
return status;
}
SDL_RWops *SDL_RWFromFP(void *fp, SDL_bool autoclose)
SDL_IOStream *SDL_RWFromFP(FILE *fp, SDL_bool autoclose)
{
SDL_RWops *rwops = NULL;
SDL_IOStreamInterface iface;
IOStreamStdioFPData *rwopsdata;
SDL_IOStream *rwops;
rwops = SDL_CreateRW();
if (rwops != NULL) {
rwops->seek = stdio_seek;
rwops->read = stdio_read;
rwops->write = stdio_write;
rwops->close = stdio_close;
rwops->hidden.stdio.fp = fp;
rwops->hidden.stdio.autoclose = autoclose;
rwops->type = SDL_RWOPS_STDFILE;
rwopsdata = (IOStreamStdioFPData *) SDL_malloc(sizeof (*rwopsdata));
if (!rwopsdata) {
return NULL;
}
SDL_zero(iface);
/* There's no stdio_size because SDL_GetIOSize emulates it the same way we'd do it for stdio anyhow. */
iface.seek = stdio_seek;
iface.read = stdio_read;
iface.write = stdio_write;
iface.close = stdio_close;
rwopsdata->fp = fp;
rwopsdata->autoclose = autoclose;
rwops = SDL_OpenIO(&iface, rwopsdata);
if (!rwops) {
iface.close(rwopsdata);
}
return rwops;
}
```
The internal `FILE *` is available through a standard SDL_IOStream property, for streams made through SDL_IOFromFile() that use stdio behind the scenes; apps use this pointer at their own risk and should make sure that SDL and the app are using the same C runtime.
The functions SDL_ReadU8(), SDL_ReadU16LE(), SDL_ReadU16BE(), SDL_ReadU32LE(), SDL_ReadU32BE(), SDL_ReadU64LE(), and SDL_ReadU64BE() now return SDL_TRUE if the read succeeded and SDL_FALSE if it didn't, and store the data in a pointer passed in as a parameter.
The following functions have been renamed:
* SDL_AllocRW() => SDL_CreateRW()
* SDL_FreeRW() => SDL_DestroyRW()
* SDL_RWFromConstMem() => SDL_IOFromConstMem()
* SDL_RWFromFile() => SDL_IOFromFile()
* SDL_RWFromMem() => SDL_IOFromMem()
* SDL_RWclose() => SDL_CloseIO()
* SDL_RWread() => SDL_ReadIO()
* SDL_RWseek() => SDL_SeekIO()
* SDL_RWsize() => SDL_GetIOSize()
* SDL_RWtell() => SDL_TellIO()
* SDL_RWwrite() => SDL_WriteIO()
* SDL_ReadBE16() => SDL_ReadU16BE()
* SDL_ReadBE32() => SDL_ReadU32BE()
* SDL_ReadBE64() => SDL_ReadU64BE()
@ -1118,6 +1340,10 @@ The following functions have been renamed:
* SDL_WriteLE32() => SDL_WriteU32LE()
* SDL_WriteLE64() => SDL_WriteU64LE()
The following structures have been renamed:
* SDL_RWops => SDL_IOStream
## SDL_sensor.h
SDL_SensorID has changed from Sint32 to Uint32, with an invalid ID being 0.
@ -1168,7 +1394,7 @@ The following functions have been removed:
## SDL_shape.h
This header has been removed. You can create a window with the SDL_WINDOW_TRANSPARENT flag and then render using the alpha channel to achieve a similar effect. You can see an example of this in test/testshape.c
This header has been removed and a simplified version of this API has been added as SDL_SetWindowShape() in SDL_video.h. See test/testshape.c for an example.
## SDL_stdinc.h
@ -1179,6 +1405,9 @@ M_PI is no longer defined in SDL_stdinc.h, you can use the new symbols SDL_PI_D
The following functions have been renamed:
* SDL_strtokr() => SDL_strtok_r()
The following functions have been removed:
* SDL_memcpy4()
## SDL_surface.h
The userdata member of SDL_Surface has been replaced with a more general properties interface, which can be queried with SDL_GetSurfaceProperties()
@ -1228,6 +1457,8 @@ SDL_BlitSurfaceScaled() and SDL_BlitSurfaceUncheckedScaled() now take a scale pa
SDL_SoftStretch() now takes a scale paramater.
SDL_PixelFormatEnum is used instead of Uint32 for API functions that refer to pixel format by enumerated value.
The following functions have been renamed:
* SDL_FillRect() => SDL_FillSurfaceRect()
* SDL_FillRects() => SDL_FillSurfaceRects()
@ -1236,14 +1467,19 @@ The following functions have been renamed:
* SDL_GetColorKey() => SDL_GetSurfaceColorKey()
* SDL_HasColorKey() => SDL_SurfaceHasColorKey()
* SDL_HasSurfaceRLE() => SDL_SurfaceHasRLE()
* SDL_LoadBMP_RW() => SDL_LoadBMP_IO()
* SDL_LowerBlit() => SDL_BlitSurfaceUnchecked()
* SDL_LowerBlitScaled() => SDL_BlitSurfaceUncheckedScaled()
* SDL_SaveBMP_RW() => SDL_SaveBMP_IO()
* SDL_SetClipRect() => SDL_SetSurfaceClipRect()
* SDL_SetColorKey() => SDL_SetSurfaceColorKey()
* SDL_UpperBlit() => SDL_BlitSurface()
* SDL_UpperBlitScaled() => SDL_BlitSurfaceScaled()
The following functions have been removed:
* SDL_GetYUVConversionMode()
* SDL_GetYUVConversionModeForResolution()
* SDL_SetYUVConversionMode() - use SDL_SetSurfaceColorspace() to set the surface colorspace and SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER with SDL_CreateTextureWithProperties() to set the texture colorspace. The default colorspace for YUV pixel formats is SDL_COLORSPACE_JPEG.
* SDL_SoftStretchLinear() - use SDL_SoftStretch() with SDL_SCALEMODE_LINEAR
## SDL_system.h
@ -1252,6 +1488,8 @@ SDL_WindowsMessageHook has changed signatures so the message may be modified and
SDL_AndroidGetExternalStorageState() takes the state as an output parameter and returns 0 if the function succeeds or a negative error code if there was an error.
SDL_AndroidRequestPermission is no longer a blocking call; the caller now provides a callback function that fires when a response is available.
The following functions have been removed:
* SDL_RenderGetD3D11Device() - replaced with the "SDL.renderer.d3d11.device" property
* SDL_RenderGetD3D12Device() - replaced with the "SDL.renderer.d3d12.device" property
@ -1284,7 +1522,7 @@ The information previously available in SDL_GetWindowWMInfo() is now available a
if (nswindow) {
...
}
#elif defined(__LINUX__)
#elif defined(SDL_PLATFORM_LINUX)
if (SDL_GetWindowWMInfo(window, &info)) {
if (info.subsystem == SDL_SYSWM_X11) {
Display *xdisplay = info.info.x11.display;
@ -1304,26 +1542,26 @@ The information previously available in SDL_GetWindowWMInfo() is now available a
```
becomes:
```c
#if defined(__WIN32__)
HWND hwnd = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_WIN32_HWND_POINTER, NULL);
#if defined(SDL_PLATFORM_WIN32)
HWND hwnd = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
if (hwnd) {
...
}
#elif defined(__MACOS__)
NSWindow *nswindow = (__bridge NSWindow *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_COCOA_WINDOW_POINTER, NULL);
#elif defined(SDL_PLATFORM_MACOS)
NSWindow *nswindow = (__bridge NSWindow *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, NULL);
if (nswindow) {
...
}
#elif defined(__LINUX__)
#elif defined(SDL_PLATFORM_LINUX)
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) {
Display *xdisplay = (Display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_X11_DISPLAY_POINTER, NULL);
Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_X11_WINDOW_NUMBER, 0);
Display *xdisplay = (Display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
if (xdisplay && xwindow) {
...
}
} else if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0) {
struct wl_display *display = (struct wl_display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_WAYLAND_DISPLAY_POINTER, NULL);
struct wl_surface *surface = (struct wl_surface *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_WINDOW_WAYLAND_SURFACE_POINTER, NULL);
struct wl_display *display = (struct wl_display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, NULL);
struct wl_surface *surface = (struct wl_surface *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL);
if (display && surface) {
...
}
@ -1338,6 +1576,10 @@ The following functions have been renamed:
* SDL_TLSCreate() => SDL_CreateTLS()
* SDL_TLSGet() => SDL_GetTLS()
* SDL_TLSSet() => SDL_SetTLS()
* SDL_ThreadID() => SDL_GetCurrentThreadID()
The following symbols have been renamed:
* SDL_threadID => SDL_ThreadID
## SDL_timer.h
@ -1369,6 +1611,8 @@ SDL_GetNumTouchFingers() returns a negative error code if there was an error.
SDL_GetTouchName is replaced with SDL_GetTouchDeviceName(), which takes an SDL_TouchID instead of an index.
SDL_TouchID and SDL_FingerID are now Uint64 with 0 being an invalid value.
The following functions have been removed:
* SDL_GetNumTouchDevices() - replaced with SDL_GetTouchDevices()
* SDL_GetTouchDevice() - replaced with SDL_GetTouchDevices()
@ -1379,8 +1623,13 @@ The following functions have been removed:
SDL_GetRevisionNumber() has been removed from the API, it always returned 0 in SDL 2.0.
The following structures have been renamed:
* SDL_version => SDL_Version
## SDL_video.h
Several video backends have had their names lower-cased ("kmsdrm", "rpi", "android", "psp", "ps2", "vita"). SDL already does a case-insensitive compare for SDL_HINT_VIDEO_DRIVER tests, but if your app is calling SDL_GetVideoDriver() or SDL_GetCurrentVideoDriver() and doing case-sensitive compares on those strings, please update your code.
SDL_VideoInit() and SDL_VideoQuit() have been removed. Instead you can call SDL_InitSubSystem() and SDL_QuitSubSystem() with SDL_INIT_VIDEO, which will properly refcount the subsystems. You can choose a specific video driver using SDL_VIDEO_DRIVER hint.
Rather than iterating over displays using display index, there is a new function SDL_GetDisplays() to get the current list of displays, and functions which used to take a display index now take SDL_DisplayID, with an invalid ID being 0.
@ -1406,11 +1655,11 @@ Rather than iterating over displays using display index, there is a new function
SDL_CreateWindow() has been simplified and no longer takes a window position. You can use SDL_CreateWindowWithProperties() if you need to set the window position when creating it, e.g.
```c
SDL_PropertiesID props = SDL_CreateProperties();
SDL_SetStringProperty(props, SDL_PROPERTY_WINDOW_CREATE_TITLE_STRING, title);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_X_NUMBER, x);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_Y_NUMBER, y);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_WIDTH_NUMBER, width);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_HEIGHT_NUMBER, height);
SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING, title);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_X_NUMBER, x);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_Y_NUMBER, y);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, width);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, height);
SDL_SetNumberProperty(props, "flags", flags);
pWindow = SDL_CreateWindowWithProperties(props);
SDL_DestroyProperties(props);
@ -1450,7 +1699,7 @@ SDL_GetDesktopDisplayMode() and SDL_GetCurrentDisplayMode() return pointers to d
Windows now have an explicit fullscreen mode that is set, using SDL_SetWindowFullscreenMode(). The fullscreen mode for a window can be queried with SDL_GetWindowFullscreenMode(), which returns a pointer to the mode, or NULL if the window will be fullscreen desktop. SDL_SetWindowFullscreen() just takes a boolean value, setting the correct fullscreen state based on the selected mode.
SDL_WINDOW_FULLSCREEN_DESKTOP has been removed, and you can call SDL_GetWindowFullscreenMode() to see whether an exclusive fullscreen mode will be used or the fullscreen desktop mode will be used when the window is fullscreen.
SDL_WINDOW_FULLSCREEN_DESKTOP has been removed, and you can call SDL_GetWindowFullscreenMode() to see whether an exclusive fullscreen mode will be used or the borderless fullscreen desktop mode will be used when the window is fullscreen.
SDL_SetWindowBrightness and SDL_SetWindowGammaRamp have been removed from the API, because they interact poorly with modern operating systems and aren't able to limit their effects to the SDL window.
@ -1466,8 +1715,13 @@ SDL_GL_GetSwapInterval() takes the interval as an output parameter and returns 0
SDL_GL_GetDrawableSize() has been removed. SDL_GetWindowSizeInPixels() can be used in its place.
SDL_SetWindowGrab() and SDL_GetWindowGrab() have been removed. Use SDL_SetWindowMouseGrab()/SDL_GetWindowMouseGrab() or SDL_SetWindowKeyboardGrab()/SDL_GetWindowKeyboardGrab() for grabbing mouse and/or keyboard input respectively.
The SDL_WINDOW_TOOLTIP and SDL_WINDOW_POPUP_MENU window flags are now supported on Windows, Mac (Cocoa), X11, and Wayland. Creating windows with these flags must happen via the `SDL_CreatePopupWindow()` function. This function requires passing in the handle to a valid parent window for the popup, and the popup window is positioned relative to the parent.
SDL_WindowFlags is used instead of Uint32 for API functions that refer to window flags.
The following functions have been renamed:
* SDL_GetClosestDisplayMode() => SDL_GetClosestFullscreenDisplayMode()
* SDL_GetDisplayOrientation() => SDL_GetCurrentDisplayOrientation()
@ -1475,12 +1729,13 @@ The following functions have been renamed:
* SDL_GetRectDisplayIndex() => SDL_GetDisplayForRect()
* SDL_GetWindowDisplayIndex() => SDL_GetDisplayForWindow()
* SDL_GetWindowDisplayMode() => SDL_GetWindowFullscreenMode()
* SDL_HasWindowSurface() => SDL_WindowHasSurface()
* SDL_IsScreenSaverEnabled() => SDL_ScreenSaverEnabled()
* SDL_SetWindowDisplayMode() => SDL_SetWindowFullscreenMode()
The following functions have been removed:
* SDL_GetClosestFullscreenDisplayMode()
* SDL_GetDisplayDPI() - not reliable across platforms, approximately replaced by multiplying `display_scale` in the structure returned by SDL_GetDesktopDisplayMode() times 160 on iPhone and Android, and 96 on other platforms.
* SDL_GetDisplayDPI() - not reliable across platforms, approximately replaced by multiplying SDL_GetWindowDisplayScale() times 160 on iPhone and Android, and 96 on other platforms.
* SDL_GetDisplayMode()
* SDL_GetNumDisplayModes() - replaced with SDL_GetFullscreenDisplayModes()
* SDL_GetNumVideoDisplays() - replaced with SDL_GetDisplays()
@ -1489,7 +1744,6 @@ The following functions have been removed:
* SDL_CreateWindowFrom() - use SDL_CreateWindowWithProperties() with the properties that allow you to wrap an existing window
The SDL_Window id type is named SDL_WindowID
The SDL_WindowFlags enum should be replaced with Uint32
The following symbols have been renamed:
* SDL_WINDOW_ALLOW_HIGHDPI => SDL_WINDOW_HIGH_PIXEL_DENSITY

View File

@ -17,7 +17,7 @@ cmake --install build
```
## Hints
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC`.
If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of dropping FPS to 30.
## Notes

View File

@ -6,6 +6,14 @@ encounter limitations or behavior that is different from other windowing systems
## Common issues:
### Legacy, DPI-unaware applications are blurry
- Wayland handles high-DPI displays by scaling the desktop, which causes applications that are not designed to be
DPI-aware to be automatically scaled by the window manager, which results in them being blurry. SDL can _attempt_ to
scale these applications such that they will be output with a 1:1 pixel aspect, however this may be buggy, especially
with odd-sized windows and/or scale factors that aren't quarter-increments (125%, 150%, etc...). To enable this, set
the environment variable `SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY=1`
### Window decorations are missing, or the decorations look strange
- On some desktops (i.e. GNOME), Wayland applications use a library
@ -52,15 +60,15 @@ having SDL handle input and rendering, it needs to create a custom, roleless sur
toplevel window.
This is done by using `SDL_CreateWindowWithProperties()` and setting the
`SDL_PROPERTY_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN` property to `SDL_TRUE`. Once the window has been
`SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN` property to `SDL_TRUE`. Once the window has been
successfully created, the `wl_display` and `wl_surface` objects can then be retrieved from the
`SDL_PROPERTY_WINDOW_WAYLAND_DISPLAY_POINTER` and `SDL_PROPERTY_WINDOW_WAYLAND_SURFACE_POINTER` properties respectively.
`SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER` and `SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER` properties respectively.
Surfaces don't receive any size change notifications, so if an application changes the window size, it must inform SDL
that the surface size has changed by calling SDL_SetWindowSize() with the new dimensions.
Custom surfaces will automatically handle scaling internally if the window was created with the
`SDL_PROPERTY_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN` property set to `SDL_TRUE`. In this case, applications should
`SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN` property set to `SDL_TRUE`. In this case, applications should
not manually attach viewports or change the surface scale value, as SDL will handle this internally. Calls
to `SDL_SetWindowSize()` should use the logical size of the window, and `SDL_GetWindowSizeInPixels()` should be used to
query the size of the backbuffer surface in pixels. If this property is not set or is `SDL_FALSE`, applications can
@ -77,7 +85,7 @@ and attach it to an application-managed toplevel window.
Wayland windows and surfaces are more intrinsically tied to the client library than other windowing systems, therefore,
when importing surfaces, it is necessary for both SDL and the application or toolkit to use the same `wl_display`
object. This can be set/queried via the global `SDL_PROPERTY_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER` property. To
object. This can be set/queried via the global `SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER` property. To
import an external `wl_display`, set this property before initializing the SDL video subsystem, and read the value to
export the internal `wl_display` after the video subsystem has been initialized. Setting this property after the video
subsystem has been initialized has no effect, and reading it when the video subsystem is uninitialized will either
@ -85,14 +93,14 @@ return the user provided value, if one was set while in the uninitialized state,
Once this is done, and the application has created or obtained the `wl_surface` to be wrapped in an `SDL_Window`, the
window is created with `SDL_CreateWindowWithProperties()` with the
`SDL_PROPERTY_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER` property to set to the `wl_surface` object that is to be
`SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER` property to set to the `wl_surface` object that is to be
imported by SDL.
SDL receives no notification regarding size changes on external surfaces or toplevel windows, so if the external surface
needs to be resized, SDL must be informed by calling SDL_SetWindowSize() with the new dimensions.
If desired, SDL can automatically handle the scaling for the surface by setting the
`SDL_PROPERTY_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN` property to `SDL_TRUE`, however, if the surface being imported
`SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN` property to `SDL_TRUE`, however, if the surface being imported
already has, or will have, a viewport/fractional scale manager attached to it by the application or an external toolkit,
a protocol violation will result. Avoid setting this property if importing surfaces from toolkits such as Qt or GTK.
@ -144,7 +152,7 @@ int main(int argc, char *argv[])
}
/* Set SDL to use the existing wl_display object from Qt and initialize. */
SDL_SetProperty(SDL_GetGlobalProperties(), SDL_PROPERTY_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER, display);
SDL_SetProperty(SDL_GetGlobalProperties(), SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER, display);
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
/* Create a basic, frameless QWindow */
@ -166,10 +174,10 @@ int main(int argc, char *argv[])
* Qt objects should not be flagged as DPI-aware or protocol violations will result.
*/
props = SDL_CreateProperties();
SDL_SetProperty(props, SDL_PROPERTY_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER, surface);
SDL_SetBooleanProperty(props, SDL_PROPERTY_WINDOW_CREATE_OPENGL_BOOLEAN, SDL_TRUE);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_WIDTH_NUMBER, 640);
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_HEIGHT_NUMBER, 480);
SDL_SetProperty(props, SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER, surface);
SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, SDL_TRUE);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, 640);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, 480);
sdlWindow = SDL_CreateWindowWithProperties(props);
SDL_DestroyProperties(props);
if (!sdlWindow) {

View File

@ -33,7 +33,7 @@ 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,
`__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
`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
@ -42,7 +42,7 @@ Here is a rough list of what works, and what doesn't:
* threads
* timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(),
SDL_GetPerformanceFrequency(), etc.)
* file I/O via SDL_RWops
* 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

View File

@ -4,9 +4,8 @@ https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
hardware. It is used by video playback software, emulators, and popular games
including Valve's award winning catalog and many Humble Bundle games.
SDL officially supports Windows, macOS, Linux, iOS, and Android.
Support for other platforms may be found in the source code.
@ -17,32 +16,40 @@ available for several other languages, including C# and Python.
This library is distributed under the zlib license, which can be found
in the file "LICENSE.txt".
Information on building SDL with CMake is available in [README-cmake.md](README-cmake.md)
The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
Information on reporting bugs and contributing is available in [README-contributing.md](README-contributing.md)
More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
- [Android](README-android.md)
- [CMake](README-cmake.md)
- [DynAPI](README-dynapi.md)
- [Emscripten](README-emscripten.md)
- [GDK](README-gdk.md)
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)
- [macOS](README-macos.md)
- [Supported Platforms](README-platforms.md)
- [High DPI Support](README-highdpi.md)
- [main()](README-main-functions.md)
- [Porting information](README-porting.md)
- [PSP](README-psp.md)
- [PS2](README-ps2.md)
- [Raspberry Pi](README-raspberrypi.md)
- [Migrating from SDL 2.0](README-migration.md)
- [Supported Platforms](README-platforms.md)
- [Touch](README-touch.md)
- [Versions](README-versions.md)
- [Windows](README-windows.md)
- [WinRT](README-winrt.md)
- [Visual Studio](README-visualc.md)
- [Android](README-android.md)
- [Emscripten](README-emscripten.md)
- [iOS](README-ios.md)
- [KMSDRM support on BSD](README-kmsbsd.md)
- [Linux](README-linux.md)
- [macOS](README-macos.md)
- [Nintendo 3DS](README-n3ds.md)
- [PS2](README-ps2.md)
- [PSP](README-psp.md)
- [PSVita](README-vita.md)
- [Nokia N-Gage](README-ngage.md)
- [Raspberry Pi](README-raspberrypi.md)
- [RISC OS](README-riscos.md)
- [Windows GDK](README-gdk.md)
- [Windows UWP](README-winrt.md)
- [Windows](README-windows.md)
If you need help with the library, or just want to discuss SDL related
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),

View File

@ -35,8 +35,10 @@
#include <SDL3/SDL_audio.h>
#include <SDL3/SDL_bits.h>
#include <SDL3/SDL_blendmode.h>
#include <SDL3/SDL_camera.h>
#include <SDL3/SDL_clipboard.h>
#include <SDL3/SDL_cpuinfo.h>
#include <SDL3/SDL_dialog.h>
#include <SDL3/SDL_endian.h>
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_events.h>
@ -66,17 +68,18 @@
#include <SDL3/SDL_quit.h>
#include <SDL3/SDL_rect.h>
#include <SDL3/SDL_render.h>
#include <SDL3/SDL_rwops.h>
#include <SDL3/SDL_iostream.h>
#include <SDL3/SDL_scancode.h>
#include <SDL3/SDL_sensor.h>
#include <SDL3/SDL_storage.h>
#include <SDL3/SDL_surface.h>
#include <SDL3/SDL_system.h>
#include <SDL3/SDL_thread.h>
#include <SDL3/SDL_time.h>
#include <SDL3/SDL_timer.h>
#include <SDL3/SDL_touch.h>
#include <SDL3/SDL_version.h>
#include <SDL3/SDL_video.h>
#include "SDL3/SDL_video_capture.h"
#include <SDL3/SDL_oldnames.h>
#endif /* SDL_h_ */

View File

@ -66,9 +66,9 @@ assert can have unique static variables associated with it.
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
#elif ( defined(SDL_PLATFORM_APPLE) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
#elif defined(__APPLE__) && defined(__arm__)
#elif defined(SDL_PLATFORM_APPLE) && defined(__arm__)
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
#elif defined(__386__) && defined(__WATCOMC__)
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }

View File

@ -31,8 +31,8 @@
* with full mutexes.
*
* The list of "safe" functions to use are:
* SDL_AtomicLock()
* SDL_AtomicUnlock()
* SDL_LockSpinlock()
* SDL_UnlockSpinlock()
* SDL_AtomicIncRef()
* SDL_AtomicDecRef()
*
@ -105,10 +105,10 @@ typedef int SDL_SpinLock;
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicLock
* \sa SDL_AtomicUnlock
* \sa SDL_LockSpinlock
* \sa SDL_UnlockSpinlock
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
extern DECLSPEC SDL_bool SDLCALL SDL_TryLockSpinlock(SDL_SpinLock *lock);
/**
* Lock a spin lock by setting it to a non-zero value.
@ -120,10 +120,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicTryLock
* \sa SDL_AtomicUnlock
* \sa SDL_TryLockSpinlock
* \sa SDL_UnlockSpinlock
*/
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
extern DECLSPEC void SDLCALL SDL_LockSpinlock(SDL_SpinLock *lock);
/**
* Unlock a spin lock by setting it to 0.
@ -137,10 +137,10 @@ extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicLock
* \sa SDL_AtomicTryLock
* \sa SDL_LockSpinlock
* \sa SDL_TryLockSpinlock
*/
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
extern DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock);
/* @} *//* SDL AtomicLock */
@ -153,7 +153,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
#define SDL_CompilerBarrier() _ReadWriteBarrier()
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
#elif (defined(__GNUC__) && !defined(SDL_PLATFORM_EMSCRIPTEN)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
#elif defined(__WATCOMC__)
@ -161,7 +161,7 @@ extern __inline void SDL_CompilerBarrier(void);
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
#else
#define SDL_CompilerBarrier() \
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); SDL_UnlockSpinlock(&_tmp); }
#endif
/**
@ -199,7 +199,7 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__)
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
/* Information from:
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
@ -226,7 +226,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
#else
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
#endif /* __LINUX__ || __ANDROID__ */
#endif /* SDL_PLATFORM_LINUX || SDL_PLATFORM_ANDROID */
#endif /* __GNUC__ && __arm__ */
#else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
@ -267,7 +267,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
*
* It is a struct so people don't accidentally use numeric operations on it.
*/
typedef struct { int value; } SDL_AtomicInt;
typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt;
/**
* Set an atomic variable to a new value if it is currently an old value.
@ -282,11 +282,9 @@ typedef struct { int value; } SDL_AtomicInt;
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicGet
* \sa SDL_AtomicSet
* \sa SDL_AtomicCompareAndSwapPointer
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_AtomicInt *a, int oldval, int newval);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareAndSwap(SDL_AtomicInt *a, int oldval, int newval);
/**
* Set an atomic variable to a value.
@ -370,11 +368,11 @@ extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_AtomicInt *a, int v);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicCAS
* \sa SDL_AtomicCompareAndSwap
* \sa SDL_AtomicGetPtr
* \sa SDL_AtomicSetPtr
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareAndSwapPointer(void **a, void *oldval, void *newval);
/**
* Set a pointer to a value atomically.
@ -388,7 +386,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicCompareAndSwapPointer
* \sa SDL_AtomicGetPtr
*/
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
@ -404,7 +402,7 @@ extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicCompareAndSwapPointer
* \sa SDL_AtomicSetPtr
*/
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);

View File

@ -33,7 +33,7 @@
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_mutex.h>
#include <SDL3/SDL_properties.h>
#include <SDL3/SDL_rwops.h>
#include <SDL3/SDL_iostream.h>
#include <SDL3/SDL_thread.h>
#include <SDL3/SDL_begin_code.h>
@ -561,7 +561,6 @@ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_BindAudioStreams
* \sa SDL_UnbindAudioStreams
* \sa SDL_UnbindAudioStream
* \sa SDL_GetAudioStreamDevice
*/
@ -583,7 +582,6 @@ extern DECLSPEC int SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_Au
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_BindAudioStreams
* \sa SDL_UnbindAudioStreams
* \sa SDL_UnbindAudioStream
* \sa SDL_GetAudioStreamDevice
*/
@ -607,9 +605,6 @@ extern DECLSPEC int SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_Aud
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_BindAudioStreams
* \sa SDL_BindAudioStream
* \sa SDL_UnbindAudioStream
* \sa SDL_GetAudioStreamDevice
*/
extern DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream **streams, int num_streams);
@ -626,9 +621,6 @@ extern DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream **streams, i
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_BindAudioStream
* \sa SDL_BindAudioStreams
* \sa SDL_UnbindAudioStreams
* \sa SDL_GetAudioStreamDevice
*/
extern DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
@ -649,8 +641,6 @@ extern DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
*
* \sa SDL_BindAudioStream
* \sa SDL_BindAudioStreams
* \sa SDL_UnbindAudioStream
* \sa SDL_UnbindAudioStreams
*/
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStream *stream);
@ -727,9 +717,6 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *stream,
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetAudioStreamFormat
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_SetAudioStreamFrequencyRatio
*/
extern DECLSPEC int SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *stream,
@ -801,12 +788,10 @@ extern DECLSPEC int SDLCALL SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *st
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_FlushAudioStream
* \sa SDL_ClearAudioStream
* \sa SDL_DestroyAudioStream
* \sa SDL_FlushAudioStream
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamQueued
*/
extern DECLSPEC int SDLCALL SDL_PutAudioStreamData(SDL_AudioStream *stream, const void *buf, int len);
@ -833,13 +818,9 @@ extern DECLSPEC int SDLCALL SDL_PutAudioStreamData(SDL_AudioStream *stream, cons
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_SetAudioStreamFormat
* \sa SDL_FlushAudioStream
* \sa SDL_ClearAudioStream
* \sa SDL_DestroyAudioStream
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_PutAudioStreamData
*/
extern DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream, void *buf, int len);
@ -863,12 +844,8 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream, void
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_FlushAudioStream
* \sa SDL_ClearAudioStream
* \sa SDL_DestroyAudioStream
* \sa SDL_PutAudioStreamData
*/
extern DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *stream);
@ -900,7 +877,6 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *stream)
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_ClearAudioStream
*/
extern DECLSPEC int SDLCALL SDL_GetAudioStreamQueued(SDL_AudioStream *stream);
@ -922,12 +898,7 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamQueued(SDL_AudioStream *stream);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_ClearAudioStream
* \sa SDL_DestroyAudioStream
*/
extern DECLSPEC int SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
@ -942,12 +913,10 @@ extern DECLSPEC int SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_FlushAudioStream
* \sa SDL_DestroyAudioStream
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamQueued
* \sa SDL_PutAudioStreamData
*/
extern DECLSPEC int SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
@ -976,8 +945,6 @@ extern DECLSPEC int SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_UnlockAudioStream
* \sa SDL_SetAudioStreamPutCallback
* \sa SDL_SetAudioStreamGetCallback
*/
extern DECLSPEC int SDLCALL SDL_LockAudioStream(SDL_AudioStream *stream);
@ -997,8 +964,6 @@ extern DECLSPEC int SDLCALL SDL_LockAudioStream(SDL_AudioStream *stream);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_LockAudioStream
* \sa SDL_SetAudioStreamPutCallback
* \sa SDL_SetAudioStreamGetCallback
*/
extern DECLSPEC int SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
@ -1134,11 +1099,6 @@ extern DECLSPEC int SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream *strea
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
* \sa SDL_PutAudioStreamData
* \sa SDL_GetAudioStreamData
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_FlushAudioStream
* \sa SDL_ClearAudioStream
*/
extern DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream);
@ -1306,7 +1266,7 @@ extern DECLSPEC int SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid,
* Example:
*
* ```c
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
* SDL_LoadWAV_IO(SDL_IOFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
* ```
*
* Note that the SDL_LoadWAV function does this same thing for you, but in a
@ -1317,7 +1277,7 @@ extern DECLSPEC int SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid,
* ```
*
* \param src The data source for the WAVE data
* \param freesrc If SDL_TRUE, calls SDL_RWclose() on `src` before returning,
* \param closeio If SDL_TRUE, calls SDL_CloseIO() on `src` before returning,
* even in the case of an error
* \param spec A pointer to an SDL_AudioSpec that will be set to the WAVE
* data's format details on successful return
@ -1344,7 +1304,7 @@ extern DECLSPEC int SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid,
* \sa SDL_free
* \sa SDL_LoadWAV
*/
extern DECLSPEC int SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, SDL_bool freesrc,
extern DECLSPEC int SDLCALL SDL_LoadWAV_IO(SDL_IOStream * src, SDL_bool closeio,
SDL_AudioSpec * spec, Uint8 ** audio_buf,
Uint32 * audio_len);
@ -1354,7 +1314,7 @@ extern DECLSPEC int SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, SDL_bool freesrc,
* This is a convenience function that is effectively the same as:
*
* ```c
* SDL_LoadWAV_RW(SDL_RWFromFile(path, "rb"), 1, spec, audio_buf, audio_len);
* SDL_LoadWAV_IO(SDL_IOFromFile(path, "rb"), 1, spec, audio_buf, audio_len);
* ```
*
* Note that in SDL2, this was a preprocessor macro and not a real function.
@ -1383,7 +1343,7 @@ extern DECLSPEC int SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, SDL_bool freesrc,
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_free
* \sa SDL_LoadWAV_RW
* \sa SDL_LoadWAV_IO
*/
extern DECLSPEC int SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec * spec,
Uint8 ** audio_buf, Uint32 * audio_len);
@ -1458,8 +1418,6 @@ extern DECLSPEC int SDLCALL SDL_MixAudioFormat(Uint8 * dst,
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateAudioStream
*/
extern DECLSPEC int SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec,
const Uint8 *src_data,

View File

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

View File

@ -65,8 +65,8 @@ typedef enum
typedef enum
{
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
} SDL_BlendOperation;

View File

@ -0,0 +1,478 @@
/*
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.
*/
/**
* \file SDL_camera.h
*
* Video Capture for the SDL library.
*/
#ifndef SDL_camera_h_
#define SDL_camera_h_
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* This is a unique ID for a camera device for the time it is connected to the system,
* and is never reused for the lifetime of the application. If the device is
* disconnected and reconnected, it will get a new ID.
*
* The ID value starts at 1 and increments from there. The value 0 is an invalid ID.
*
* \sa SDL_GetCameraDevices
*/
typedef Uint32 SDL_CameraDeviceID;
/**
* The structure used to identify an opened SDL camera
*/
struct SDL_Camera;
typedef struct SDL_Camera SDL_Camera;
/**
* SDL_CameraSpec structure
*
* \sa SDL_GetCameraDeviceSupportedFormats
* \sa SDL_GetCameraFormat
*
*/
typedef struct SDL_CameraSpec
{
SDL_PixelFormatEnum format; /**< Frame format */
int width; /**< Frame width */
int height; /**< Frame height */
int interval_numerator; /**< Frame rate numerator ((dom / num) == fps, (num / dom) == duration) */
int interval_denominator; /**< Frame rate demoninator ((dom / num) == fps, (num / dom) == duration) */
} SDL_CameraSpec;
/**
* The position of camera in relation to system device.
*
* \sa SDL_GetCameraDevicePosition
*/
typedef enum SDL_CameraPosition
{
SDL_CAMERA_POSITION_UNKNOWN,
SDL_CAMERA_POSITION_FRONT_FACING,
SDL_CAMERA_POSITION_BACK_FACING
} SDL_CameraPosition;
/**
* Use this function to get the number of built-in camera drivers.
*
* This function returns a hardcoded number. This never returns a negative
* value; if there are no drivers compiled into this build of SDL, this
* function returns zero. The presence of a driver in this list does not mean
* it will function, it just means SDL is capable of interacting with that
* interface. For example, a build of SDL might have v4l2 support, but if
* there's no kernel support available, SDL's v4l2 driver would fail if used.
*
* By default, SDL tries all drivers, in its preferred order, until one is
* found to be usable.
*
* \returns the number of built-in camera drivers.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetCameraDriver
*/
extern DECLSPEC int SDLCALL SDL_GetNumCameraDrivers(void);
/**
* Use this function to get the name of a built in camera driver.
*
* The list of camera drivers is given in the order that they are normally
* initialized by default; the drivers that seem more reasonable to choose
* first (as far as the SDL developers believe) are earlier in the list.
*
* The names of drivers are all simple, low-ASCII identifiers, like "v4l2",
* "coremedia" or "android". These never have Unicode characters, and are not
* meant to be proper names.
*
* \param index the index of the camera driver; the value ranges from 0 to
* SDL_GetNumCameraDrivers() - 1
* \returns the name of the camera driver at the requested index, or NULL if
* an invalid index was specified.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetNumCameraDrivers
*/
extern DECLSPEC const char *SDLCALL SDL_GetCameraDriver(int index);
/**
* Get the name of the current camera driver.
*
* The returned string points to internal static memory and thus never becomes
* invalid, even if you quit the camera subsystem and initialize a new driver
* (although such a case would return a different static string from another
* call to this function, of course). As such, you should not modify or free
* the returned string.
*
* \returns the name of the current camera driver or NULL if no driver has
* been initialized.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC const char *SDLCALL SDL_GetCurrentCameraDriver(void);
/**
* Get a list of currently connected camera devices.
*
* \param count a pointer filled in with the number of camera devices. Can be
* NULL.
* \returns a 0 terminated array of camera instance IDs which should be freed
* with SDL_free(), or NULL on error; call SDL_GetError() for more
* details.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenCamera
*/
extern DECLSPEC SDL_CameraDeviceID *SDLCALL SDL_GetCameraDevices(int *count);
/**
* Get the list of native formats/sizes a camera supports.
*
* This returns a list of all formats and frame sizes that a specific camera
* can offer. This is useful if your app can accept a variety of image formats
* and sizes and so want to find the optimal spec that doesn't require
* conversion.
*
* This function isn't strictly required; if you call SDL_OpenCameraDevice
* with a NULL spec, SDL will choose a native format for you, and if you
* instead specify a desired format, it will transparently convert to the
* requested format on your behalf.
*
* If `count` is not NULL, it will be filled with the number of elements in
* the returned array. Additionally, the last element of the array has all
* fields set to zero (this element is not included in `count`).
*
* The returned list is owned by the caller, and should be released with
* SDL_free() when no longer needed.
*
* Note that it's legal for a camera to supply a list with only the zeroed
* final element and `*count` set to zero; this is what will happen on
* Emscripten builds, since that platform won't tell _anything_ about
* available cameras until you've opened one, and won't even tell if there
* _is_ a camera until the user has given you permission to check through a
* scary warning popup.
*
* \param devid the camera device instance ID to query.
* \param count a pointer filled in with the number of elements in the list.
* Can be NULL.
* \returns a 0 terminated array of SDL_CameraSpecs, which should be freed
* with SDL_free(), or NULL on error; call SDL_GetError() for more
* details.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetCameraDevices
* \sa SDL_OpenCameraDevice
*/
extern DECLSPEC SDL_CameraSpec *SDLCALL SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid, int *count);
/**
* Get human-readable device name for a camera.
*
* The returned string is owned by the caller; please release it with
* SDL_free() when done with it.
*
* \param instance_id the camera device instance ID
* \returns Human-readable device name, or NULL on error; call SDL_GetError()
* for more information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetCameraDevices
*/
extern DECLSPEC char * SDLCALL SDL_GetCameraDeviceName(SDL_CameraDeviceID instance_id);
/**
* Get the position of the camera in relation to the system.
*
* Most platforms will report UNKNOWN, but mobile devices, like phones, can
* often make a distiction between cameras on the front of the device (that
* points towards the user, for taking "selfies") and cameras on the back (for
* filming in the direction the user is facing).
*
* \param instance_id the camera device instance ID
* \returns The position of the camera on the system hardware.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetCameraDevices
*/
extern DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraDevicePosition(SDL_CameraDeviceID instance_id);
/**
* Open a video capture device (a "camera").
*
* You can open the device with any reasonable spec, and if the hardware can't
* directly support it, it will convert data seamlessly to the requested
* format. This might incur overhead, including scaling of image data.
*
* If you would rather accept whatever format the device offers, you can pass
* a NULL spec here and it will choose one for you (and you can use
* SDL_Surface's conversion/scaling functions directly if necessary).
*
* You can call SDL_GetCameraFormat() to get the actual data format if passing
* a NULL spec here. You can see the exact specs a device can support without
* conversion with SDL_GetCameraSupportedSpecs().
*
* SDL will not attempt to emulate framerate; it will try to set the hardware
* to the rate closest to the requested speed, but it won't attempt to limit
* or duplicate frames artificially; call SDL_GetCameraFormat() to see the
* actual framerate of the opened the device, and check your timestamps if
* this is crucial to your app!
*
* Note that the camera is not usable until the user approves its use! On some
* platforms, the operating system will prompt the user to permit access to
* the camera, and they can choose Yes or No at that point. Until they do, the
* camera will not be usable. The app should either wait for an
* SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event,
* or poll SDL_IsCameraApproved() occasionally until it returns non-zero. On
* platforms that don't require explicit user approval (and perhaps in places
* where the user previously permitted access), the approval event might come
* immediately, but it might come seconds, minutes, or hours later!
*
* \param instance_id the camera device instance ID
* \param spec The desired format for data the device will provide. Can be
* NULL.
* \returns device, or NULL on failure; call SDL_GetError() for more
* information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetCameraDevices
* \sa SDL_GetCameraFormat
*/
extern DECLSPEC SDL_Camera *SDLCALL SDL_OpenCameraDevice(SDL_CameraDeviceID instance_id, const SDL_CameraSpec *spec);
/**
* Query if camera access has been approved by the user.
*
* Cameras will not function between when the device is opened by the app and
* when the user permits access to the hardware. On some platforms, this
* presents as a popup dialog where the user has to explicitly approve access;
* on others the approval might be implicit and not alert the user at all.
*
* This function can be used to check the status of that approval. It will
* return 0 if still waiting for user response, 1 if the camera is approved
* for use, and -1 if the user denied access.
*
* Instead of polling with this function, you can wait for a
* SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event
* in the standard SDL event loop, which is guaranteed to be sent once when
* permission to use the camera is decided.
*
* If a camera is declined, there's nothing to be done but call
* SDL_CloseCamera() to dispose of it.
*
* \param camera the opened camera device to query
* \returns -1 if user denied access to the camera, 1 if user approved access,
* 0 if no decision has been made yet.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenCameraDevice
* \sa SDL_CloseCamera
*/
extern DECLSPEC int SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera);
/**
* Get the instance ID of an opened camera.
*
* \param camera an SDL_Camera to query
* \returns the instance ID of the specified camera on success or 0 on
* failure; call SDL_GetError() for more information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenCameraDevice
*/
extern DECLSPEC SDL_CameraDeviceID SDLCALL SDL_GetCameraInstanceID(SDL_Camera *camera);
/**
* Get the properties associated with an opened camera.
*
* \param camera the SDL_Camera obtained from SDL_OpenCameraDevice()
* \returns a valid property ID on success or 0 on failure; call
* SDL_GetError() for more information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetProperty
* \sa SDL_SetProperty
*/
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera);
/**
* Get the spec that a camera is using when generating images.
*
* Note that this might not be the native format of the hardware, as SDL might
* be converting to this format behind the scenes.
*
* If the system is waiting for the user to approve access to the camera, as
* some platforms require, this will return -1, but this isn't necessarily a
* fatal error; you should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED
* (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_IsCameraApproved()
* occasionally until it returns non-zero.
*
* \param camera opened camera device
* \param spec The SDL_CameraSpec to be initialized by this function.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenCameraDevice
*/
extern DECLSPEC int SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_CameraSpec *spec);
/**
* Acquire a frame.
*
* The frame is a memory pointer to the image data, whose size and format are
* given by the spec requested when opening the device.
*
* This is a non blocking API. If there is a frame available, a non-NULL
* surface is returned, and timestampNS will be filled with a non-zero value.
*
* Note that an error case can also return NULL, but a NULL by itself is
* normal and just signifies that a new frame is not yet available. Note that
* even if a camera device fails outright (a USB camera is unplugged while in
* use, etc), SDL will send an event separately to notify the app, but
* continue to provide blank frames at ongoing intervals until
* SDL_CloseCamera() is called, so real failure here is almost always an out
* of memory condition.
*
* After use, the frame should be released with SDL_ReleaseCameraFrame(). If
* you don't do this, the system may stop providing more video!
*
* Do not call SDL_FreeSurface() on the returned surface! It must be given
* back to the camera subsystem with SDL_ReleaseCameraFrame!
*
* If the system is waiting for the user to approve access to the camera, as
* some platforms require, this will return NULL (no frames available); you
* should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or
* SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_IsCameraApproved()
* occasionally until it returns non-zero.
*
* \param camera opened camera device
* \param timestampNS a pointer filled in with the frame's timestamp, or 0 on
* error. Can be NULL.
* \returns A new frame of video on success, NULL if none is currently
* available.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_ReleaseCameraFrame
*/
extern DECLSPEC SDL_Surface * SDLCALL SDL_AcquireCameraFrame(SDL_Camera *camera, Uint64 *timestampNS);
/**
* Release a frame of video acquired from a camera.
*
* Let the back-end re-use the internal buffer for camera.
*
* This function _must_ be called only on surface objects returned by
* SDL_AcquireCameraFrame(). This function should be called as quickly as
* possible after acquisition, as SDL keeps a small FIFO queue of surfaces for
* video frames; if surfaces aren't released in a timely manner, SDL may drop
* upcoming video frames from the camera.
*
* If the app needs to keep the surface for a significant time, they should
* make a copy of it and release the original.
*
* The app should not use the surface again after calling this function;
* assume the surface is freed and the pointer is invalid.
*
* \param camera opened camera device
* \param frame The video frame surface to release.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AcquireCameraFrame
*/
extern DECLSPEC int SDLCALL SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_Surface *frame);
/**
* Use this function to shut down camera processing and close the camera
* device.
*
* \param camera opened camera device
*
* \threadsafety It is safe to call this function from any thread, but no
* thread may reference `device` once this function is called.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenCameraWithSpec
* \sa SDL_OpenCamera
*/
extern DECLSPEC void SDLCALL SDL_CloseCamera(SDL_Camera *camera);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_camera_h_ */

View File

@ -187,8 +187,7 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_ClipboardDataCallback
* \sa SDL_SetClipboardData
* \sa SDL_ClearClipboardData
* \sa SDL_GetClipboardData
* \sa SDL_HasClipboardData
*/

View File

@ -75,16 +75,6 @@ extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
@ -96,16 +86,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
@ -118,11 +98,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
@ -139,11 +114,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
@ -160,11 +130,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE41
@ -181,11 +146,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
@ -202,11 +162,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
@ -223,15 +178,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
@ -244,15 +192,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX512F
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
@ -265,15 +206,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);

View File

@ -0,0 +1,213 @@
/*
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_dialog_h_
#define SDL_dialog_h_
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* An entry for filters for file dialogs.
*
* `name` is a user-readable label for the filter (for example, "Office document").
*
* `pattern` is a semicolon-separated list of file extensions (for example,
* "doc;docx").
*
* \sa SDL_DialogFileCallback
* \sa SDL_ShowOpenFileDialog
* \sa SDL_ShowSaveFileDialog
* \sa SDL_ShowOpenFolderDialog
*/
typedef struct
{
const char *name;
const char *pattern;
} SDL_DialogFileFilter;
/**
* Callback used by file dialog functions.
*
* The specific usage is described in each function.
*
* If filelist is...
* - `NULL`, an error occured. Details can be obtained with SDL_GetError().
* - A pointer to `NULL`, the user either didn't choose any file or canceled
* the dialog.
* - A pointer to non-`NULL`, the user chose one or more files. The argument is
* a null-terminated list of pointers to C strings, each containing a path.
*
* The filelist argument does not need to be freed; it will automatically be
* freed when the callback returns.
*
* The filter argument is the index of the filter that was selected, or one
* more than the size of the list (therefore the index of the terminating NULL
* entry) if no filter was selected, or -1 if the platform or method doesn't
* support fetching the selected filter or if an error occured.
*
* \sa SDL_DialogFileFilter
* \sa SDL_ShowOpenFileDialog
* \sa SDL_ShowSaveFileDialog
* \sa SDL_ShowOpenFolderDialog
*/
typedef void(SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * const *filelist, int filter);
/**
* Displays a dialog that lets the user select a file on their filesystem.
*
* This function should only be invoked from the main thread.
*
* This is an asynchronous function; it will return immediately, and the
* result will be passed to the callback.
*
* The callback will be invoked with a null-terminated list of files the user
* chose. The list will be empty if the user canceled the dialog, and it will
* be NULL if an error occured.
*
* Note that the callback may be called from a different thread than the one
* the function was invoked on.
*
* Depending on the platform, the user may be allowed to input paths that
* don't yet exist.
*
* \param callback The function to be invoked when the user selects a file and
* accepts, or the user cancels the dialog, or an error
* occurs. The first argument is a null-terminated list of C
* strings, representing the paths chosen by the user. The
* list will be empty if the user canceled the dialog, and it
* will be NULL if an error occured. If an error occured, it
* can be fetched with SDL_GetError(). The second argument is
* the userdata pointer passed to the function.
* \param userdata An optional pointer to pass extra data to the callback when
* it will be invoked.
* \param window The window that the dialog should be modal for. May be NULL.
* Not all platforms support this option.
* \param filters A null-terminated list of SDL_DialogFileFilter's. May be
* NULL. Not all platforms support this option, and platforms
* that do support it may allow the user to ignore the filters.
* \param default_location The default folder or file to start the dialog at.
* May be NULL. Not all platforms support this option.
* \param allow_many If non-zero, the user will be allowed to select multiple
* entries. Not all platforms support this option.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_ShowSaveFileDialog
* \sa SDL_ShowOpenFolderDialog
*/
extern DECLSPEC void SDLCALL SDL_ShowOpenFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, const char *default_location, SDL_bool allow_many);
/**
* Displays a dialog that lets the user choose a new or existing file on their
* filesystem.
*
* This function should only be invoked from the main thread.
*
* This is an asynchronous function; it will return immediately, and the
* result will be passed to the callback.
*
* The callback will be invoked with a null-terminated list of files the user
* chose. The list will be empty if the user canceled the dialog, and it will
* be NULL if an error occured.
*
* Note that the callback may be called from a different thread than the one
* the function was invoked on.
*
* The chosen file may or may not already exist.
*
* \param callback The function to be invoked when the user selects a file and
* accepts, or the user cancels the dialog, or an error
* occurs. The first argument is a null-terminated list of C
* strings, representing the paths chosen by the user. The
* list will be empty if the user canceled the dialog, and it
* will be NULL if an error occured. If an error occured, it
* can be fetched with SDL_GetError(). The second argument is
* the userdata pointer passed to the function.
* \param userdata An optional pointer to pass extra data to the callback when
* it will be invoked.
* \param window The window that the dialog should be modal for. May be NULL.
* Not all platforms support this option.
* \param filters A null-terminated list of SDL_DialogFileFilter's. May be
* NULL. Not all platforms support this option, and platforms
* that do support it may allow the user to ignore the filters.
* \param default_location The default folder or file to start the dialog at.
* May be NULL. Not all platforms support this option.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_ShowOpenFileDialog
*/
extern DECLSPEC void SDLCALL SDL_ShowSaveFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, const char *default_location);
/**
* Displays a dialog that lets the user select a folder on their filesystem.
*
* This function should only be invoked from the main thread.
*
* This is an asynchronous function; it will return immediately, and the
* result will be passed to the callback.
*
* The callback will be invoked with a null-terminated list of files the user
* chose. The list will be empty if the user canceled the dialog, and it will
* be NULL if an error occured.
*
* Note that the callback may be called from a different thread than the one
* the function was invoked on.
*
* Depending on the platform, the user may be allowed to input paths that
* don't yet exist.
*
* \param callback The function to be invoked when the user selects a folder
* and accepts, or the user cancels the dialog, or an error
* occurs. The first argument is a null-terminated list of C
* strings, representing the paths chosen by the user. The
* list will be empty if the user canceled the dialog, and it
* will be NULL if an error occured. If an error occured, it
* can be fetched with SDL_GetError(). The second argument is
* the userdata pointer passed to the function.
* \param userdata An optional pointer to pass extra data to the callback when
* it will be invoked.
* \param window The window that the dialog should be modal for. May be NULL.
* Not all platforms support this option.
* \param default_location The default folder or file to start the dialog at.
* May be NULL. Not all platforms support this option.
* \param allow_many If non-zero, the user will be allowed to select multiple
* entries. Not all platforms support this option.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_ShowOpenFileDialog
*/
extern DECLSPEC void SDLCALL SDL_ShowOpenFolderDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, SDL_bool allow_many);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_joystick_h_ */

View File

@ -25,9 +25,11 @@
* This is a simple file to encapsulate the EGL API headers.
*/
#if !defined(_MSC_VER) && !defined(__ANDROID__) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
#include <SDL3/SDL_platform_defines.h>
#if defined(__vita__) || defined(__psp2__)
#if !defined(_MSC_VER) && !defined(SDL_PLATFORM_ANDROID) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
#if defined(SDL_PLATFORM_VITA)
#include <psp2/display.h>
#include <psp2/gxm.h>
#include <psp2/types.h>
@ -419,7 +421,7 @@ typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
#elif defined(__EMSCRIPTEN__)
#elif defined(SDL_PLATFORM_EMSCRIPTEN)
typedef int EGLNativeDisplayType;
typedef int EGLNativePixmapType;

View File

@ -56,13 +56,13 @@ _m_prefetch(void *__P)
/* @} */
#ifndef SDL_BYTEORDER
#ifdef __linux__
#ifdef SDL_PLATFORM_LINUX
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#elif defined(__OpenBSD__) || defined(__DragonFly__)
#elif defined(SDL_PLATFORM_OPENBSD) || defined(__DragonFly__)
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#elif defined(SDL_PLATFORM_FREEBSD) || defined(SDL_PLATFORM_NETBSD)
#include <sys/endian.h>
#define SDL_BYTEORDER BYTE_ORDER
/* predefs from newer gcc and clang versions: */
@ -84,7 +84,7 @@ _m_prefetch(void *__P)
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#endif
#endif /* __linux__ */
#endif /* SDL_PLATFORM_LINUX */
#endif /* !SDL_BYTEORDER */
#ifndef SDL_FLOATWORDORDER

View File

@ -39,6 +39,7 @@
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_touch.h>
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_camera.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
@ -97,8 +98,9 @@ typedef enum
SDL_EVENT_DISPLAY_REMOVED, /**< Display has been removed from the system */
SDL_EVENT_DISPLAY_MOVED, /**< Display has changed position */
SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, /**< Display has changed content scale */
SDL_EVENT_DISPLAY_HDR_STATE_CHANGED, /**< Display HDR properties have changed */
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_HDR_STATE_CHANGED,
/* Window events */
/* 0x200 was SDL_WINDOWEVENT, reserve the number for sdl2-compat */
@ -141,20 +143,25 @@ typedef enum
SDL_EVENT_TEXT_INPUT, /**< Keyboard text input */
SDL_EVENT_KEYMAP_CHANGED, /**< Keymap changed due to a system event such as an
input language or keyboard layout change. */
SDL_EVENT_KEYBOARD_ADDED, /**< A new keyboard has been inserted into the system */
SDL_EVENT_KEYBOARD_REMOVED, /**< A keyboard has been removed */
/* Mouse events */
SDL_EVENT_MOUSE_MOTION = 0x400, /**< Mouse moved */
SDL_EVENT_MOUSE_BUTTON_DOWN, /**< Mouse button pressed */
SDL_EVENT_MOUSE_BUTTON_UP, /**< Mouse button released */
SDL_EVENT_MOUSE_WHEEL, /**< Mouse wheel motion */
SDL_EVENT_MOUSE_ADDED, /**< A new mouse has been inserted into the system */
SDL_EVENT_MOUSE_REMOVED, /**< A mouse has been removed */
/* Joystick events */
SDL_EVENT_JOYSTICK_AXIS_MOTION = 0x600, /**< Joystick axis motion */
SDL_EVENT_JOYSTICK_HAT_MOTION = 0x602, /**< Joystick hat position change */
SDL_EVENT_JOYSTICK_BALL_MOTION, /**< Joystick trackball motion */
SDL_EVENT_JOYSTICK_HAT_MOTION, /**< Joystick hat position change */
SDL_EVENT_JOYSTICK_BUTTON_DOWN, /**< Joystick button pressed */
SDL_EVENT_JOYSTICK_BUTTON_UP, /**< Joystick button released */
SDL_EVENT_JOYSTICK_ADDED, /**< A new joystick has been inserted into the system */
SDL_EVENT_JOYSTICK_REMOVED, /**< An opened joystick has been removed */
SDL_EVENT_JOYSTICK_ADDED, /**< A new joystick has been inserted into the system */
SDL_EVENT_JOYSTICK_REMOVED, /**< An opened joystick has been removed */
SDL_EVENT_JOYSTICK_BATTERY_UPDATED, /**< Joystick battery level change */
SDL_EVENT_JOYSTICK_UPDATE_COMPLETE, /**< Joystick update is complete */
@ -204,6 +211,12 @@ typedef enum
SDL_EVENT_PEN_BUTTON_DOWN, /**< Pressure-sensitive pen button pressed */
SDL_EVENT_PEN_BUTTON_UP, /**< Pressure-sensitive pen button released */
/* Camera hotplug events */
SDL_EVENT_CAMERA_DEVICE_ADDED = 0x1400, /**< A new camera device is available */
SDL_EVENT_CAMERA_DEVICE_REMOVED, /**< A camera device has been removed. */
SDL_EVENT_CAMERA_DEVICE_APPROVED, /**< A camera device has been approved for use by the user. */
SDL_EVENT_CAMERA_DEVICE_DENIED, /**< A camera device has been denied for use by the user. */
/* Render events */
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
@ -219,7 +232,11 @@ typedef enum
/**
* This last event is only for bounding internal arrays
*/
SDL_EVENT_LAST = 0xFFFF
SDL_EVENT_LAST = 0xFFFF,
/* This just makes sure the enum is the size of Uint32 */
SDL_EVENT_ENUM_PADDING = 0x7FFFFFFF
} SDL_EventType;
/**
@ -227,7 +244,8 @@ typedef enum
*/
typedef struct SDL_CommonEvent
{
Uint32 type;
Uint32 type; /**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
} SDL_CommonEvent;
@ -236,7 +254,8 @@ typedef struct SDL_CommonEvent
*/
typedef struct SDL_DisplayEvent
{
Uint32 type; /**< ::SDL_DISPLAYEVENT_* */
SDL_EventType type; /**< ::SDL_DISPLAYEVENT_* */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_DisplayID displayID;/**< The associated display */
Sint32 data1; /**< event dependent data */
@ -247,21 +266,35 @@ typedef struct SDL_DisplayEvent
*/
typedef struct SDL_WindowEvent
{
Uint32 type; /**< ::SDL_WINDOWEVENT_* */
SDL_EventType type; /**< ::SDL_WINDOWEVENT_* */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The associated window */
Sint32 data1; /**< event dependent data */
Sint32 data2; /**< event dependent data */
} SDL_WindowEvent;
/**
* Keyboard device event structure (event.kdevice.*)
*/
typedef struct SDL_KeyboardDeviceEvent
{
SDL_EventType type; /**< ::SDL_EVENT_KEYBOARD_ADDED or ::SDL_EVENT_KEYBOARD_REMOVED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_KeyboardID which; /**< The keyboard instance id */
} SDL_KeyboardDeviceEvent;
/**
* Keyboard button event structure (event.key.*)
*/
typedef struct SDL_KeyboardEvent
{
Uint32 type; /**< ::SDL_EVENT_KEY_DOWN or ::SDL_EVENT_KEY_UP */
SDL_EventType type; /**< ::SDL_EVENT_KEY_DOWN or ::SDL_EVENT_KEY_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
SDL_KeyboardID which; /**< The keyboard instance id, or 0 if unknown or virtual */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 repeat; /**< Non-zero if this is a key repeat */
Uint8 padding2;
@ -278,7 +311,8 @@ typedef struct SDL_KeyboardEvent
*/
typedef struct SDL_TextEditingEvent
{
Uint32 type; /**< ::SDL_EVENT_TEXT_EDITING */
SDL_EventType type; /**< ::SDL_EVENT_TEXT_EDITING */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
char *text; /**< The editing text */
@ -286,7 +320,6 @@ typedef struct SDL_TextEditingEvent
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingEvent;
#define SDL_TEXTINPUTEVENT_TEXT_SIZE 64
/**
* Keyboard text input event structure (event.text.*)
*
@ -295,18 +328,31 @@ typedef struct SDL_TextEditingEvent
*/
typedef struct SDL_TextInputEvent
{
Uint32 type; /**< ::SDL_EVENT_TEXT_INPUT */
SDL_EventType type; /**< ::SDL_EVENT_TEXT_INPUT */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
char *text; /**< The input text */
} SDL_TextInputEvent;
/**
* Mouse device event structure (event.mdevice.*)
*/
typedef struct SDL_MouseDeviceEvent
{
SDL_EventType type; /**< ::SDL_EVENT_MOUSE_ADDED or ::SDL_EVENT_MOUSE_REMOVED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_MouseID which; /**< The mouse instance id */
} SDL_MouseDeviceEvent;
/**
* Mouse motion event structure (event.motion.*)
*/
typedef struct SDL_MouseMotionEvent
{
Uint32 type; /**< ::SDL_EVENT_MOUSE_MOTION */
SDL_EventType type; /**< ::SDL_EVENT_MOUSE_MOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with mouse focus, if any */
SDL_MouseID which; /**< The mouse instance id, SDL_TOUCH_MOUSEID, or SDL_PEN_MOUSEID */
@ -322,7 +368,8 @@ typedef struct SDL_MouseMotionEvent
*/
typedef struct SDL_MouseButtonEvent
{
Uint32 type; /**< ::SDL_EVENT_MOUSE_BUTTON_DOWN or ::SDL_EVENT_MOUSE_BUTTON_UP */
SDL_EventType type; /**< ::SDL_EVENT_MOUSE_BUTTON_DOWN or ::SDL_EVENT_MOUSE_BUTTON_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with mouse focus, if any */
SDL_MouseID which; /**< The mouse instance id, SDL_TOUCH_MOUSEID, or SDL_PEN_MOUSEID */
@ -339,15 +386,16 @@ typedef struct SDL_MouseButtonEvent
*/
typedef struct SDL_MouseWheelEvent
{
Uint32 type; /**< ::SDL_EVENT_MOUSE_WHEEL */
SDL_EventType type; /**< ::SDL_EVENT_MOUSE_WHEEL */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with mouse focus, if any */
SDL_MouseID which; /**< The mouse instance id, SDL_TOUCH_MOUSEID, or SDL_PEN_MOUSEID */
float x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
float y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
float mouseX; /**< X coordinate, relative to window */
float mouseY; /**< Y coordinate, relative to window */
SDL_MouseWheelDirection direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
float mouse_x; /**< X coordinate, relative to window */
float mouse_y; /**< Y coordinate, relative to window */
} SDL_MouseWheelEvent;
/**
@ -355,7 +403,8 @@ typedef struct SDL_MouseWheelEvent
*/
typedef struct SDL_JoyAxisEvent
{
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_AXIS_MOTION */
SDL_EventType type; /**< ::SDL_EVENT_JOYSTICK_AXIS_MOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The joystick axis index */
@ -366,12 +415,30 @@ typedef struct SDL_JoyAxisEvent
Uint16 padding4;
} SDL_JoyAxisEvent;
/**
* \brief Joystick trackball motion event structure (event.jball.*)
*/
typedef struct SDL_JoyBallEvent
{
Uint32 type; /**< ::SDL_JOYBALLMOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 ball; /**< The joystick trackball index */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint16 xrel; /**< The relative motion in the X direction */
Sint16 yrel; /**< The relative motion in the Y direction */
} SDL_JoyBallEvent;
/**
* Joystick hat position change event structure (event.jhat.*)
*/
typedef struct SDL_JoyHatEvent
{
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_HAT_MOTION */
SDL_EventType type; /**< ::SDL_EVENT_JOYSTICK_HAT_MOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 hat; /**< The joystick hat index */
@ -391,7 +458,8 @@ typedef struct SDL_JoyHatEvent
*/
typedef struct SDL_JoyButtonEvent
{
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_BUTTON_DOWN or ::SDL_EVENT_JOYSTICK_BUTTON_UP */
SDL_EventType type; /**< ::SDL_EVENT_JOYSTICK_BUTTON_DOWN or ::SDL_EVENT_JOYSTICK_BUTTON_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The joystick button index */
@ -405,7 +473,8 @@ typedef struct SDL_JoyButtonEvent
*/
typedef struct SDL_JoyDeviceEvent
{
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_ADDED or ::SDL_EVENT_JOYSTICK_REMOVED or ::SDL_EVENT_JOYSTICK_UPDATE_COMPLETE */
SDL_EventType type; /**< ::SDL_EVENT_JOYSTICK_ADDED or ::SDL_EVENT_JOYSTICK_REMOVED or ::SDL_EVENT_JOYSTICK_UPDATE_COMPLETE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
} SDL_JoyDeviceEvent;
@ -415,7 +484,8 @@ typedef struct SDL_JoyDeviceEvent
*/
typedef struct SDL_JoyBatteryEvent
{
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_BATTERY_UPDATED */
SDL_EventType type; /**< ::SDL_EVENT_JOYSTICK_BATTERY_UPDATED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
SDL_JoystickPowerLevel level; /**< The joystick battery level */
@ -426,7 +496,8 @@ typedef struct SDL_JoyBatteryEvent
*/
typedef struct SDL_GamepadAxisEvent
{
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_AXIS_MOTION */
SDL_EventType type; /**< ::SDL_EVENT_GAMEPAD_AXIS_MOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The gamepad axis (SDL_GamepadAxis) */
@ -443,7 +514,8 @@ typedef struct SDL_GamepadAxisEvent
*/
typedef struct SDL_GamepadButtonEvent
{
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_BUTTON_DOWN or ::SDL_EVENT_GAMEPAD_BUTTON_UP */
SDL_EventType type; /**< ::SDL_EVENT_GAMEPAD_BUTTON_DOWN or ::SDL_EVENT_GAMEPAD_BUTTON_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The gamepad button (SDL_GamepadButton) */
@ -458,7 +530,8 @@ typedef struct SDL_GamepadButtonEvent
*/
typedef struct SDL_GamepadDeviceEvent
{
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_ADDED, ::SDL_EVENT_GAMEPAD_REMOVED, or ::SDL_EVENT_GAMEPAD_REMAPPED, ::SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or ::SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED */
SDL_EventType type; /**< ::SDL_EVENT_GAMEPAD_ADDED, ::SDL_EVENT_GAMEPAD_REMOVED, or ::SDL_EVENT_GAMEPAD_REMAPPED, ::SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or ::SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
} SDL_GamepadDeviceEvent;
@ -468,7 +541,8 @@ typedef struct SDL_GamepadDeviceEvent
*/
typedef struct SDL_GamepadTouchpadEvent
{
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or ::SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or ::SDL_EVENT_GAMEPAD_TOUCHPAD_UP */
SDL_EventType type; /**< ::SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or ::SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or ::SDL_EVENT_GAMEPAD_TOUCHPAD_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 touchpad; /**< The index of the touchpad */
@ -483,7 +557,8 @@ typedef struct SDL_GamepadTouchpadEvent
*/
typedef struct SDL_GamepadSensorEvent
{
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_SENSOR_UPDATE */
SDL_EventType type; /**< ::SDL_EVENT_GAMEPAD_SENSOR_UPDATE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
@ -496,7 +571,8 @@ typedef struct SDL_GamepadSensorEvent
*/
typedef struct SDL_AudioDeviceEvent
{
Uint32 type; /**< ::SDL_EVENT_AUDIO_DEVICE_ADDED, or ::SDL_EVENT_AUDIO_DEVICE_REMOVED, or ::SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED */
SDL_EventType type; /**< ::SDL_EVENT_AUDIO_DEVICE_ADDED, or ::SDL_EVENT_AUDIO_DEVICE_REMOVED, or ::SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_AudioDeviceID which; /**< SDL_AudioDeviceID for the device being added or removed or changing */
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
@ -505,16 +581,30 @@ typedef struct SDL_AudioDeviceEvent
Uint8 padding3;
} SDL_AudioDeviceEvent;
/**
* Camera device event structure (event.cdevice.*)
*/
typedef struct SDL_CameraDeviceEvent
{
SDL_EventType type; /**< ::SDL_EVENT_CAMERA_DEVICE_ADDED, ::SDL_EVENT_CAMERA_DEVICE_REMOVED, ::SDL_EVENT_CAMERA_DEVICE_APPROVED, ::SDL_EVENT_CAMERA_DEVICE_DENIED */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_CameraDeviceID which; /**< SDL_CameraDeviceID for the device being added or removed or changing */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
} SDL_CameraDeviceEvent;
/**
* Touch finger event structure (event.tfinger.*)
*/
typedef struct SDL_TouchFingerEvent
{
Uint32 type; /**< ::SDL_EVENT_FINGER_MOTION or ::SDL_EVENT_FINGER_DOWN or ::SDL_EVENT_FINGER_UP */
SDL_EventType type; /**< ::SDL_EVENT_FINGER_MOTION or ::SDL_EVENT_FINGER_DOWN or ::SDL_EVENT_FINGER_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_TouchID touchId; /**< The touch device id */
SDL_FingerID fingerId;
SDL_TouchID touchID; /**< The touch device id */
SDL_FingerID fingerID;
float x; /**< Normalized in the range 0...1 */
float y; /**< Normalized in the range 0...1 */
float dx; /**< Normalized in the range -1...1 */
@ -530,17 +620,16 @@ typedef struct SDL_TouchFingerEvent
*/
typedef struct SDL_PenTipEvent
{
Uint32 type; /**< ::SDL_EVENT_PEN_DOWN or ::SDL_EVENT_PEN_UP */
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
Uint32 windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
Uint8 tip; /**< ::SDL_PEN_TIP_INK when using a regular pen tip, or ::SDL_PEN_TIP_ERASER if the pen is being used as an eraser (e.g., flipped to use the eraser tip) */
Uint8 state; /**< ::SDL_PRESSED on ::SDL_EVENT_PEN_DOWN and ::SDL_RELEASED on ::SDL_EVENT_PEN_UP */
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.),
::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and
::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
SDL_EventType type; /**< ::SDL_EVENT_PEN_DOWN or ::SDL_EVENT_PEN_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
Uint8 tip; /**< ::SDL_PEN_TIP_INK when using a regular pen tip, or ::SDL_PEN_TIP_ERASER if the pen is being used as an eraser (e.g., flipped to use the eraser tip) */
Uint8 state; /**< ::SDL_PRESSED on ::SDL_EVENT_PEN_DOWN and ::SDL_RELEASED on ::SDL_EVENT_PEN_UP */
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.), ::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and ::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
float axes[SDL_PEN_NUM_AXES]; /**< Pen axes such as pressure and tilt (ordered as per ::SDL_PenAxis) */
} SDL_PenTipEvent;
@ -549,17 +638,16 @@ typedef struct SDL_PenTipEvent
*/
typedef struct SDL_PenMotionEvent
{
Uint32 type; /**< ::SDL_EVENT_PEN_MOTION */
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
Uint32 windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
SDL_EventType type; /**< ::SDL_EVENT_PEN_MOTION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
Uint8 padding1;
Uint8 padding2;
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.),
::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and
::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.), ::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and ::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
float axes[SDL_PEN_NUM_AXES]; /**< Pen axes such as pressure and tilt (ordered as per ::SDL_PenAxis) */
} SDL_PenMotionEvent;
@ -568,17 +656,16 @@ typedef struct SDL_PenMotionEvent
*/
typedef struct SDL_PenButtonEvent
{
Uint32 type; /**< ::SDL_EVENT_PEN_BUTTON_DOWN or ::SDL_EVENT_PEN_BUTTON_UP */
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
Uint32 windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
Uint8 button; /**< The pen button index (1 represents the pen tip for compatibility with mouse events) */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.),
::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and
::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
SDL_EventType type; /**< ::SDL_EVENT_PEN_BUTTON_DOWN or ::SDL_EVENT_PEN_BUTTON_UP */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
Uint8 button; /**< The pen button index (1 represents the pen tip for compatibility with mouse events) */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint16 pen_state; /**< Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.), ::SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and ::SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser. */
float x; /**< X coordinate, relative to window */
float y; /**< Y coordinate, relative to window */
float axes[SDL_PEN_NUM_AXES]; /**< Pen axes such as pressure and tilt (ordered as per ::SDL_PenAxis) */
} SDL_PenButtonEvent;
@ -590,7 +677,8 @@ typedef struct SDL_PenButtonEvent
*/
typedef struct SDL_DropEvent
{
Uint32 type; /**< ::SDL_EVENT_DROP_BEGIN or ::SDL_EVENT_DROP_FILE or ::SDL_EVENT_DROP_TEXT or ::SDL_EVENT_DROP_COMPLETE or ::SDL_EVENT_DROP_POSITION */
SDL_EventType type; /**< ::SDL_EVENT_DROP_BEGIN or ::SDL_EVENT_DROP_FILE or ::SDL_EVENT_DROP_TEXT or ::SDL_EVENT_DROP_COMPLETE or ::SDL_EVENT_DROP_POSITION */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window that was dropped on, if any */
float x; /**< X coordinate, relative to window (not on begin) */
@ -604,7 +692,8 @@ typedef struct SDL_DropEvent
*/
typedef struct SDL_ClipboardEvent
{
Uint32 type; /**< ::SDL_EVENT_CLIPBOARD_UPDATE */
SDL_EventType type; /**< ::SDL_EVENT_CLIPBOARD_UPDATE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
} SDL_ClipboardEvent;
@ -613,7 +702,8 @@ typedef struct SDL_ClipboardEvent
*/
typedef struct SDL_SensorEvent
{
Uint32 type; /**< ::SDL_EVENT_SENSOR_UPDATE */
SDL_EventType type; /**< ::SDL_EVENT_SENSOR_UPDATE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_SensorID which; /**< The instance ID of the sensor */
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData() */
@ -625,7 +715,8 @@ typedef struct SDL_SensorEvent
*/
typedef struct SDL_QuitEvent
{
Uint32 type; /**< ::SDL_EVENT_QUIT */
SDL_EventType type; /**< ::SDL_EVENT_QUIT */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
} SDL_QuitEvent;
@ -634,7 +725,8 @@ typedef struct SDL_QuitEvent
*/
typedef struct SDL_UserEvent
{
Uint32 type; /**< ::SDL_EVENT_USER through ::SDL_EVENT_LAST-1 */
Uint32 type; /**< ::SDL_EVENT_USER through ::SDL_EVENT_LAST-1, Uint32 because these are not in the SDL_EventType enumeration */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The associated window if any */
Sint32 code; /**< User defined event code */
@ -648,27 +740,31 @@ typedef struct SDL_UserEvent
*/
typedef union SDL_Event
{
Uint32 type; /**< Event type, shared with all events */
Uint32 type; /**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Display event data */
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardDeviceEvent kdevice; /**< Keyboard device change event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */
SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseDeviceEvent mdevice; /**< Mouse device change event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
SDL_JoyBatteryEvent jbattery; /**< Joystick battery event data */
SDL_GamepadDeviceEvent gdevice; /**< Gamepad device event data */
SDL_GamepadAxisEvent gaxis; /**< Gamepad axis event data */
SDL_GamepadButtonEvent gbutton; /**< Gamepad button event data */
SDL_GamepadDeviceEvent gdevice; /**< Gamepad device event data */
SDL_GamepadTouchpadEvent gtouchpad; /**< Gamepad touchpad event data */
SDL_GamepadSensorEvent gsensor; /**< Gamepad sensor event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_CameraDeviceEvent cdevice; /**< Camera device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
@ -823,6 +919,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
*
* If you have user events with custom data that needs to be freed, you should
* use SDL_PeepEvents() to remove and clean up those events before calling
* this function.
*
* \param type the type of event to be cleared; see SDL_EventType for details
*
* \since This function is available since SDL 3.0.0.
@ -1151,15 +1251,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_EventEnabled(Uint32 type);
* Allocate a set of user-defined events, and return the beginning event
* number for that set of events.
*
* Calling this function with `numevents` <= 0 is an error and will return
* (Uint32)-1.
*
* Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
* 0xFFFFFFFF), but is clearer to write.
*
* \param numevents the number of events to be allocated
* \returns the beginning event number, or (Uint32)-1 if there are not enough
* user-defined events left.
* \returns the beginning event number, or 0 if numevents is invalid or if
* there are not enough user-defined events left.
*
* \since This function is available since SDL 3.0.0.
*

View File

@ -206,8 +206,8 @@ typedef enum
} SDL_Folder;
/**
* Finds the most suitable user folder for @p purpose, and returns its path in
* OS-specific notation.
* Finds the most suitable user folder for the specified purpose, and returns
* its path in OS-specific notation.
*
* Many OSes provide certain standard folders for certain purposes, such as
* storing pictures, music or videos for a certain user. This function gives
@ -231,11 +231,92 @@ typedef enum
* folder, or NULL if an error happened.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_Folder
*/
extern DECLSPEC char *SDLCALL SDL_GetUserFolder(SDL_Folder folder);
/* Abstract filesystem interface */
typedef enum SDL_PathType
{
SDL_PATHTYPE_NONE, /**< path does not exist */
SDL_PATHTYPE_FILE, /**< a normal file */
SDL_PATHTYPE_DIRECTORY, /**< a directory */
SDL_PATHTYPE_OTHER /**< something completely different like a device node (not a symlink, those are always followed) */
} SDL_PathType;
typedef struct SDL_PathInfo
{
SDL_PathType type; /* the path type */
Uint64 size; /* the file size in bytes */
SDL_Time create_time; /* the time when the path was created */
SDL_Time modify_time; /* the last time the path was modified */
SDL_Time access_time; /* the last time the path was read */
} SDL_PathInfo;
/**
* Create a directory.
*
* \param path the path of the directory to create
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_CreateDirectory(const char *path);
/* Callback for directory enumeration. Return 1 to keep enumerating, 0 to stop enumerating (no error), -1 to stop enumerating and report an error. `dirname` is the directory being enumerated, `fname` is the enumerated entry. */
typedef int (SDLCALL *SDL_EnumerateDirectoryCallback)(void *userdata, const char *dirname, const char *fname);
/**
* Enumerate a directory.
*
* \param path the path of the directory to enumerate
* \param callback a function that is called for each entry in the directory
* \param userdata a pointer that is passed to `callback`
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);
/**
* Remove a file or an empty directory.
*
* \param path the path of the directory to enumerate
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_RemovePath(const char *path);
/**
* Rename a file or directory.
*
* \param oldpath the old path
* \param newpath the new path
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_RenamePath(const char *oldpath, const char *newpath);
/**
* Get information about a filesystem path.
*
* \param path the path to query
* \param info a pointer filled in with information about the path, or NULL to
* check for the existence of a file
* \returns 0 on success or a negative error code if the file doesn't exist,
* or another failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_joystick.h>
#include <SDL3/SDL_properties.h>
#include <SDL3/SDL_rwops.h>
#include <SDL3/SDL_iostream.h>
#include <SDL3/SDL_sensor.h>
#include <SDL3/SDL_begin_code.h>
@ -113,12 +113,17 @@ typedef enum
SDL_GAMEPAD_BUTTON_DPAD_DOWN,
SDL_GAMEPAD_BUTTON_DPAD_LEFT,
SDL_GAMEPAD_BUTTON_DPAD_RIGHT,
SDL_GAMEPAD_BUTTON_MISC1, /* Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button) */
SDL_GAMEPAD_BUTTON_MISC1, /* Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button) */
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /* Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1) */
SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /* Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3) */
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /* Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2) */
SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /* Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4) */
SDL_GAMEPAD_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
SDL_GAMEPAD_BUTTON_MISC2, /* Additional button */
SDL_GAMEPAD_BUTTON_MISC3, /* Additional button */
SDL_GAMEPAD_BUTTON_MISC4, /* Additional button */
SDL_GAMEPAD_BUTTON_MISC5, /* Additional button */
SDL_GAMEPAD_BUTTON_MISC6, /* Additional button */
SDL_GAMEPAD_BUTTON_MAX
} SDL_GamepadButton;
@ -173,9 +178,9 @@ typedef enum
SDL_GAMEPAD_BINDTYPE_HAT
} SDL_GamepadBindingType;
typedef struct
typedef struct SDL_GamepadBinding
{
SDL_GamepadBindingType inputType;
SDL_GamepadBindingType input_type;
union
{
int button;
@ -195,7 +200,7 @@ typedef struct
} input;
SDL_GamepadBindingType outputType;
SDL_GamepadBindingType output_type;
union
{
SDL_GamepadButton button;
@ -246,7 +251,7 @@ typedef struct
extern DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping);
/**
* Load a set of gamepad mappings from a seekable SDL data stream.
* Load a set of gamepad mappings from an SDL_IOStream.
*
* You can call this function several times, if needed, to load different
* database files.
@ -263,7 +268,7 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping);
* constrained environment.
*
* \param src the data stream for the mappings to be added
* \param freesrc if SDL_TRUE, calls SDL_RWclose() on `src` before returning,
* \param closeio if SDL_TRUE, calls SDL_CloseIO() on `src` before returning,
* even in the case of an error
* \returns the number of mappings added or -1 on error; call SDL_GetError()
* for more information.
@ -272,9 +277,10 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping);
*
* \sa SDL_AddGamepadMapping
* \sa SDL_AddGamepadMappingsFromFile
* \sa SDL_GetGamepadMapping
* \sa SDL_GetGamepadMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromRW(SDL_RWops *src, SDL_bool freesrc);
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, SDL_bool closeio);
/**
* Load a set of gamepad mappings from a file.
@ -296,7 +302,8 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromRW(SDL_RWops *src, SDL_boo
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AddGamepadMapping
* \sa SDL_AddGamepadMappingsFromRW
* \sa SDL_AddGamepadMappingsFromIO
* \sa SDL_GetGamepadMapping
* \sa SDL_GetGamepadMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file);
@ -314,7 +321,7 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file);
extern DECLSPEC int SDLCALL SDL_ReloadGamepadMappings(void);
/**
* Get the mapping at a particular index.
* Get the current gamepad mappings.
*
* You must free the returned pointer with SDL_free() when you are done with
* it, but you do _not_ free each string in the array.
@ -358,6 +365,7 @@ extern DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID gui
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AddGamepadMapping
* \sa SDL_GetGamepadInstanceMapping
* \sa SDL_GetGamepadMappingForGUID
* \sa SDL_SetGamepadMapping
*/
@ -381,6 +389,17 @@ extern DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad);
*/
extern DECLSPEC int SDLCALL SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping);
/**
* Return whether a gamepad is currently connected.
*
* \returns SDL_TRUE if a gamepad is connected, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepads
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasGamepad(void);
/**
* Get a list of currently connected gamepads.
*
@ -391,6 +410,7 @@ extern DECLSPEC int SDLCALL SDL_SetGamepadMapping(SDL_JoystickID instance_id, co
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasGamepad
* \sa SDL_OpenGamepad
*/
extern DECLSPEC SDL_JoystickID *SDLCALL SDL_GetGamepads(int *count);
@ -404,6 +424,7 @@ extern DECLSPEC SDL_JoystickID *SDLCALL SDL_GetGamepads(int *count);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoysticks
* \sa SDL_OpenGamepad
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id);
@ -420,7 +441,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadName
* \sa SDL_OpenGamepad
* \sa SDL_GetGamepads
*/
extern DECLSPEC const char *SDLCALL SDL_GetGamepadInstanceName(SDL_JoystickID instance_id);
@ -436,7 +457,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetGamepadInstanceName(SDL_JoystickID in
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadPath
* \sa SDL_OpenGamepad
* \sa SDL_GetGamepads
*/
extern DECLSPEC const char *SDLCALL SDL_GetGamepadInstancePath(SDL_JoystickID instance_id);
@ -451,7 +472,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetGamepadInstancePath(SDL_JoystickID in
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadPlayerIndex
* \sa SDL_OpenGamepad
* \sa SDL_GetGamepads
*/
extern DECLSPEC int SDLCALL SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID instance_id);
@ -468,6 +489,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID ins
*
* \sa SDL_GetGamepadGUID
* \sa SDL_GetGamepadGUIDString
* \sa SDL_GetGamepads
*/
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadInstanceGUID(SDL_JoystickID instance_id);
@ -482,6 +504,9 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadInstanceGUID(SDL_Joystick
* index, this function returns zero
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadVendor
* \sa SDL_GetGamepads
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceVendor(SDL_JoystickID instance_id);
@ -496,6 +521,9 @@ extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceVendor(SDL_JoystickID insta
* invalid index, this function returns zero
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadProduct
* \sa SDL_GetGamepads
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceProduct(SDL_JoystickID instance_id);
@ -510,6 +538,9 @@ extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceProduct(SDL_JoystickID inst
* invalid index, this function returns zero
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadProductVersion
* \sa SDL_GetGamepads
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceProductVersion(SDL_JoystickID instance_id);
@ -522,6 +553,10 @@ extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadInstanceProductVersion(SDL_Joystick
* \returns the gamepad type.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadType
* \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadInstanceType
*/
extern DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadInstanceType(SDL_JoystickID instance_id);
@ -534,6 +569,10 @@ extern DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadInstanceType(SDL_JoystickI
* \returns the gamepad type.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadInstanceType
* \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadType
*/
extern DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id);
@ -547,6 +586,9 @@ extern DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadInstanceType(SDL_Joyst
* no mapping is available.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepads
* \sa SDL_GetGamepadMapping
*/
extern DECLSPEC char *SDLCALL SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id);
@ -594,6 +636,19 @@ extern DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromPlayerIndex(int player_in
*
* These properties are shared with the underlying joystick object.
*
* The following read-only properties are provided by SDL:
*
* - `SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN`: true if this gamepad has an LED
* that has adjustable brightness
* - `SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN`: true if this gamepad has an LED
* that has adjustable color
* - `SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN`: true if this gamepad has a
* player LED
* - `SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN`: true if this gamepad has
* left/right rumble
* - `SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN`: true if this gamepad has
* simple trigger rumble
*
* \param gamepad a gamepad identifier previously returned by
* SDL_OpenGamepad()
* \returns a valid property ID on success or 0 on failure; call
@ -606,6 +661,12 @@ extern DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromPlayerIndex(int player_in
*/
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *gamepad);
#define SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN
#define SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN
#define SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN
#define SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN
#define SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN
/**
* Get the instance ID of an opened gamepad.
*
@ -615,8 +676,6 @@ extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *g
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenGamepad
*/
extern DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadInstanceID(SDL_Gamepad *gamepad);
@ -631,7 +690,6 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadInstanceID(SDL_Gamepad *gam
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadInstanceName
* \sa SDL_OpenGamepad
*/
extern DECLSPEC const char *SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad);
@ -684,6 +742,8 @@ extern DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *game
* \returns the player index for gamepad, or -1 if it's not available.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetGamepadPlayerIndex
*/
extern DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
@ -697,6 +757,8 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadPlayerIndex
*/
extern DECLSPEC int SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index);
@ -709,6 +771,8 @@ extern DECLSPEC int SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int
* \returns the USB vendor ID, or zero if unavailable.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadInstanceVendor
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad);
@ -721,6 +785,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad);
* \returns the USB product ID, or zero if unavailable.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadInstanceProduct
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
@ -733,6 +799,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
* \returns the USB product version, or zero if unavailable.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadInstanceProductVersion
*/
extern DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad);
@ -794,9 +862,6 @@ extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_GetGamepadPowerLevel(SDL_Game
* connected, or SDL_FALSE if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CloseGamepad
* \sa SDL_OpenGamepad
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad);
@ -830,6 +895,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_GetGamepadJoystick(SDL_Gamepad *gamepa
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadEventsEnabled
* \sa SDL_UpdateGamepads
*/
extern DECLSPEC void SDLCALL SDL_SetGamepadEventsEnabled(SDL_bool enabled);
@ -942,7 +1008,7 @@ extern DECLSPEC SDL_GamepadAxis SDLCALL SDL_GetGamepadAxisFromString(const char
*
* \sa SDL_GetGamepadAxisFromString
*/
extern DECLSPEC const char* SDLCALL SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
extern DECLSPEC const char * SDLCALL SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
/**
* Query whether a gamepad has a given axis.
@ -955,6 +1021,9 @@ extern DECLSPEC const char* SDLCALL SDL_GetGamepadStringForAxis(SDL_GamepadAxis
* \returns SDL_TRUE if the gamepad has this axis, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasButton
* \sa SDL_GetGamepadAxis
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
@ -977,6 +1046,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_Ga
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasAxis
* \sa SDL_GetGamepadButton
*/
extern DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
@ -994,6 +1064,8 @@ extern DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_Game
* `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadStringForButton
*/
extern DECLSPEC SDL_GamepadButton SDLCALL SDL_GetGamepadButtonFromString(const char *str);
@ -1024,6 +1096,8 @@ extern DECLSPEC const char* SDLCALL SDL_GetGamepadStringForButton(SDL_GamepadBut
* \returns SDL_TRUE if the gamepad has this button, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasAxis
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
@ -1037,6 +1111,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasButton
* \sa SDL_GetGamepadAxis
*/
extern DECLSPEC Uint8 SDLCALL SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
@ -1074,6 +1149,8 @@ extern DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabel(SDL_Gam
* \returns number of touchpads
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetNumGamepadTouchpadFingers
*/
extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);
@ -1086,6 +1163,9 @@ extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);
* \returns number of supported simultaneous fingers
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadTouchpadFinger
* \sa SDL_GetNumGamepadTouchpads
*/
extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad);
@ -1103,6 +1183,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepa
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetNumGamepadTouchpadFingers
*/
extern DECLSPEC int SDLCALL SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
@ -1114,6 +1196,10 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, i
* \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadSensorData
* \sa SDL_GetGamepadSensorDataRate
* \sa SDL_SetGamepadSensorEnabled
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type);
@ -1127,6 +1213,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasSensor
* \sa SDL_GamepadSensorEnabled
*/
extern DECLSPEC int SDLCALL SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type, SDL_bool enabled);
@ -1138,6 +1227,8 @@ extern DECLSPEC int SDLCALL SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SD
* \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetGamepadSensorEnabled
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type);
@ -1175,6 +1266,9 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_S
* Each call to this function cancels any previous rumble effect, and calling
* it with 0 intensity stops any rumbling.
*
* This function requires you to process SDL events or call
* SDL_UpdateJoysticks() to update rumble state.
*
* \param gamepad The gamepad to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left)
* rumble motor, from 0 to 0xFFFF
@ -1184,8 +1278,6 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_S
* \returns 0, or -1 if rumble isn't supported on this gamepad
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasRumble
*/
extern DECLSPEC int SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
@ -1199,6 +1291,9 @@ extern DECLSPEC int SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_f
* whole. This is currently only supported on Xbox One gamepads. If you want
* the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead.
*
* This function requires you to process SDL events or call
* SDL_UpdateJoysticks() to update rumble state.
*
* \param gamepad The gamepad to vibrate
* \param left_rumble The intensity of the left trigger rumble motor, from 0
* to 0xFFFF
@ -1210,50 +1305,19 @@ extern DECLSPEC int SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_f
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GamepadHasRumbleTriggers
* \sa SDL_RumbleGamepad
*/
extern DECLSPEC int SDLCALL SDL_RumbleGamepadTriggers(SDL_Gamepad *gamepad, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
/**
* Query whether a gamepad has an LED.
*
* \param gamepad The gamepad to query
* \returns SDL_TRUE, or SDL_FALSE if this gamepad does not have a modifiable
* LED
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasLED(SDL_Gamepad *gamepad);
/**
* Query whether a gamepad has rumble support.
*
* \param gamepad The gamepad to query
* \returns SDL_TRUE, or SDL_FALSE if this gamepad does not have rumble
* support
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_RumbleGamepad
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasRumble(SDL_Gamepad *gamepad);
/**
* Query whether a gamepad has rumble support on triggers.
*
* \param gamepad The gamepad to query
* \returns SDL_TRUE, or SDL_FALSE if this gamepad does not have trigger
* rumble support
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_RumbleGamepadTriggers
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GamepadHasRumbleTriggers(SDL_Gamepad *gamepad);
/**
* Update a gamepad's LED color.
*
* An example of a joystick LED is the light on the back of a PlayStation 4's
* DualShock 4 controller.
*
* For gamepads with a single color LED, the maximum of the RGB values will be
* used as the LED brightness.
*
* \param gamepad The gamepad to update
* \param red The intensity of the red LED
* \param green The intensity of the green LED

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