Compare commits
2 Commits
preview
...
852f2a6343
Author | SHA1 | Date | |
---|---|---|---|
852f2a6343 | |||
644725478f |
12
.gitattributes
vendored
12
.gitattributes
vendored
@ -1,12 +0,0 @@
|
||||
*.c text
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.cmake text
|
||||
*.py text
|
||||
*.txt text
|
||||
*.sh text
|
||||
*.vcxproj text eol=crlf
|
||||
*.sln text eol=crlf
|
||||
*.filters text eol=crlf
|
||||
*.appxmanifest text eol=crlf
|
||||
*.pbxproj text
|
1
.github/workflows/android.yml
vendored
1
.github/workflows/android.yml
vendored
@ -23,6 +23,7 @@ jobs:
|
||||
- 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' }}
|
||||
|
56
.github/workflows/cpactions.yml
vendored
Normal file
56
.github/workflows/cpactions.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
name: Build (C/P Actions)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: ubuntu-latest
|
||||
name: '${{ matrix.platform.name }} ${{ matrix.platform.os-version }}'
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: FreeBSD, os: freebsd, os-version: 13.2, os-arch: x86-64, artifact: SDL-freebsd-x64,
|
||||
sdl-cmake-configure-arguments: '-DSDL_CHECK_REQUIRED_INCLUDES="/usr/local/include" -DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"',
|
||||
setup-cmd: 'sudo pkg update',
|
||||
install-cmd: 'sudo pkg install -y cmake ninja pkgconf libXcursor libXext libXinerama libXi libXfixes libXrandr libXScrnSaver libXxf86vm wayland wayland-protocols libxkbcommon mesa-libs libglvnd evdev-proto libinotify alsa-lib jackit pipewire pulseaudio sndio dbus zh-fcitx ibus libudev-devd',
|
||||
}
|
||||
- { name: NetBSD, os: netbsd, os-version: 9.3, os-arch: x86-64, artifact: SDL-netbsd-x64,
|
||||
sdl-cmake-configure-arguments: '',
|
||||
setup-cmd: 'export PATH="/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH";export PKG_CONFIG_PATH="/usr/pkg/lib/pkgconfig";export PKG_PATH="https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f "1 2" -d.)/All/";echo "PKG_PATH=$PKG_PATH";echo "uname -a -> \"$(uname -a)\"";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update',
|
||||
install-cmd: 'sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1',
|
||||
}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
uses: cross-platform-actions/action@v0.21.1
|
||||
with:
|
||||
operating_system: ${{ matrix.platform.os }}
|
||||
architecture: ${{ matrix.platform.os-arch }}
|
||||
version: ${{ matrix.platform.os-version }}
|
||||
run: |
|
||||
${{ matrix.platform.setup-cmd }}
|
||||
${{ matrix.platform.install-cmd }}
|
||||
cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL_WERROR=ON \
|
||||
${{ matrix.platform.sdl-cmake-configure-arguments }}
|
||||
cmake --build build/ --config Release --verbose
|
||||
cmake --build build/ --config Release --target package
|
||||
|
||||
cmake --build build/ --config Release --target clean
|
||||
rm -rf build/dist/_CPack_Packages
|
||||
rm -rf build/CMakeFiles
|
||||
rm -rf build/docs
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
6
.github/workflows/emscripten.yml
vendored
6
.github/workflows/emscripten.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-GNinja
|
||||
- name: Build (CMake)
|
||||
@ -42,11 +42,11 @@ jobs:
|
||||
cmake --install build/
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
cmake --build build/ --config Debug --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
emcmake cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
|
||||
|
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@ -43,6 +43,7 @@ jobs:
|
||||
${{ matrix.platform.msys-env }}-cc
|
||||
${{ matrix.platform.msys-env }}-cmake
|
||||
${{ matrix.platform.msys-env }}-ninja
|
||||
${{ matrix.platform.msys-env }}-perl
|
||||
${{ matrix.platform.msys-env }}-pkg-config
|
||||
${{ matrix.platform.msys-env }}-clang-tools-extra
|
||||
|
||||
@ -52,7 +53,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential git \
|
||||
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
|
||||
libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
|
||||
libaudio-dev libjack-dev libsndio-dev libusb-1.0-0-dev libx11-dev libxext-dev \
|
||||
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
@ -65,6 +66,8 @@ jobs:
|
||||
- name: Setup Macos dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew update
|
||||
brew install \
|
||||
ninja \
|
||||
pkg-config \
|
||||
@ -73,10 +76,14 @@ jobs:
|
||||
- name: Setup Intel oneAPI
|
||||
if: matrix.platform.intel
|
||||
run: |
|
||||
# Setup oneAPI repo
|
||||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
# Download the key to system keyring
|
||||
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||
|
||||
# Add signed entry to apt sources and configure the APT client to use Intel repository:
|
||||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
|
||||
# Update package list
|
||||
sudo apt-get update -y
|
||||
|
||||
# Install oneAPI
|
||||
@ -103,6 +110,7 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.cmake }}
|
||||
- name: Build (CMake)
|
||||
id: build
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
@ -111,7 +119,7 @@ jobs:
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/
|
||||
ctest -VV --test-dir build/ -j2
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings build/libSDL3.so.0 | grep SDL-
|
||||
@ -123,6 +131,7 @@ jobs:
|
||||
cmake --install build/ --config Release
|
||||
( cd cmake_prefix; find . ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
@ -141,6 +150,7 @@ jobs:
|
||||
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
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
|
35
.github/workflows/msvc.yml
vendored
35
.github/workflows/msvc.yml
vendored
@ -21,9 +21,9 @@ jobs:
|
||||
- { 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' }
|
||||
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64' }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true,
|
||||
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32', notests: true }
|
||||
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64', notests: true }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true, notests: true,
|
||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
|
||||
|
||||
steps:
|
||||
@ -36,12 +36,20 @@ jobs:
|
||||
srcdir = r"${{ github.workspace }}".replace("\\", "/")
|
||||
builddir = f"{ srcdir }/build"
|
||||
os.makedirs(builddir)
|
||||
cmakelists_txt = textwrap.dedent(f"""\
|
||||
# Always build .PDB symbol file
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0141 "NEW" CACHE STRING "MSVC debug information format flags are selected by an abstraction")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "MSVC debug information format")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flags for executables")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flag for shared libraries")
|
||||
cmake_minimum_required(VERSION 3.0...3.25)
|
||||
project(sdl_user)
|
||||
enable_testing()
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
""")
|
||||
print(cmakelists_txt)
|
||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||
f.write(textwrap.dedent(f"""\
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(sdl_user)
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
"""))
|
||||
f.write(cmakelists_txt)
|
||||
- name: Configure (CMake)
|
||||
run: cmake -S build -B build `
|
||||
-Wdeprecated -Wdev -Werror `
|
||||
@ -53,20 +61,24 @@ jobs:
|
||||
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||
-DSDL_DISABLE_INSTALL=OFF `
|
||||
-DSDL_DISABLE_INSTALL_CPACK=OFF `
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF `
|
||||
${{ matrix.platform.flags }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
id: build
|
||||
run: |
|
||||
cmake --build build/ --config Release --parallel
|
||||
- name: Run build-time tests
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
if: ${{ !matrix.platform.notests }}
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release
|
||||
ctest -VV --test-dir build/ -C Release -j2
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target PACKAGE
|
||||
- name: Verify CMake configuration files
|
||||
@ -83,6 +95,7 @@ jobs:
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
|
15
.github/workflows/ps2.yml
vendored
15
.github/workflows/ps2.yml
vendored
@ -17,15 +17,6 @@ jobs:
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 ninja pkgconf make git
|
||||
|
||||
# To be removed once ps2_drivers is part of PS2DEV
|
||||
- name: Install ps2_drivers lib
|
||||
run: |
|
||||
git clone https://github.com/fjtrujy/ps2_drivers.git
|
||||
cd ps2_drivers
|
||||
make -j $(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j $(getconf _NPROCESSORS_ONLN)
|
||||
make -j $(getconf _NPROCESSORS_ONLN) install
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
@ -36,7 +27,7 @@ jobs:
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build --config Release --verbose -- -j 1
|
||||
run: cmake --build build --config Release --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
set -eu
|
||||
@ -45,7 +36,7 @@ jobs:
|
||||
( cd cmake_prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package -- -j 1
|
||||
cmake --build build/ --config Release --target package
|
||||
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
@ -55,7 +46,7 @@ jobs:
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose -- -j 1
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export CC=mips64r5900el-ps2-elf-gcc
|
||||
|
5
.github/workflows/vita.yml
vendored
5
.github/workflows/vita.yml
vendored
@ -87,6 +87,11 @@ jobs:
|
||||
run: |
|
||||
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi
|
||||
|
||||
- name: Fix vita.toolchain.cmake
|
||||
run: |
|
||||
# cache PKG_CONFIG_PATH
|
||||
sed -i -E 's/set\( PKG_CONFIG_EXECUTABLE "\$\{VITASDK}\/bin\/arm-vita-eabi-pkg-config" )/set( PKG_CONFIG_EXECUTABLE "${VITASDK}\/bin\/arm-vita-eabi-pkg-config" CACHE PATH "Path of pkg-config executable" )/' ${VITASDK}/share/vita.toolchain.cmake
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
|
70
.github/workflows/vmactions.yml
vendored
70
.github/workflows/vmactions.yml
vendored
@ -1,70 +0,0 @@
|
||||
name: Build (VM Actions)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: macos-12
|
||||
name: FreeBSD
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
uses: vmactions/freebsd-vm@v0
|
||||
with:
|
||||
mem: 8192
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y \
|
||||
cmake \
|
||||
ninja \
|
||||
pkgconf \
|
||||
libXcursor \
|
||||
libXext \
|
||||
libXinerama \
|
||||
libXi \
|
||||
libXfixes \
|
||||
libXrandr \
|
||||
libXScrnSaver \
|
||||
libXxf86vm \
|
||||
wayland \
|
||||
wayland-protocols \
|
||||
libxkbcommon \
|
||||
mesa-libs \
|
||||
libglvnd \
|
||||
evdev-proto \
|
||||
libinotify \
|
||||
alsa-lib \
|
||||
jackit \
|
||||
pipewire \
|
||||
pulseaudio \
|
||||
sndio \
|
||||
dbus \
|
||||
zh-fcitx \
|
||||
ibus \
|
||||
libsamplerate \
|
||||
libudev-devd
|
||||
|
||||
run: |
|
||||
cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL_HIDAPI_LIBUSB=OFF \
|
||||
-DSDL_CHECK_REQUIRED_INCLUDES="/usr/local/include" \
|
||||
-DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"
|
||||
cmake --build build/ --config Release --verbose -- -j`sysctl -n hw.ncpu`
|
||||
cmake --build build/ --config Release --target package
|
||||
|
||||
cmake --build build/ --config Release --target clean
|
||||
rm -rf build/dist/_CPack_Packages
|
||||
rm -rf build/CMakeFiles
|
||||
rm -rf build/docs
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-freebsd
|
||||
path: build/dist/SDL3*
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -66,8 +66,7 @@ VisualC/tests/gamepadmap/button.bmp
|
||||
VisualC/tests/gamepadmap/gamepadmap.bmp
|
||||
VisualC/tests/gamepadmap/gamepadmap_back.bmp
|
||||
VisualC/tests/loopwave/sample.wav
|
||||
VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
|
||||
VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
|
||||
VisualC/tests/testautomation/*.bmp
|
||||
VisualC/tests/testgamepad/axis.bmp
|
||||
VisualC/tests/testgamepad/button.bmp
|
||||
VisualC/tests/testgamepad/gamepadmap.bmp
|
||||
@ -80,6 +79,7 @@ VisualC/tests/testscale/sample.bmp
|
||||
VisualC/tests/testsprite/icon.bmp
|
||||
VisualC/tests/testyuv/testyuv.bmp
|
||||
VisualC-GDK/**/Layout
|
||||
VisualC-GDK/shaders/*.h
|
||||
|
||||
# for Android
|
||||
android-project/local.properties
|
||||
|
@ -24,6 +24,7 @@ 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/core/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
|
||||
|
259
CMakeLists.txt
259
CMakeLists.txt
@ -4,6 +4,9 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there")
|
||||
endif()
|
||||
|
||||
# MSVC runtime library flags are selected by an abstraction.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
|
||||
|
||||
# See docs/release_checklist.md
|
||||
project(SDL3 LANGUAGES C CXX VERSION "3.0.0")
|
||||
|
||||
@ -112,8 +115,8 @@ endif()
|
||||
# for systems without support. It's not currently enough to not use
|
||||
# pthread functions in a pthread-build; it won't start up on unsupported
|
||||
# browsers. As such, you have to explicitly enable it on Emscripten builds
|
||||
# for the time being. This default with change to ON once this becomes
|
||||
# commonly supported in browsers or the Emscripten teams makes a single
|
||||
# for the time being. This default will change to ON once this becomes
|
||||
# commonly supported in browsers or the Emscripten team makes a single
|
||||
# binary work everywhere.
|
||||
if (UNIX_OR_MAC_SYS AND NOT EMSCRIPTEN)
|
||||
set(SDL_PTHREADS_DEFAULT ON)
|
||||
@ -137,14 +140,6 @@ else()
|
||||
set(SDL_HIDAPI_LIBUSB_AVAILABLE TRUE)
|
||||
endif()
|
||||
|
||||
# On the other hand, *BSD specifically uses libusb only, so we make a special
|
||||
# case just for them.
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
set(SDL_HIDAPI_LIBUSB_DEFAULT TRUE)
|
||||
else()
|
||||
set(SDL_HIDAPI_LIBUSB_DEFAULT FALSE)
|
||||
endif()
|
||||
|
||||
set(SDL_ASSEMBLY_DEFAULT OFF)
|
||||
if(USE_CLANG OR USE_GCC OR USE_INTELCC OR MSVC_VERSION GREATER 1400)
|
||||
set(SDL_ASSEMBLY_DEFAULT ON)
|
||||
@ -166,6 +161,9 @@ endif()
|
||||
if(MSVC)
|
||||
option(SDL_FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF)
|
||||
if(SDL_FORCE_STATIC_VCRT)
|
||||
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
@ -222,6 +220,12 @@ if(VITA OR PSP OR PS2 OR N3DS OR RISCOS)
|
||||
set(SDL_LOADSO_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
if((RISCOS OR UNIX_SYS) AND NOT (LINUX OR NETBSD OR OPENBSD))
|
||||
set(SDL_OSS_DEFAULT ON)
|
||||
else()
|
||||
set(SDL_OSS_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
if(SDL_SHARED_DEFAULT AND SDL_STATIC_DEFAULT AND SDL_SHARED_AVAILABLE)
|
||||
if(DEFINED BUILD_SHARED_LIBS)
|
||||
# When defined, use BUILD_SHARED_LIBS as default
|
||||
@ -297,6 +301,7 @@ dep_option(SDL_LASX "Use LASX assembly routines" ON "SDL_ASSEMBLY
|
||||
|
||||
set_option(SDL_LIBC "Use the system C library" ${SDL_LIBC_DEFAULT})
|
||||
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ${SDL_SYSTEM_ICONV_DEFAULT})
|
||||
set_option(SDL_LIBICONV "Prefer iconv() from libiconv, if available, over libc version" OFF)
|
||||
set_option(SDL_GCC_ATOMICS "Use gcc builtin atomics" ${SDL_GCC_ATOMICS_DEFAULT})
|
||||
dep_option(SDL_DBUS "Enable D-Bus support" ON ${UNIX_SYS} OFF)
|
||||
set_option(SDL_DISKAUDIO "Support the disk writer audio driver" ON)
|
||||
@ -307,7 +312,7 @@ dep_option(SDL_OPENGL "Include OpenGL support" ON "NOT VISIONOS" OF
|
||||
dep_option(SDL_OPENGLES "Include OpenGL ES support" ON "NOT VISIONOS" OFF)
|
||||
set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_DEFAULT})
|
||||
dep_option(SDL_PTHREADS_SEM "Use pthread semaphores" ON "SDL_PTHREADS" OFF)
|
||||
dep_option(SDL_OSS "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF)
|
||||
dep_option(SDL_OSS "Support the OSS audio API" ${SDL_OSS_DEFAULT} "UNIX_SYS OR RISCOS" OFF)
|
||||
set_option(SDL_ALSA "Support the ALSA audio API" ${UNIX_SYS})
|
||||
dep_option(SDL_ALSA_SHARED "Dynamically load ALSA audio support" ON "SDL_ALSA" OFF)
|
||||
set_option(SDL_JACK "Support the JACK audio API" ${UNIX_SYS})
|
||||
@ -331,7 +336,6 @@ set_option(SDL_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
|
||||
dep_option(SDL_WAYLAND_SHARED "Dynamically load Wayland support" ON "SDL_WAYLAND" OFF)
|
||||
dep_option(SDL_WAYLAND_LIBDECOR "Use client-side window decorations on Wayland" ON "SDL_WAYLAND" OFF)
|
||||
dep_option(SDL_WAYLAND_LIBDECOR_SHARED "Dynamically load libdecor support" ON "SDL_WAYLAND_LIBDECOR;SDL_WAYLAND_SHARED" OFF)
|
||||
dep_option(SDL_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "SDL_WAYLAND" OFF)
|
||||
dep_option(SDL_RPI "Use Raspberry Pi video driver" ON "UNIX_SYS;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
|
||||
dep_option(SDL_ROCKCHIP "Use ROCKCHIP Hardware Acceleration video driver" ON "UNIX_SYS;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
|
||||
set_option(SDL_COCOA "Use Cocoa video driver" ${APPLE})
|
||||
@ -346,10 +350,12 @@ set_option(SDL_METAL "Enable Metal support" ${APPLE})
|
||||
set_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
|
||||
dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF)
|
||||
set_option(SDL_OFFSCREEN "Use offscreen video driver" ON)
|
||||
dep_option(SDL_VIDEO_CAPTURE "Enable video capturing" ON SDL_VIDEO OFF)
|
||||
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
||||
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
||||
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ${SDL_HIDAPI_LIBUSB_DEFAULT} "SDL_HIDAPI;${SDL_HIDAPI_LIBUSB_AVAILABLE}" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON SDL_HIDAPI_LIBUSB_AVAILABLE OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB_SHARED "Dynamically load libusb support" ON SDL_HIDAPI_LIBUSB OFF)
|
||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
||||
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||
set_option(SDL_LIBUDEV "Enable libudev support" ON)
|
||||
@ -424,7 +430,7 @@ if(WINDOWS_STORE)
|
||||
sdl_compile_options(PRIVATE "-ZW")
|
||||
endif()
|
||||
|
||||
check_linker_flag(C "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym" HAVE_WL_VERSION_SCRIPT)
|
||||
check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT)
|
||||
if(HAVE_WL_VERSION_SCRIPT)
|
||||
sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym")
|
||||
else()
|
||||
@ -476,6 +482,7 @@ sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/hidapi/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/libm/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/locale/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/main/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/misc/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/power/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/render/*.c"
|
||||
@ -487,6 +494,18 @@ sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/video/*.c"
|
||||
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.c"
|
||||
)
|
||||
if(MSVC AND TARGET SDL3-shared)
|
||||
if(SDL_CPU_X64)
|
||||
enable_language(ASM_MASM)
|
||||
set(asm_src "${SDL3_SOURCE_DIR}/src/stdlib/SDL_mslibc_x64.masm")
|
||||
target_compile_options(SDL3-shared PRIVATE "$<$<COMPILE_LANGUAGE:ASM_MASM>:/nologo>")
|
||||
set_property(SOURCE "${asm_src}" PROPERTY LANGUAGE "ASM_MASM")
|
||||
target_sources(SDL3-shared PRIVATE "${asm_src}")
|
||||
elseif(SDL_CPU_ARM32 OR SDL_CPU_ARM64)
|
||||
# FIXME: ARM assembler (armasm.exe/armasm64.exe) is NOT ASM_MASM, and does currently not work with CMake
|
||||
# (https://gitlab.kitware.com/cmake/cmake/-/issues/18912)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_INTELCC)
|
||||
# warning #39: division by zero
|
||||
@ -986,12 +1005,21 @@ if(NOT HAVE_ARMNEON)
|
||||
set(SDL_DISABLE_NEON 1)
|
||||
endif()
|
||||
|
||||
set(SDL_DISABLE_ALLOCA 0)
|
||||
check_include_file("alloca.h" "HAVE_ALLOCA_H")
|
||||
if(MSVC)
|
||||
check_include_file("malloc.h" "HAVE_MALLOC")
|
||||
check_symbol_exists("_alloca" "malloc.h" _ALLOCA_IN_MALLOC_H)
|
||||
if(NOT HAVE_ALLOCA_H AND NOT _ALLOCA_IN_MALLOC_H)
|
||||
set(SDL_DISABLE_ALLOCA 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO: Can't deactivate on FreeBSD? w/o LIBC, SDL_stdinc.h can't define anything.
|
||||
if(SDL_LIBC)
|
||||
set(available_headers)
|
||||
set(HAVE_LIBC TRUE)
|
||||
set(headers_to_check
|
||||
alloca.h
|
||||
ctype.h
|
||||
float.h
|
||||
iconv.h
|
||||
@ -1023,7 +1051,7 @@ if(SDL_LIBC)
|
||||
endforeach()
|
||||
|
||||
set(symbols_to_check
|
||||
abs acos acosf alloca asin asinf atan atan2 atan2f atanf atof atoi
|
||||
abs acos acosf asin asinf atan atan2 atan2f atanf atof atoi
|
||||
bcopy bsearch
|
||||
calloc ceil ceilf copysign copysignf cos cosf
|
||||
_Exit exp expf
|
||||
@ -1037,7 +1065,7 @@ if(SDL_LIBC)
|
||||
realloc rindex round roundf
|
||||
scalbn scalbnf setenv sin sinf sqr sqrt sqrtf sscanf strchr
|
||||
strcmp strlcat strlcpy strlen strncmp strnlen
|
||||
strrchr strstr strtod strtok_r strtol strtoll strtoul strtoull
|
||||
strrchr strstr strnstr strtod strtok_r strtol strtoll strtoul strtoull
|
||||
tan tanf trunc truncf
|
||||
unsetenv
|
||||
vsnprintf vsscanf
|
||||
@ -1067,8 +1095,6 @@ if(SDL_LIBC)
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(NOT WINDOWS)
|
||||
check_include_file(linux/input.h HAVE_LINUX_INPUT_H)
|
||||
|
||||
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
||||
@ -1080,24 +1106,31 @@ if(SDL_LIBC)
|
||||
check_symbol_exists(poll "poll.h" HAVE_POLL)
|
||||
|
||||
if(SDL_SYSTEM_ICONV)
|
||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||
if(HAVE_LIBICONV)
|
||||
find_package(Iconv)
|
||||
if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
pkg_check_modules(PC_ICONV iconv)
|
||||
if(PC_ICONV_FOUND)
|
||||
sdl_link_dependency(iconv LIBS Iconv::Iconv CMAKE_MODULE Iconv PKG_CONFIG_SPECS iconv)
|
||||
else()
|
||||
sdl_link_dependency(iconv LIBS Iconv::Iconv CMAKE_MODULE Iconv PKG_CONFIG_LIBS iconv)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
check_c_source_compiles("
|
||||
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBC)
|
||||
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES iconv)
|
||||
check_c_source_compiles("
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBICONV)
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(ICONV_IN_LIBC OR ICONV_IN_LIBICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
if(ICONV_IN_LIBICONV AND (SDL_LIBICONV OR (NOT ICONV_IN_LIBC)))
|
||||
sdl_link_dependency(iconv LIBS iconv)
|
||||
set(SDL_USE_LIBICONV 1)
|
||||
set(HAVE_LIBICONV TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -1331,6 +1364,10 @@ if(ANDROID)
|
||||
VERSION "${SDL3_VERSION}"
|
||||
)
|
||||
set_property(TARGET SDL3-jar PROPERTY OUTPUT "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}.jar")
|
||||
add_library(SDL3__Jar INTERFACE)
|
||||
add_library(SDL3::Jar ALIAS SDL3__Jar)
|
||||
get_property(sdl3_jar_location TARGET SDL3-jar PROPERTY JAR_FILE)
|
||||
set_property(TARGET SDL3__Jar PROPERTY JAR_FILE "${sdl3_jar_location}")
|
||||
set(javasourcesjar "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-sources.jar")
|
||||
string(REGEX REPLACE "${android_java_sources_root}/" "" sdl_relative_java_sources "${SDL_JAVA_SOURCES}")
|
||||
add_custom_command(
|
||||
@ -1363,6 +1400,9 @@ elseif(EMSCRIPTEN)
|
||||
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
|
||||
sdl_compile_options(PRIVATE "-Wno-warn-absolute-paths")
|
||||
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/emscripten/*.c")
|
||||
set(HAVE_SDL_MAIN_CALLBACKS TRUE)
|
||||
|
||||
if(SDL_MISC)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/emscripten/*.c")
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
@ -1458,14 +1498,12 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(UNIX)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/unix/*.c")
|
||||
|
||||
if (HAVE_LINUX_INPUT_H)
|
||||
check_c_source_compiles("
|
||||
#include <linux/input.h>
|
||||
#ifndef EVIOCGNAME
|
||||
#error EVIOCGNAME() ioctl not available
|
||||
#endif
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_INPUT_EVENTS)
|
||||
endif()
|
||||
check_c_source_compiles("
|
||||
#include <linux/input.h>
|
||||
#ifndef EVIOCGNAME
|
||||
#error EVIOCGNAME() ioctl not available
|
||||
#endif
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_LINUX_INPUT_H)
|
||||
|
||||
if(LINUX)
|
||||
check_c_source_compiles("
|
||||
@ -1501,11 +1539,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
}" HAVE_INPUT_WSCONS)
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
set(SDL_INPUT_LINUXEV 1)
|
||||
endif()
|
||||
|
||||
if(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
|
||||
if(SDL_HAPTIC AND HAVE_LINUX_INPUT_H)
|
||||
set(SDL_HAPTIC_LINUX 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/haptic/linux/*.c")
|
||||
set(HAVE_SDL_HAPTIC TRUE)
|
||||
@ -1558,7 +1596,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(SDL_USE_IME 1)
|
||||
endif()
|
||||
|
||||
if(FREEBSD AND NOT HAVE_INOTIFY)
|
||||
if((FREEBSD OR NETBSD) AND NOT HAVE_INOTIFY)
|
||||
set(LibInotify_PKG_CONFIG_SPEC libinotify)
|
||||
pkg_check_modules(PC_LIBINOTIFY IMPORTED_TARGET ${LibInotify_PKG_CONFIG_SPEC})
|
||||
if(PC_LIBINOTIFY_FOUND)
|
||||
@ -1593,7 +1631,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/core/linux/SDL_udev.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
sdl_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev.c"
|
||||
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c"
|
||||
@ -1604,6 +1642,13 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/core/freebsd/SDL_evdev_kbd_freebsd.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_WSCONS)
|
||||
sdl_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/core/openbsd/SDL_wscons_kbd.c"
|
||||
"${SDL3_SOURCE_DIR}/src/core/openbsd/SDL_wscons_mouse.c"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Always compiled for Linux, unconditionally:
|
||||
sdl_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c"
|
||||
@ -1718,7 +1763,7 @@ elseif(WINDOWS)
|
||||
|
||||
if(TARGET SDL3-shared AND MSVC AND NOT SDL_LIBC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
target_compile_options(SDL3-shared PRIVATE "/GS-" "/Gs1048576")
|
||||
target_compile_options(SDL3-shared PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/GS-> $<$<COMPILE_LANGUAGE:C,CXX>:/Gs1048576>)
|
||||
if(SDL_CPU_X86)
|
||||
target_compile_options(SDL3-shared PRIVATE "/arch:SSE")
|
||||
endif()
|
||||
@ -1784,16 +1829,6 @@ elseif(WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_H)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_GAMEPAD_EX)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_STATE_EX)
|
||||
check_c_source_compiles("
|
||||
#define COBJMACROS
|
||||
#include <windows.gaming.input.h>
|
||||
@ -1923,8 +1958,8 @@ elseif(WINDOWS)
|
||||
vccorlib$<$<CONFIG:Debug>:d>.lib
|
||||
msvcrt$<$<CONFIG:Debug>:d>.lib
|
||||
LINK_OPTIONS
|
||||
-nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
|
||||
-nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
|
||||
/nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
|
||||
/nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -2013,6 +2048,8 @@ elseif(WINDOWS)
|
||||
elseif(APPLE)
|
||||
# TODO: rework this all for proper macOS, iOS and Darwin support
|
||||
|
||||
# !!! FIXME: all the `if(IOS OR TVOS OR VISIONOS)` checks should get merged into one variable, so we're ready for the next platform (or just WatchOS).
|
||||
|
||||
# We always need these libs on macOS at the moment.
|
||||
# !!! FIXME: we need Carbon for some very old API calls in
|
||||
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
|
||||
@ -2024,12 +2061,22 @@ elseif(APPLE)
|
||||
set(SDL_FRAMEWORK_FOUNDATION 1)
|
||||
set(SDL_FRAMEWORK_COREVIDEO 1)
|
||||
|
||||
# iOS can use a CADisplayLink for main callbacks. macOS just uses the generic one atm.
|
||||
if(IOS OR TVOS OR VISIONOS)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/ios/*.m")
|
||||
set(HAVE_SDL_MAIN_CALLBACKS TRUE)
|
||||
endif()
|
||||
|
||||
# Requires the darwin file implementation
|
||||
if(SDL_FILE)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/file/cocoa/*.m")
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
endif()
|
||||
|
||||
if(IOS OR TVOS OR MACOSX OR DARWIN)
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/video/SDL_video_capture_apple.m")
|
||||
endif()
|
||||
|
||||
if(SDL_MISC)
|
||||
if(IOS OR TVOS OR VISIONOS)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/ios/*.m")
|
||||
@ -2132,7 +2179,7 @@ elseif(APPLE)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif(SDL_TIMERS)
|
||||
endif()
|
||||
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_COCOA 1)
|
||||
@ -2213,6 +2260,10 @@ elseif(APPLE)
|
||||
|
||||
# Actually load the frameworks at the end so we don't duplicate include.
|
||||
if(SDL_FRAMEWORK_COREVIDEO)
|
||||
find_library(COREMEDIA CoreMedia)
|
||||
if(COREMEDIA)
|
||||
sdl_link_dependency(corevideo LINK_OPTIONS "-Wl,-framework,CoreMedia")
|
||||
endif()
|
||||
sdl_link_dependency(corevideo LINK_OPTIONS "-Wl,-framework,CoreVideo")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COCOA)
|
||||
@ -2419,7 +2470,7 @@ elseif(VITA)
|
||||
"${SDL3_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/vita/SDL_syssem.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/vita/SDL_systhread.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/vita/SDL_syscond.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c"
|
||||
)
|
||||
@ -2550,6 +2601,7 @@ elseif(PSP)
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PSP 1)
|
||||
sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c"
|
||||
"${SDL3_SOURCE_DIR}/src/thread/psp/*.c"
|
||||
@ -2779,8 +2831,12 @@ if(NOT HAVE_SDL_THREADS)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_SDL_TIMERS)
|
||||
set(SDL_TIMER_DUMMY 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/dummy/*.c")
|
||||
message(FATAL_ERROR "Timers are needed by many SDL subsystems and may not be disabled")
|
||||
endif()
|
||||
|
||||
# Most platforms use this.
|
||||
if(NOT HAVE_SDL_MAIN_CALLBACKS)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/generic/*.c")
|
||||
endif()
|
||||
|
||||
# config variables may contain generator expression, so we need to generate SDL_build_config.h in 2 steps:
|
||||
@ -2805,7 +2861,7 @@ set(SDL_REVISION "" CACHE STRING "Custom SDL revision (overrides SDL_REVISION_SU
|
||||
if(NOT SDL_REVISION)
|
||||
set(SDL_REVISION_SUFFIX "" CACHE STRING "Suffix for the SDL revision")
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt")
|
||||
# If VERSION exists, it contains the SDL version
|
||||
# If VERSION.txt exists, it contains the SDL version
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" SDL_REVISION_CENTER)
|
||||
string(STRIP "${SDL_REVISION_CENTER}" SDL_REVISION_CENTER)
|
||||
else()
|
||||
@ -2953,6 +3009,12 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
cmake_push_check_state(RESET)
|
||||
check_c_compiler_flag(-fobjc-arc COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
cmake_pop_check_state()
|
||||
if(NOT COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
message(FATAL_ERROR "Compiler does not support -fobjc-arc: this is required on Apple platforms")
|
||||
endif()
|
||||
sdl_compile_options(PRIVATE "-fobjc-arc")
|
||||
endif()
|
||||
|
||||
@ -2960,6 +3022,24 @@ if(PS2)
|
||||
sdl_compile_options(PRIVATE "-Wno-error=declaration-after-statement")
|
||||
endif()
|
||||
|
||||
if(NOT SDL_LIBC)
|
||||
if(MSVC)
|
||||
set(saved_CMAKE_TRY_COMPILE_TARGET_TYPE "${CMAKE_TRY_COMPILE_TARGET_TYPE}")
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
|
||||
check_c_compiler_flag("/Zl" COMPILER_SUPPORTS_Zl)
|
||||
cmake_pop_check_state()
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE "${saved_CMAKE_TRY_COMPILE_TARGET_TYPE}")
|
||||
if(COMPILER_SUPPORTS_Zl)
|
||||
# /Zl omits the default C runtime library name from the .obj file.
|
||||
sdl_compile_options(PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/Zl>")
|
||||
if(TARGET SDL3_test)
|
||||
target_compile_options(SDL3_test PRIVATE "/Zl")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
get_property(sources TARGET SDL3-collector PROPERTY INTERFACE_SOURCES)
|
||||
foreach(SOURCE_FILE IN LISTS sources)
|
||||
@ -3030,9 +3110,15 @@ if(SDL_SHARED)
|
||||
)
|
||||
endif()
|
||||
if(NOT SDL_LIBC)
|
||||
if(MSVC AND SDL_CPU_X86)
|
||||
# FIXME: should be added for all architectures (missing symbols for ARM)
|
||||
target_link_libraries(SDL3-shared PRIVATE "-nodefaultlib:MSVCRT")
|
||||
if(MSVC AND (NOT MSVC_CLANG AND NOT WINDOWS_STORE))
|
||||
# Don't try to link with the default set of libraries.
|
||||
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
|
||||
target_link_options(SDL3-shared PRIVATE "/NODEFAULTLIB")
|
||||
if(SDL_CPU_ARM32)
|
||||
# linking to msvcrt.lib avoid unresolved external symbols
|
||||
# (__rt_sdiv, __rt_udiv, __rt_sdiv64, _rt_udiv64, __dtou64, __u64tod, __i64tos)
|
||||
target_link_libraries(SDL3-shared PRIVATE msvcrt.lib)
|
||||
endif()
|
||||
endif()
|
||||
if(HAS_Q_NO_USE_LIBIRC)
|
||||
target_compile_options(SDL3-shared PRIVATE /Q_no-use-libirc)
|
||||
@ -3067,14 +3153,6 @@ if(SDL_SHARED)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
|
||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT SDL_CPU_ARM32)
|
||||
# Don't try to link with the default set of libraries.
|
||||
if(NOT WINDOWS_STORE)
|
||||
# FIXME: is this needed? "-nodefaultlib:MSVCRT" ia already added when SDL_LIBC is false
|
||||
target_link_options(SDL3-shared PRIVATE "/NODEFAULTLIB")
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(SDL3-shared PRIVATE ${SDL_CMAKE_DEPENDS})
|
||||
target_include_directories(SDL3-shared
|
||||
PRIVATE
|
||||
@ -3232,6 +3310,7 @@ sdl_cmake_config_find_pkg_config_commands(SDL_TEST_FIND_PKG_CONFIG_COMMANDS
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(cmake/SDL3Config.cmake.in SDL3Config.cmake
|
||||
NO_SET_AND_CHECK_MACRO
|
||||
PATH_VARS CMAKE_INSTALL_PREFIX
|
||||
INSTALL_DESTINATION "${SDL_SDL_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
@ -3265,6 +3344,9 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
FRAMEWORK DESTINATION "."
|
||||
RESOURCE DESTINATION "${SDL_SDL_INSTALL_RESOURCEDIR}"
|
||||
)
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL3-shared "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
@ -3273,6 +3355,9 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
FRAMEWORK DESTINATION "."
|
||||
RESOURCE DESTINATION "${SDL_SDLstatic_INSTALL_RESOURCEDIR}"
|
||||
)
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL3-static "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_TEST_LIBRARY)
|
||||
@ -3281,6 +3366,9 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
FRAMEWORK DESTINATION "."
|
||||
RESOURCE DESTINATION "${SDL_SDLtest_INSTALL_RESOURCEDIR}"
|
||||
)
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL3_test "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##### Install CMake Targets #####
|
||||
@ -3352,10 +3440,19 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
set(SDL_INSTALL_JAVADIR "${CMAKE_INSTALL_DATAROOTDIR}/java" CACHE PATH "Path where to install java clases + java sources")
|
||||
if(TARGET SDL3-jar)
|
||||
install(FILES "${SDL3_BINARY_DIR}/SDL3.jar" "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}.jar"
|
||||
set(SDL_INSTALL_JAVADIR "${CMAKE_INSTALL_DATAROOTDIR}/java" CACHE PATH "Path where to install java clases + java sources")
|
||||
install(FILES $<TARGET_PROPERTY:SDL3-jar,INSTALL_FILES>
|
||||
DESTINATION "${SDL_INSTALL_JAVADIR}/SDL3")
|
||||
configure_package_config_file(cmake/SDL3jarTargets.cmake.in SDL3jarTargets.cmake
|
||||
INSTALL_DESTINATION "${SDL_SDL_INSTALL_CMAKEDIR}"
|
||||
PATH_VARS SDL_INSTALL_JAVADIR
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SDL3jarTargets.cmake"
|
||||
DESTINATION "${SDL_SDL_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
endif()
|
||||
if(TARGET SDL3-javasources)
|
||||
install(FILES "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-sources.jar"
|
||||
@ -3365,8 +3462,10 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
|
||||
if(NOT SDL_DISABLE_INSTALL_DOCS)
|
||||
SDL_generate_manpages(
|
||||
HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3"
|
||||
SYMBOL "SDL_Init"
|
||||
WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
|
||||
REVISION "${SDL_REVISION}"
|
||||
)
|
||||
if(TARGET SDL3-javadoc)
|
||||
set(SDL_INSTALL_JAVADOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/javadoc" CACHE PATH "Path where to install SDL3 javadoc")
|
||||
|
34
CREDITS.md
Normal file
34
CREDITS.md
Normal file
@ -0,0 +1,34 @@
|
||||
# Simple DirectMedia Layer CREDITS
|
||||
|
||||
Thanks to everyone who made this possible, including:
|
||||
|
||||
- Cliff Matthews, for giving me a reason to start this project. :) -- Executor rocks! *grin*
|
||||
- Ryan Gordon for helping everybody out and keeping the dream alive. :)
|
||||
- Gabriel Jacobo for his work on the Android port and generally helping out all around.
|
||||
- Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
|
||||
- Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
|
||||
- Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.
|
||||
- Alfred Reynolds for the game controller API and general (in)sanity
|
||||
- Jørgen Tjernø¸ for numerous magical macOS fixes.
|
||||
- Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.
|
||||
- Julian Winter for the SDL 2.0 website.
|
||||
- Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.
|
||||
- Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.
|
||||
- Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.
|
||||
- Jim Grandpre for his work on multi-touch and gesture recognition during
|
||||
the Google Summer of Code 2010.
|
||||
- Edgar "bobbens" Simo for his force feedback API development during the
|
||||
Google Summer of Code 2008.
|
||||
- Aaron Wishnick for his work on audio resampling and pitch shifting during
|
||||
the Google Summer of Code 2008.
|
||||
- Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
|
||||
Google Summer of Code 2008.
|
||||
- Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
|
||||
- Everybody at Loki Software, Inc. for their great contributions!
|
||||
|
||||
And a big hand to everyone else who has contributed over the years.
|
||||
|
||||
THANKS! :)
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org>
|
||||
|
53
CREDITS.txt
53
CREDITS.txt
@ -1,53 +0,0 @@
|
||||
|
||||
Simple DirectMedia Layer CREDITS
|
||||
Thanks to everyone who made this possible, including:
|
||||
|
||||
* Cliff Matthews, for giving me a reason to start this project. :)
|
||||
-- Executor rocks! *grin*
|
||||
|
||||
* Ryan Gordon for helping everybody out and keeping the dream alive. :)
|
||||
|
||||
* Gabriel Jacobo for his work on the Android port and generally helping out all around.
|
||||
|
||||
* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
|
||||
|
||||
* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
|
||||
|
||||
* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.
|
||||
|
||||
* Alfred Reynolds for the game controller API and general (in)sanity
|
||||
|
||||
* Jørgen Tjernø for numerous magical macOS fixes.
|
||||
|
||||
* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.
|
||||
|
||||
* Julian Winter for the SDL 2.0 website.
|
||||
|
||||
* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.
|
||||
|
||||
* Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.
|
||||
|
||||
* Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.
|
||||
|
||||
* Jim Grandpre for his work on multi-touch and gesture recognition during
|
||||
the Google Summer of Code 2010.
|
||||
|
||||
* Edgar "bobbens" Simo for his force feedback API development during the
|
||||
Google Summer of Code 2008.
|
||||
|
||||
* Aaron Wishnick for his work on audio resampling and pitch shifting during
|
||||
the Google Summer of Code 2008.
|
||||
|
||||
* Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
|
||||
Google Summer of Code 2008.
|
||||
|
||||
* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
|
||||
|
||||
* Everybody at Loki Software, Inc. for their great contributions!
|
||||
|
||||
And a big hand to everyone else who has contributed over the years.
|
||||
|
||||
THANKS! :)
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org>
|
||||
|
64
INSTALL.md
Normal file
64
INSTALL.md
Normal file
@ -0,0 +1,64 @@
|
||||
# To compile and install SDL:
|
||||
|
||||
## Windows with Visual Studio:
|
||||
|
||||
Read ./docs/README-visualc.md
|
||||
|
||||
## Windows building with mingw-w64 for x86:
|
||||
|
||||
Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-i686.cmake && cmake --build build && cmake --install build`
|
||||
|
||||
## Windows building with mingw-w64 for x64:
|
||||
|
||||
Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake && cmake --build build && cmake --install build`
|
||||
|
||||
## macOS with Xcode:
|
||||
|
||||
Read docs/README-macos.md
|
||||
|
||||
## macOS from the command line:
|
||||
|
||||
Run: `cmake -S . -B build && cmake --build build && cmake --install build`
|
||||
|
||||
## Linux and other UNIX systems:
|
||||
|
||||
Run: `cmake -S . -B build && cmake --build build && cmake --install build`
|
||||
|
||||
## Android:
|
||||
|
||||
Read docs/README-android.md
|
||||
|
||||
## iOS:
|
||||
|
||||
Read docs/README-ios.md
|
||||
|
||||
## Using CMake:
|
||||
|
||||
Read docs/README-cmake.md
|
||||
|
||||
# Example code
|
||||
|
||||
Look at the example programs in ./test, and check out the online
|
||||
documentation at https://wiki.libsdl.org/SDL3/
|
||||
|
||||
# Discussion
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
Join the SDL developer discussions, sign up on
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
and go to the development forum
|
||||
|
||||
https://discourse.libsdl.org/c/sdl-development/6
|
||||
|
||||
Once you sign up, you can use the forum through the website, or as a mailing
|
||||
list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
Sign up for the announcement list through the web interface:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
43
INSTALL.txt
43
INSTALL.txt
@ -1,43 +0,0 @@
|
||||
|
||||
To compile and install SDL:
|
||||
|
||||
1. Windows with Visual Studio:
|
||||
* Read ./docs/README-visualc.md
|
||||
|
||||
Windows building with mingw-w64 for x86:
|
||||
* Run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-i686.cmake && cmake --build build && cmake --install build
|
||||
|
||||
Windows building with mingw-w64 for x64:
|
||||
* Run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake && cmake --build build && cmake --install build
|
||||
|
||||
macOS with Xcode:
|
||||
* Read docs/README-macos.md
|
||||
|
||||
macOS from the command line:
|
||||
* Run: cmake -S . -B build && cmake --build build && cmake --install build
|
||||
|
||||
Linux and other UNIX systems:
|
||||
* Run: cmake -S . -B build && cmake --build build && cmake --install build
|
||||
|
||||
Android:
|
||||
* Read docs/README-android.md
|
||||
|
||||
iOS:
|
||||
* Read docs/README-ios.md
|
||||
|
||||
Using Cmake:
|
||||
* Read docs/README-cmake.md
|
||||
|
||||
2. Look at the example programs in ./test, and check out the online
|
||||
documentation at https://wiki.libsdl.org/
|
||||
|
||||
3. Join the SDL developer discussions, sign up on
|
||||
https://discourse.libsdl.org/
|
||||
and go to the development forum
|
||||
https://discourse.libsdl.org/c/sdl-development/6
|
||||
|
||||
4. Sign up for the announcement list through the web interface:
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
That's it!
|
||||
Sam Lantinga <slouken@libsdl.org>
|
@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
|
@ -10,7 +10,8 @@ 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
|
||||
with [README.md](docs/README.md). If you are migrating to SDL 3.0 from SDL 2.0,
|
||||
the changes are extensively documented in [README-migration.md](docs/README-migration.md).
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
10
TODO.txt
10
TODO.txt
@ -1,10 +0,0 @@
|
||||
Future work roadmap:
|
||||
* http://wiki.libsdl.org/Roadmap
|
||||
|
||||
* Check 1.2 revisions:
|
||||
3554 - Need to resolve semantics for locking keys on different platforms
|
||||
4874 - Do we want screen rotation? At what level?
|
||||
4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
|
||||
4865 - See if this is still needed (mouse coordinate clamping)
|
||||
4866 - See if this is still needed (blocking window repositioning)
|
||||
|
@ -11,6 +11,9 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_test", "SDL_test\SDL_test.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testcontroller", "tests\testcontroller\testcontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgdk", "tests\testgdk\testgdk.vcxproj", "{1C9A3F71-35A5-4C56-B292-F4375B3C3649}"
|
||||
EndProject
|
||||
|
@ -59,6 +59,7 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
@ -129,7 +130,7 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@ -169,6 +170,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@ -197,6 +204,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<Midl>
|
||||
@ -214,7 +227,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@ -257,6 +270,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir)</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@ -286,6 +305,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(SolutionDir)\shaders\buildshaders.bat $(SolutionDir) one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
@ -329,6 +354,7 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2ext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
|
||||
@ -340,11 +366,9 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_syswm.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_common.h" />
|
||||
@ -370,6 +394,8 @@
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
|
||||
@ -405,6 +431,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
@ -415,6 +442,7 @@
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
@ -438,7 +466,6 @@
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
@ -454,6 +481,12 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.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\render\direct3d12\SDL_render_d3d12_xbox.cpp">
|
||||
<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>
|
||||
@ -466,11 +499,15 @@
|
||||
<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\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
@ -516,12 +553,10 @@
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
@ -531,7 +566,6 @@
|
||||
<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_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" />
|
||||
@ -539,8 +573,6 @@
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
@ -550,10 +582,14 @@
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
@ -578,11 +614,15 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.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>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
@ -620,6 +660,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
@ -627,6 +668,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
@ -696,6 +738,7 @@
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
@ -707,11 +750,12 @@
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
@ -722,6 +766,9 @@
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
|
||||
<MASM Condition="'$(Platform)'=='x64'" Include="..\..\src\stdlib\SDL_mslibc_x64.masm">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</MASM>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
@ -759,10 +806,11 @@
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_shape.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video_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" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
@ -774,7 +822,6 @@
|
||||
<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_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" />
|
||||
@ -785,5 +832,6 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -4,3 +4,4 @@ find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -del
|
||||
find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
|
||||
find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
|
||||
find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;
|
||||
rm shaders/*.h
|
||||
|
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
@ -0,0 +1,46 @@
|
||||
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;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
@ -0,0 +1,46 @@
|
||||
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;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
@ -0,0 +1,46 @@
|
||||
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;
|
||||
}
|
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
@ -0,0 +1,95 @@
|
||||
#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);
|
||||
}
|
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
@ -0,0 +1,35 @@
|
||||
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
|
@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||
@ -211,7 +211,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||
@ -273,6 +273,12 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDL_test\SDL_test.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\gamepadutils.c" />
|
||||
@ -298,7 +304,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@ -18,9 +18,6 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
@ -34,6 +31,9 @@
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="PackageLayout.xml" />
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="logos">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -53,23 +53,14 @@ static struct
|
||||
int soundpos; /* Current play position */
|
||||
} wave;
|
||||
|
||||
static SDL_AudioDeviceID device;
|
||||
|
||||
static void
|
||||
close_audio()
|
||||
{
|
||||
if (device != 0) {
|
||||
SDL_CloseAudioDevice(device);
|
||||
device = 0;
|
||||
}
|
||||
}
|
||||
static SDL_AudioStream *stream;
|
||||
|
||||
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
|
||||
static void
|
||||
quit(int rc)
|
||||
{
|
||||
SDL_free(sprites);
|
||||
close_audio();
|
||||
SDL_DestroyAudioStream(stream);
|
||||
SDL_free(wave.sound);
|
||||
SDLTest_CommonQuit(state);
|
||||
/* If rc is 0, just let main return normally rather than calling exit.
|
||||
@ -80,49 +71,13 @@ quit(int rc)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
open_audio()
|
||||
static int fillerup(void)
|
||||
{
|
||||
/* Initialize fillerup() variables */
|
||||
device = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wave.spec, NULL, 0);
|
||||
if (!device) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());
|
||||
SDL_free(wave.sound);
|
||||
quit(2);
|
||||
const int minimum = (wave.soundlen / SDL_AUDIO_FRAMESIZE(wave.spec)) / 2;
|
||||
if (SDL_GetAudioStreamQueued(stream) < minimum) {
|
||||
SDL_PutAudioStreamData(stream, wave.sound, wave.soundlen);
|
||||
}
|
||||
|
||||
/* Let the audio run */
|
||||
SDL_PlayAudioDevice(device);
|
||||
}
|
||||
|
||||
static void
|
||||
reopen_audio()
|
||||
{
|
||||
close_audio();
|
||||
open_audio();
|
||||
}
|
||||
|
||||
void SDLCALL
|
||||
fillerup(void *unused, Uint8 *stream, int len)
|
||||
{
|
||||
Uint8 *waveptr;
|
||||
int waveleft;
|
||||
|
||||
/* Set up the pointers */
|
||||
waveptr = wave.sound + wave.soundpos;
|
||||
waveleft = wave.soundlen - wave.soundpos;
|
||||
|
||||
/* Go! */
|
||||
while (waveleft <= len) {
|
||||
SDL_memcpy(stream, waveptr, waveleft);
|
||||
stream += waveleft;
|
||||
len -= waveleft;
|
||||
waveptr = wave.sound;
|
||||
waveleft = wave.soundlen;
|
||||
wave.soundpos = 0;
|
||||
}
|
||||
SDL_memcpy(stream, waveptr, len);
|
||||
wave.soundpos += len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
@ -371,6 +326,7 @@ loop()
|
||||
}
|
||||
DrawSprites(state->renderers[i], sprites[i]);
|
||||
}
|
||||
fillerup();
|
||||
}
|
||||
|
||||
int
|
||||
@ -385,7 +341,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
if (state == NULL) {
|
||||
if (!state) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -448,7 +404,7 @@ main(int argc, char *argv[])
|
||||
/* Create the windows, initialize the renderers, and load the textures */
|
||||
sprites =
|
||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||
if (sprites == NULL) {
|
||||
if (!sprites) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
|
||||
quit(2);
|
||||
}
|
||||
@ -463,19 +419,17 @@ main(int argc, char *argv[])
|
||||
|
||||
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||
|
||||
if (soundname == NULL) {
|
||||
if (!soundname) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
/* Load the wave file into memory */
|
||||
if (SDL_LoadWAV(soundname, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {
|
||||
if (SDL_LoadWAV(soundname, &wave.spec, &wave.sound, &wave.soundlen) == -1) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", soundname, SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
wave.spec.callback = fillerup;
|
||||
|
||||
/* Show the list of available drivers */
|
||||
SDL_Log("Available audio drivers:");
|
||||
for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
|
||||
@ -484,7 +438,12 @@ main(int argc, char *argv[])
|
||||
|
||||
SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
|
||||
|
||||
open_audio();
|
||||
stream = SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &wave.spec, NULL, NULL);
|
||||
if (!stream) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create audio stream: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(stream));
|
||||
|
||||
/* Main render loop */
|
||||
done = 0;
|
||||
|
@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@ -223,7 +223,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@ -346,7 +346,7 @@ copy "%(FullPath)" "$(OutDir)\"</Command>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@ -18,9 +18,6 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
@ -35,6 +32,9 @@
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="PackageLayout.xml" />
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="logos">
|
||||
|
@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@ -223,7 +223,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@ -346,7 +346,7 @@ copy "%(FullPath)" "$(OutDir)\"</Command>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@ -18,9 +18,6 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="xboxseries\MicrosoftGame.config">
|
||||
<Filter>xboxseries</Filter>
|
||||
</CopyFileToFolders>
|
||||
@ -34,6 +31,9 @@
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="PackageLayout.xml" />
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="logos">
|
||||
|
@ -67,10 +67,12 @@
|
||||
<ClInclude Include="..\include\SDL3\SDL_mouse.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_mutex.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_opengles2.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_platform_defines.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_power.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_properties.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_quit.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_rect.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_render.h" />
|
||||
@ -78,22 +80,23 @@
|
||||
<ClInclude Include="..\include\SDL3\SDL_rwops.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_shape.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_syswm.h" />
|
||||
<ClInclude Include="..\include\SDL3\SDL_thread.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" />
|
||||
<ClInclude Include="..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\src\core\windows\SDL_directx.h" />
|
||||
@ -124,12 +127,14 @@
|
||||
<ClInclude Include="..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h" />
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
@ -147,13 +152,14 @@
|
||||
<ClInclude Include="..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_syssensor.h" />
|
||||
@ -174,8 +180,8 @@
|
||||
<ClInclude Include="..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\src\video\SDL_shape_internals.h" />
|
||||
<ClInclude Include="..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\src\video\SDL_sysvidocapture.h" />
|
||||
<ClInclude Include="..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h" />
|
||||
@ -194,6 +200,8 @@
|
||||
<ClCompile Include="..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
@ -244,6 +252,8 @@
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\src\core\SDL_runapp.c" />
|
||||
<ClCompile Include="..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_common.cpp">
|
||||
@ -296,6 +306,7 @@
|
||||
<ClCompile Include="..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\src\events\SDL_windowevents.c" />
|
||||
@ -321,6 +332,7 @@
|
||||
<ClCompile Include="..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
@ -329,6 +341,8 @@
|
||||
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\src\locale\winrt\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
@ -377,6 +391,7 @@
|
||||
<ClCompile Include="..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\src\render\software\SDL_blendline.c" />
|
||||
@ -388,12 +403,13 @@
|
||||
<ClCompile Include="..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\src\SDL.c" />
|
||||
<ClCompile Include="..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\src\SDL_guid.c" />
|
||||
<ClCompile Include="..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\src\sensor\SDL_sensor.c" />
|
||||
@ -403,6 +419,9 @@
|
||||
<ClCompile Include="..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_mslibc.c" />
|
||||
<MASM Condition="'$(Platform)'=='x64'" Include="..\src\stdlib\SDL_mslibc_x64.masm" >
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</MASM>
|
||||
<ClCompile Include="..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_string.c" />
|
||||
@ -501,10 +520,11 @@
|
||||
<ClCompile Include="..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\src\video\SDL_shape.c" />
|
||||
<ClCompile Include="..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\src\video\SDL_video_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">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
@ -657,6 +677,7 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
@ -856,5 +877,6 @@
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
@ -7,6 +7,12 @@
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{68e1b30b-19ed-4612-93e4-6260c5a979e5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="main">
|
||||
<UniqueIdentifier>{00004a2523fc69c7128c60648c860000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="main\generic">
|
||||
<UniqueIdentifier>{0000318d975e0a2867ab1d5727bf0000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\SDL3\SDL_begin_code.h">
|
||||
@ -99,6 +105,9 @@
|
||||
<ClInclude Include="..\include\SDL3\SDL_opengles2.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_pen.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_pixels.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -129,9 +138,6 @@
|
||||
<ClInclude Include="..\include\SDL3\SDL_scancode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_shape.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_stdinc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -141,9 +147,6 @@
|
||||
<ClInclude Include="..\include\SDL3\SDL_system.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_syswm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL3\SDL_thread.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -162,6 +165,9 @@
|
||||
<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>
|
||||
<ClInclude Include="..\src\joystick\SDL_gamepad_c.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -183,6 +189,12 @@
|
||||
<ClInclude Include="..\src\audio\SDL_sysaudio.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_audioqueue.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_audioresample.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_wave.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -249,6 +261,9 @@
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -264,6 +279,9 @@
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\main\SDL_main_callbacks.h">
|
||||
<Filter>main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -318,6 +336,9 @@
|
||||
<ClInclude Include="..\src\SDL_fatal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_hashtable.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_hints_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -327,6 +348,9 @@
|
||||
<ClInclude Include="..\src\SDL_log_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_properties_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -381,10 +405,10 @@
|
||||
<ClInclude Include="..\src\video\SDL_RLEaccel_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_shape_internals.h">
|
||||
<ClInclude Include="..\src\video\SDL_sysvideo.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_sysvideo.h">
|
||||
<ClInclude Include="..\src\video\SDL_sysvideocapture.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h">
|
||||
@ -408,9 +432,6 @@
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_dataqueue.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_list.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@ -474,6 +495,12 @@
|
||||
<ClCompile Include="..\src\audio\SDL_audiotypecvt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audioqueue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audioresample.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_mixer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -483,6 +510,12 @@
|
||||
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi_winrt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\SDL_core_unsupported.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\SDL_runapp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\windows\SDL_windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -519,6 +552,9 @@
|
||||
<ClCompile Include="..\src\events\SDL_mouse.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_pen.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_quit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -552,6 +588,9 @@
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -567,6 +606,12 @@
|
||||
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\main\generic\SDL_sysmain_callbacks.c">
|
||||
<Filter>main\generic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\main\SDL_main_callbacks.c">
|
||||
<Filter>main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\power\SDL_power.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -591,6 +636,9 @@
|
||||
<ClCompile Include="..\src\render\SDL_render.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\SDL_render_unsupported.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\SDL_yuv_sw.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -630,12 +678,24 @@
|
||||
<ClCompile Include="..\src\SDL_guid.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_hashtable.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_hints.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_list.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_utils.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_properties.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\locale\SDL_locale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -747,9 +807,6 @@
|
||||
<ClCompile Include="..\src\video\SDL_RLEaccel.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_shape.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_stretch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -759,6 +816,12 @@
|
||||
<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>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -786,15 +849,6 @@
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtgamebar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_list.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_utils.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -845,6 +899,9 @@
|
||||
<ClCompile Include="..\src\stdlib\SDL_mslibc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<MASM Include="..\src\stdlib\SDL_mslibc_x64.masm">
|
||||
<Filter>stdlib</Filter>
|
||||
</MASM>
|
||||
<ClCompile Include="..\src\core\windows\pch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -50,6 +50,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsensor", "tests\testsen
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsurround", "tests\testsurround\testsurround.vcxproj", "{70B894A9-E306-49E8-ABC2-932A952A5E5F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpen", "tests\testpen\testpen.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -250,6 +252,14 @@ Global
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|Win32.Build.0 = Release|Win32
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|x64.ActiveCfg = Release|x64
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|x64.Build.0 = Release|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Debug|x64.Build.0 = Debug|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|Win32.Build.0 = Release|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.ActiveCfg = Release|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -277,6 +287,7 @@ Global
|
||||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD}
|
||||
|
@ -43,6 +43,7 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
@ -279,10 +280,12 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2ext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
|
||||
@ -290,11 +293,9 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_syswm.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_common.h" />
|
||||
@ -319,6 +320,8 @@
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
|
||||
@ -329,6 +332,7 @@
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_unsupported.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\scancodes_windows.h" />
|
||||
@ -353,6 +357,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
@ -363,6 +368,7 @@
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
@ -385,7 +391,6 @@
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
@ -393,11 +398,15 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
@ -442,12 +451,10 @@
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
@ -457,7 +464,6 @@
|
||||
<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_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" />
|
||||
@ -465,8 +471,6 @@
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
@ -476,10 +480,14 @@
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
@ -497,6 +505,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
@ -521,6 +530,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
@ -528,6 +538,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
@ -574,6 +585,7 @@
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
@ -585,11 +597,12 @@
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
@ -600,6 +613,9 @@
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
|
||||
<MASM Condition="'$(Platform)'=='x64'" Include="..\..\src\stdlib\SDL_mslibc_x64.masm" >
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</MASM>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
@ -633,10 +649,11 @@
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_shape.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_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" />
|
||||
@ -648,7 +665,6 @@
|
||||
<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_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" />
|
||||
@ -659,5 +675,6 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -169,6 +169,12 @@
|
||||
<Filter Include="render\direct3d12">
|
||||
<UniqueIdentifier>{f48c2b17-1bee-4fec-a7c8-24cf619abe08}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="main">
|
||||
<UniqueIdentifier>{00001967ea2801028a046a722a070000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="main\generic">
|
||||
<UniqueIdentifier>{0000ddc7911820dbe64274d3654f0000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h">
|
||||
@ -288,6 +294,9 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@ -300,6 +309,9 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_power.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_properties.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_quit.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@ -321,9 +333,6 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_shape.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@ -333,9 +342,6 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_syswm.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@ -387,8 +393,11 @@
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_vulkan.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h">
|
||||
<Filter>main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_metal.h">
|
||||
<Filter>API Headers</Filter>
|
||||
@ -411,6 +420,12 @@
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h">
|
||||
<Filter>audio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h">
|
||||
<Filter>audio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h">
|
||||
<Filter>audio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClInclude>
|
||||
@ -435,6 +450,9 @@
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h">
|
||||
<Filter>dynapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_unsupported.h">
|
||||
<Filter>dynapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h">
|
||||
<Filter>events</Filter>
|
||||
</ClInclude>
|
||||
@ -483,6 +501,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
@ -573,9 +594,6 @@
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\SDL_shape_internals.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
@ -606,9 +624,6 @@
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClInclude>
|
||||
@ -633,9 +648,6 @@
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.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>
|
||||
@ -808,6 +820,7 @@
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h">
|
||||
<Filter>render\direct3d12</Filter>
|
||||
</ClInclude>
|
||||
@ -815,13 +828,20 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c">
|
||||
<Filter>main\generic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c">
|
||||
<Filter>main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c">
|
||||
<Filter>audio</Filter>
|
||||
@ -835,6 +855,12 @@
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c">
|
||||
<Filter>audio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c">
|
||||
<Filter>audio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c">
|
||||
<Filter>audio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c">
|
||||
<Filter>audio</Filter>
|
||||
</ClCompile>
|
||||
@ -847,6 +873,12 @@
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c">
|
||||
<Filter>atomic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c">
|
||||
<Filter>core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\SDL_runapp.c">
|
||||
<Filter>core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClCompile>
|
||||
@ -883,6 +915,9 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c">
|
||||
<Filter>events</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c">
|
||||
<Filter>events</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c">
|
||||
<Filter>events</Filter>
|
||||
</ClCompile>
|
||||
@ -913,6 +948,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||
<Filter>libm</Filter>
|
||||
</ClCompile>
|
||||
@ -1051,6 +1089,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
@ -1132,9 +1173,6 @@
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c">
|
||||
<Filter>video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\video\SDL_shape.c">
|
||||
<Filter>video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c">
|
||||
<Filter>video</Filter>
|
||||
</ClCompile>
|
||||
@ -1144,6 +1182,12 @@
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c">
|
||||
<Filter>video</Filter>
|
||||
</ClCompile>
|
||||
<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>
|
||||
@ -1189,9 +1233,6 @@
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.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>
|
||||
@ -1273,6 +1314,9 @@
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c">
|
||||
<Filter>render</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c">
|
||||
<Filter>render</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c">
|
||||
<Filter>render</Filter>
|
||||
</ClCompile>
|
||||
@ -1343,6 +1387,9 @@
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c">
|
||||
<Filter>stdlib</Filter>
|
||||
</ClCompile>
|
||||
<MASM Include="..\..\src\stdlib\SDL_mslibc_x64.masm">
|
||||
<Filter>stdlib</Filter>
|
||||
</MASM>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
|
||||
|
@ -40,7 +40,7 @@ else()
|
||||
endif()
|
||||
|
||||
set_and_check(_sdl3_prefix "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
set(_sdl3_include_dirs "${_sdl3_prefix}/include;${_sdl3_prefix}/include/SDL3")
|
||||
set(_sdl3_include_dirs "${_sdl3_prefix}/include")
|
||||
unset(_sdl3_prefix)
|
||||
|
||||
set(SDL3_LIBRARIES SDL3::SDL3)
|
||||
|
@ -209,17 +209,24 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_pen.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\test\testautomation_pixels.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_platform.c" />
|
||||
<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_sdltest.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_stdlib.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_surface.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_syswm.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_video.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_subsystems.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
|
||||
|
204
VisualC/tests/testpen/testpen.vcxproj
Normal file
204
VisualC/tests/testpen/testpen.vcxproj
Normal file
@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}</ProjectGuid>
|
||||
<RootNamespace>testpower</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testpower.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testpower.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testpower.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testpower.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDL_test\SDL_test.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testpen.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -33,6 +33,9 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
000028F8113A53F4333E0000 /* SDL_main_callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = 00009366FB9FBBD54C390000 /* SDL_main_callbacks.c */; };
|
||||
000040E76FDC6AE48CBF0000 /* SDL_hashtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 000078E1881E857EBB6C0000 /* SDL_hashtable.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, ); };
|
||||
00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; platformFilters = (macos, ); };
|
||||
@ -49,6 +52,9 @@
|
||||
566E26D8246274CC00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26CD246274CB00718109 /* SDL_locale.c */; };
|
||||
566E26E1246274CC00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26CE246274CC00718109 /* SDL_syslocale.h */; };
|
||||
56A2373329F9C113003CCA5F /* SDL_sysrwlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A2373229F9C113003CCA5F /* SDL_sysrwlock.c */; };
|
||||
63134A222A7902CF0021E9A6 /* SDL_pen.h in Headers */ = {isa = PBXBuildFile; fileRef = 63134A212A7902CF0021E9A6 /* SDL_pen.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
63134A252A7902FD0021E9A6 /* SDL_pen_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 63134A232A7902FD0021E9A6 /* SDL_pen_c.h */; };
|
||||
63134A262A7902FD0021E9A6 /* SDL_pen.c in Sources */ = {isa = PBXBuildFile; fileRef = 63134A242A7902FD0021E9A6 /* SDL_pen.c */; };
|
||||
75E0915A241EA924004729E1 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75E09158241EA924004729E1 /* SDL_virtualjoystick.c */; };
|
||||
75E09163241EA924004729E1 /* SDL_virtualjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 75E09159241EA924004729E1 /* SDL_virtualjoystick_c.h */; };
|
||||
9846B07C287A9020000C35C8 /* SDL_hidapi_shield.c in Sources */ = {isa = PBXBuildFile; fileRef = 9846B07B287A9020000C35C8 /* SDL_hidapi_shield.c */; };
|
||||
@ -63,7 +69,7 @@
|
||||
A75FDBB823E4CBC700529352 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = F59C710300D5CB5801000001 /* ReadMe.txt */; };
|
||||
A75FDBC523EA380300529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */; };
|
||||
A75FDBCE23EA380300529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */; };
|
||||
A7D8A94523E2514000DCD162 /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */; };
|
||||
A79745702B2E9D39009D224A /* SDL_hidapi_steamdeck.c in Sources */ = {isa = PBXBuildFile; fileRef = A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */; };
|
||||
A7D8A94B23E2514000DCD162 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57123E2513D00DCD162 /* SDL.c */; };
|
||||
A7D8A95123E2514000DCD162 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57323E2513D00DCD162 /* SDL_spinlock.c */; };
|
||||
A7D8A95723E2514000DCD162 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A57423E2513D00DCD162 /* SDL_atomic.c */; };
|
||||
@ -90,7 +96,6 @@
|
||||
A7D8AB2523E2514100DCD162 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5DD23E2513D00DCD162 /* SDL_log.c */; };
|
||||
A7D8AB2B23E2514100DCD162 /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5DF23E2513D00DCD162 /* SDL_timer.c */; };
|
||||
A7D8AB3123E2514100DCD162 /* SDL_timer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5E023E2513D00DCD162 /* SDL_timer_c.h */; };
|
||||
A7D8AB3723E2514100DCD162 /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5E223E2513D00DCD162 /* SDL_systimer.c */; };
|
||||
A7D8AB4923E2514100DCD162 /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5E823E2513D00DCD162 /* SDL_systimer.c */; };
|
||||
A7D8AB5B23E2514100DCD162 /* SDL_offscreenevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5EE23E2513D00DCD162 /* SDL_offscreenevents_c.h */; };
|
||||
A7D8AB6123E2514100DCD162 /* SDL_offscreenwindow.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5EF23E2513D00DCD162 /* SDL_offscreenwindow.c */; };
|
||||
@ -110,7 +115,6 @@
|
||||
A7D8ABF723E2514100DCD162 /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60A23E2513D00DCD162 /* SDL_nullvideo.h */; };
|
||||
A7D8ABFD23E2514100DCD162 /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60B23E2513D00DCD162 /* SDL_nullevents_c.h */; };
|
||||
A7D8AC0323E2514100DCD162 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */; };
|
||||
A7D8AC0923E2514100DCD162 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60D23E2513D00DCD162 /* SDL_shape_internals.h */; };
|
||||
A7D8AC0F23E2514100DCD162 /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A60E23E2513D00DCD162 /* SDL_video.c */; };
|
||||
A7D8AC2D23E2514100DCD162 /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A61423E2513D00DCD162 /* SDL_surface.c */; };
|
||||
A7D8AC3323E2514100DCD162 /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A61523E2513D00DCD162 /* SDL_RLEaccel.c */; };
|
||||
@ -128,7 +132,6 @@
|
||||
A7D8ADF223E2514100DCD162 /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A66423E2513E00DCD162 /* SDL_blit_A.c */; };
|
||||
A7D8AE7623E2514100DCD162 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67B23E2513E00DCD162 /* SDL_clipboard.c */; };
|
||||
A7D8AE7C23E2514100DCD162 /* SDL_yuv.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67C23E2513E00DCD162 /* SDL_yuv.c */; };
|
||||
A7D8AE8223E2514100DCD162 /* SDL_cocoashape.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A67E23E2513E00DCD162 /* SDL_cocoashape.h */; };
|
||||
A7D8AE8823E2514100DCD162 /* SDL_cocoaopengl.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */; };
|
||||
A7D8AE8E23E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
|
||||
A7D8AE9423E2514100DCD162 /* SDL_cocoamodes.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */; };
|
||||
@ -143,7 +146,6 @@
|
||||
A7D8AED023E2514100DCD162 /* SDL_cocoamessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68B23E2513E00DCD162 /* SDL_cocoamessagebox.m */; };
|
||||
A7D8AED623E2514100DCD162 /* SDL_cocoakeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68C23E2513E00DCD162 /* SDL_cocoakeyboard.m */; };
|
||||
A7D8AEDC23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68D23E2513E00DCD162 /* SDL_cocoaopengl.h */; };
|
||||
A7D8AEE223E2514100DCD162 /* SDL_cocoashape.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68E23E2513E00DCD162 /* SDL_cocoashape.m */; };
|
||||
A7D8AEE823E2514100DCD162 /* SDL_cocoavulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68F23E2513E00DCD162 /* SDL_cocoavulkan.h */; };
|
||||
A7D8AEEE23E2514100DCD162 /* SDL_cocoaopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */; };
|
||||
A7D8AEF423E2514100DCD162 /* SDL_cocoamodes.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69123E2513E00DCD162 /* SDL_cocoamodes.h */; };
|
||||
@ -186,7 +188,6 @@
|
||||
A7D8B39823E2514200DCD162 /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A76623E2513E00DCD162 /* SDL_blit_copy.h */; };
|
||||
A7D8B39E23E2514200DCD162 /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A76723E2513E00DCD162 /* SDL_RLEaccel_c.h */; };
|
||||
A7D8B3A423E2514200DCD162 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A76823E2513E00DCD162 /* SDL_fillrect.c */; };
|
||||
A7D8B3AA23E2514200DCD162 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A76923E2513E00DCD162 /* SDL_shape.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 */; };
|
||||
@ -315,7 +316,6 @@
|
||||
A7D8BAFD23E2514500DCD162 /* s_floor.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92523E2514000DCD162 /* s_floor.c */; };
|
||||
A7D8BB0323E2514500DCD162 /* math_libm.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A92623E2514000DCD162 /* math_libm.h */; };
|
||||
A7D8BB0923E2514500DCD162 /* k_tan.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92723E2514000DCD162 /* k_tan.c */; };
|
||||
A7D8BB0F23E2514500DCD162 /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92823E2514000DCD162 /* SDL_dataqueue.c */; };
|
||||
A7D8BB1523E2514500DCD162 /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92A23E2514000DCD162 /* SDL_mouse.c */; };
|
||||
A7D8BB1B23E2514500DCD162 /* SDL_mouse_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A92B23E2514000DCD162 /* SDL_mouse_c.h */; };
|
||||
A7D8BB2123E2514500DCD162 /* scancodes_windows.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A92C23E2514000DCD162 /* scancodes_windows.h */; };
|
||||
@ -368,10 +368,25 @@
|
||||
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 */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
F32DDACF2AB795A30041EAA5 /* SDL_audio_channel_converters.h in Headers */ = {isa = PBXBuildFile; fileRef = F32DDAC92AB795A30041EAA5 /* SDL_audio_channel_converters.h */; };
|
||||
F32DDAD02AB795A30041EAA5 /* SDL_audioresample.h in Headers */ = {isa = PBXBuildFile; fileRef = F32DDACA2AB795A30041EAA5 /* SDL_audioresample.h */; };
|
||||
F32DDAD12AB795A30041EAA5 /* SDL_audioqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = F32DDACB2AB795A30041EAA5 /* SDL_audioqueue.c */; };
|
||||
F32DDAD22AB795A30041EAA5 /* SDL_audio_resampler_filter.h in Headers */ = {isa = PBXBuildFile; fileRef = F32DDACC2AB795A30041EAA5 /* SDL_audio_resampler_filter.h */; };
|
||||
F32DDAD32AB795A30041EAA5 /* SDL_audioqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = F32DDACD2AB795A30041EAA5 /* SDL_audioqueue.h */; };
|
||||
F32DDAD42AB795A30041EAA5 /* SDL_audioresample.c in Sources */ = {isa = PBXBuildFile; fileRef = F32DDACE2AB795A30041EAA5 /* SDL_audioresample.c */; };
|
||||
F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */; };
|
||||
F362B9192B3349E200D30B94 /* controller_list.h in Headers */ = {isa = PBXBuildFile; fileRef = F362B9152B3349E200D30B94 /* controller_list.h */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
@ -401,6 +416,18 @@
|
||||
F3B38CDB296E2E52005DA6D3 /* SDL_oldnames.h in Headers */ = {isa = PBXBuildFile; fileRef = F3B38CCD296E2E52005DA6D3 /* SDL_oldnames.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
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 */; };
|
||||
F3F7D8ED2933074E00816151 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8AA2933074900816151 /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D8F12933074E00816151 /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8AB2933074900816151 /* SDL_platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@ -418,12 +445,10 @@
|
||||
F3F7D9212933074E00816151 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8B72933074A00816151 /* SDL_log.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9252933074E00816151 /* SDL_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8B82933074A00816151 /* SDL_egl.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9292933074E00816151 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8B92933074A00816151 /* SDL_atomic.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D92D2933074E00816151 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BA2933074A00816151 /* SDL_shape.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9312933074E00816151 /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BB2933074A00816151 /* SDL_surface.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9352933074E00816151 /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BC2933074A00816151 /* SDL_error.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9392933074E00816151 /* SDL_opengles2_gl2ext.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BD2933074A00816151 /* SDL_opengles2_gl2ext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D93D2933074E00816151 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BE2933074A00816151 /* SDL_endian.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9412933074E00816151 /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8BF2933074A00816151 /* SDL_syswm.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9452933074E00816151 /* SDL_opengl_glext.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C02933074A00816151 /* SDL_opengl_glext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D9492933074E00816151 /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C12933074B00816151 /* SDL_scancode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3F7D94D2933074E00816151 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8C22933074B00816151 /* SDL_sensor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@ -491,6 +516,11 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
00003260407E1002EAC10000 /* SDL_main_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_main_callbacks.h; sourceTree = "<group>"; };
|
||||
000078E1881E857EBB6C0000 /* SDL_hashtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hashtable.c; 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>"; };
|
||||
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; };
|
||||
@ -506,6 +536,9 @@
|
||||
566E26CD246274CB00718109 /* SDL_locale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_locale.c; path = locale/SDL_locale.c; sourceTree = "<group>"; };
|
||||
566E26CE246274CC00718109 /* SDL_syslocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syslocale.h; path = locale/SDL_syslocale.h; sourceTree = "<group>"; };
|
||||
56A2373229F9C113003CCA5F /* SDL_sysrwlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysrwlock.c; sourceTree = "<group>"; };
|
||||
63134A212A7902CF0021E9A6 /* SDL_pen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_pen.h; path = SDL3/SDL_pen.h; sourceTree = "<group>"; };
|
||||
63134A232A7902FD0021E9A6 /* SDL_pen_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pen_c.h; sourceTree = "<group>"; };
|
||||
63134A242A7902FD0021E9A6 /* SDL_pen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pen.c; sourceTree = "<group>"; };
|
||||
75E09158241EA924004729E1 /* SDL_virtualjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_virtualjoystick.c; sourceTree = "<group>"; };
|
||||
75E09159241EA924004729E1 /* SDL_virtualjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_virtualjoystick_c.h; sourceTree = "<group>"; };
|
||||
9846B07B287A9020000C35C8 /* SDL_hidapi_shield.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_shield.c; sourceTree = "<group>"; };
|
||||
@ -531,7 +564,7 @@
|
||||
A75FDBA723E4CB6F00529352 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
|
||||
A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
|
||||
A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
|
||||
A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
|
||||
A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steamdeck.c; sourceTree = "<group>"; };
|
||||
A7D8A57123E2513D00DCD162 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; };
|
||||
A7D8A57323E2513D00DCD162 /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; };
|
||||
A7D8A57423E2513D00DCD162 /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = "<group>"; };
|
||||
@ -558,7 +591,6 @@
|
||||
A7D8A5DD23E2513D00DCD162 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_log.c; sourceTree = "<group>"; };
|
||||
A7D8A5DF23E2513D00DCD162 /* SDL_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_timer.c; sourceTree = "<group>"; };
|
||||
A7D8A5E023E2513D00DCD162 /* SDL_timer_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer_c.h; sourceTree = "<group>"; };
|
||||
A7D8A5E223E2513D00DCD162 /* SDL_systimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systimer.c; sourceTree = "<group>"; };
|
||||
A7D8A5E823E2513D00DCD162 /* SDL_systimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systimer.c; sourceTree = "<group>"; };
|
||||
A7D8A5EE23E2513D00DCD162 /* SDL_offscreenevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_offscreenevents_c.h; sourceTree = "<group>"; };
|
||||
A7D8A5EF23E2513D00DCD162 /* SDL_offscreenwindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_offscreenwindow.c; sourceTree = "<group>"; };
|
||||
@ -578,7 +610,6 @@
|
||||
A7D8A60A23E2513D00DCD162 /* SDL_nullvideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_nullvideo.h; sourceTree = "<group>"; };
|
||||
A7D8A60B23E2513D00DCD162 /* SDL_nullevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_nullevents_c.h; sourceTree = "<group>"; };
|
||||
A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rect_c.h; sourceTree = "<group>"; };
|
||||
A7D8A60D23E2513D00DCD162 /* SDL_shape_internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shape_internals.h; sourceTree = "<group>"; };
|
||||
A7D8A60E23E2513D00DCD162 /* SDL_video.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_video.c; sourceTree = "<group>"; };
|
||||
A7D8A61423E2513D00DCD162 /* SDL_surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_surface.c; sourceTree = "<group>"; };
|
||||
A7D8A61523E2513D00DCD162 /* SDL_RLEaccel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_RLEaccel.c; sourceTree = "<group>"; };
|
||||
@ -622,7 +653,6 @@
|
||||
A7D8A66423E2513E00DCD162 /* SDL_blit_A.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blit_A.c; sourceTree = "<group>"; };
|
||||
A7D8A67B23E2513E00DCD162 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; };
|
||||
A7D8A67C23E2513E00DCD162 /* SDL_yuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_yuv.c; sourceTree = "<group>"; };
|
||||
A7D8A67E23E2513E00DCD162 /* SDL_cocoashape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoashape.h; sourceTree = "<group>"; };
|
||||
A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoaopengl.m; sourceTree = "<group>"; };
|
||||
A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoakeyboard.h; sourceTree = "<group>"; };
|
||||
A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamodes.m; sourceTree = "<group>"; };
|
||||
@ -637,7 +667,6 @@
|
||||
A7D8A68B23E2513E00DCD162 /* SDL_cocoamessagebox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamessagebox.m; sourceTree = "<group>"; };
|
||||
A7D8A68C23E2513E00DCD162 /* SDL_cocoakeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoakeyboard.m; sourceTree = "<group>"; };
|
||||
A7D8A68D23E2513E00DCD162 /* SDL_cocoaopengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoaopengl.h; sourceTree = "<group>"; };
|
||||
A7D8A68E23E2513E00DCD162 /* SDL_cocoashape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoashape.m; sourceTree = "<group>"; };
|
||||
A7D8A68F23E2513E00DCD162 /* SDL_cocoavulkan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoavulkan.h; sourceTree = "<group>"; };
|
||||
A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoaopengles.h; sourceTree = "<group>"; };
|
||||
A7D8A69123E2513E00DCD162 /* SDL_cocoamodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoamodes.h; sourceTree = "<group>"; };
|
||||
@ -680,7 +709,6 @@
|
||||
A7D8A76623E2513E00DCD162 /* SDL_blit_copy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blit_copy.h; sourceTree = "<group>"; };
|
||||
A7D8A76723E2513E00DCD162 /* SDL_RLEaccel_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_RLEaccel_c.h; sourceTree = "<group>"; };
|
||||
A7D8A76823E2513E00DCD162 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; };
|
||||
A7D8A76923E2513E00DCD162 /* SDL_shape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shape.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>"; };
|
||||
@ -812,7 +840,6 @@
|
||||
A7D8A92523E2514000DCD162 /* s_floor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_floor.c; sourceTree = "<group>"; };
|
||||
A7D8A92623E2514000DCD162 /* math_libm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = math_libm.h; sourceTree = "<group>"; };
|
||||
A7D8A92723E2514000DCD162 /* k_tan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = k_tan.c; sourceTree = "<group>"; };
|
||||
A7D8A92823E2514000DCD162 /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; };
|
||||
A7D8A92A23E2514000DCD162 /* SDL_mouse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_mouse.c; sourceTree = "<group>"; };
|
||||
A7D8A92B23E2514000DCD162 /* SDL_mouse_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_mouse_c.h; sourceTree = "<group>"; };
|
||||
A7D8A92C23E2514000DCD162 /* scancodes_windows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scancodes_windows.h; sourceTree = "<group>"; };
|
||||
@ -840,9 +867,24 @@
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
F32DDAC92AB795A30041EAA5 /* SDL_audio_channel_converters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audio_channel_converters.h; sourceTree = "<group>"; };
|
||||
F32DDACA2AB795A30041EAA5 /* SDL_audioresample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audioresample.h; sourceTree = "<group>"; };
|
||||
F32DDACB2AB795A30041EAA5 /* SDL_audioqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audioqueue.c; sourceTree = "<group>"; };
|
||||
F32DDACC2AB795A30041EAA5 /* SDL_audio_resampler_filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audio_resampler_filter.h; sourceTree = "<group>"; };
|
||||
F32DDACD2AB795A30041EAA5 /* SDL_audioqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audioqueue.h; sourceTree = "<group>"; };
|
||||
F32DDACE2AB795A30041EAA5 /* SDL_audioresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audioresample.c; sourceTree = "<group>"; };
|
||||
F362B9152B3349E200D30B94 /* controller_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_list.h; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
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; };
|
||||
@ -887,6 +929,18 @@
|
||||
F3B38CCD296E2E52005DA6D3 /* SDL_oldnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_oldnames.h; path = SDL3/SDL_oldnames.h; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
F3F7D8AA2933074900816151 /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_audio.h; path = SDL3/SDL_audio.h; sourceTree = "<group>"; };
|
||||
F3F7D8AB2933074900816151 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = SDL3/SDL_platform.h; sourceTree = "<group>"; };
|
||||
@ -904,12 +958,10 @@
|
||||
F3F7D8B72933074A00816151 /* SDL_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_log.h; path = SDL3/SDL_log.h; sourceTree = "<group>"; };
|
||||
F3F7D8B82933074A00816151 /* SDL_egl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_egl.h; path = SDL3/SDL_egl.h; sourceTree = "<group>"; };
|
||||
F3F7D8B92933074A00816151 /* SDL_atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_atomic.h; path = SDL3/SDL_atomic.h; sourceTree = "<group>"; };
|
||||
F3F7D8BA2933074A00816151 /* SDL_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_shape.h; path = SDL3/SDL_shape.h; sourceTree = "<group>"; };
|
||||
F3F7D8BB2933074A00816151 /* SDL_surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_surface.h; path = SDL3/SDL_surface.h; sourceTree = "<group>"; };
|
||||
F3F7D8BC2933074A00816151 /* SDL_error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error.h; path = SDL3/SDL_error.h; sourceTree = "<group>"; };
|
||||
F3F7D8BD2933074A00816151 /* SDL_opengles2_gl2ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengles2_gl2ext.h; path = SDL3/SDL_opengles2_gl2ext.h; sourceTree = "<group>"; };
|
||||
F3F7D8BE2933074A00816151 /* SDL_endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_endian.h; path = SDL3/SDL_endian.h; sourceTree = "<group>"; };
|
||||
F3F7D8BF2933074A00816151 /* SDL_syswm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syswm.h; path = SDL3/SDL_syswm.h; sourceTree = "<group>"; };
|
||||
F3F7D8C02933074A00816151 /* SDL_opengl_glext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengl_glext.h; path = SDL3/SDL_opengl_glext.h; sourceTree = "<group>"; };
|
||||
F3F7D8C12933074B00816151 /* SDL_scancode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_scancode.h; path = SDL3/SDL_scancode.h; sourceTree = "<group>"; };
|
||||
F3F7D8C22933074B00816151 /* SDL_sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_sensor.h; path = SDL3/SDL_sensor.h; sourceTree = "<group>"; };
|
||||
@ -979,10 +1031,28 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
000082EF09C89B62BD840000 /* main */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A568B42AF763940062EEC4 /* generic */,
|
||||
00008B5A0CB83D2069E80000 /* ios */,
|
||||
00009366FB9FBBD54C390000 /* SDL_main_callbacks.c */,
|
||||
00003260407E1002EAC10000 /* SDL_main_callbacks.h */,
|
||||
);
|
||||
path = main;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
00008B5A0CB83D2069E80000 /* ios */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */,
|
||||
);
|
||||
path = ios;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0153844A006D81B07F000001 /* Public Headers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3F7D8CF2933074C00816151 /* SDL.h */,
|
||||
F3F7D8E02933074D00816151 /* SDL_assert.h */,
|
||||
F3F7D8B92933074A00816151 /* SDL_atomic.h */,
|
||||
F3F7D8AA2933074900816151 /* SDL_audio.h */,
|
||||
@ -1011,26 +1081,28 @@
|
||||
F3F7D8D92933074C00816151 /* SDL_loadso.h */,
|
||||
F3F7D8C42933074B00816151 /* SDL_locale.h */,
|
||||
F3F7D8B72933074A00816151 /* SDL_log.h */,
|
||||
F3F7D8B02933074900816151 /* SDL_main.h */,
|
||||
F3B38CCA296E2E52005DA6D3 /* SDL_main_impl.h */,
|
||||
F3F7D8B02933074900816151 /* SDL_main.h */,
|
||||
F3F7D8B62933074A00816151 /* SDL_messagebox.h */,
|
||||
F3F7D8D22933074C00816151 /* SDL_metal.h */,
|
||||
F3F7D8D52933074C00816151 /* SDL_misc.h */,
|
||||
F3F7D8DA2933074D00816151 /* SDL_mouse.h */,
|
||||
F3F7D8E62933074E00816151 /* SDL_mutex.h */,
|
||||
F3B38CCD296E2E52005DA6D3 /* SDL_oldnames.h */,
|
||||
F3F7D8E12933074D00816151 /* SDL_opengl.h */,
|
||||
F3F7D8C02933074A00816151 /* SDL_opengl_glext.h */,
|
||||
F3F7D8E12933074D00816151 /* SDL_opengl.h */,
|
||||
F3F7D8C62933074B00816151 /* SDL_opengles.h */,
|
||||
F3F7D8C72933074B00816151 /* SDL_opengles2.h */,
|
||||
F3F7D8AE2933074900816151 /* SDL_opengles2_gl2.h */,
|
||||
F3F7D8BD2933074A00816151 /* SDL_opengles2_gl2ext.h */,
|
||||
F3F7D8C92933074B00816151 /* SDL_opengles2_gl2platform.h */,
|
||||
F3F7D8B12933074900816151 /* SDL_opengles2_khrplatform.h */,
|
||||
F3F7D8C72933074B00816151 /* SDL_opengles2.h */,
|
||||
63134A212A7902CF0021E9A6 /* SDL_pen.h */,
|
||||
F3F7D8B52933074A00816151 /* SDL_pixels.h */,
|
||||
F3F7D8AB2933074900816151 /* SDL_platform.h */,
|
||||
F3B38CCB296E2E52005DA6D3 /* SDL_platform_defines.h */,
|
||||
F3F7D8AB2933074900816151 /* SDL_platform.h */,
|
||||
F3F7D8DB2933074D00816151 /* SDL_power.h */,
|
||||
F3E5A6EC2AD5E10800293D83 /* SDL_properties.h */,
|
||||
F3F7D8DF2933074D00816151 /* SDL_quit.h */,
|
||||
F3F7D8E22933074D00816151 /* SDL_rect.h */,
|
||||
F3F7D8DE2933074D00816151 /* SDL_render.h */,
|
||||
@ -1038,17 +1110,17 @@
|
||||
F3F7D8C82933074B00816151 /* SDL_rwops.h */,
|
||||
F3F7D8C12933074B00816151 /* SDL_scancode.h */,
|
||||
F3F7D8C22933074B00816151 /* SDL_sensor.h */,
|
||||
F3F7D8BA2933074A00816151 /* SDL_shape.h */,
|
||||
F3F7D8AC2933074900816151 /* SDL_stdinc.h */,
|
||||
F3F7D8BB2933074A00816151 /* SDL_surface.h */,
|
||||
F3F7D8E82933074E00816151 /* SDL_system.h */,
|
||||
F3F7D8BF2933074A00816151 /* SDL_syswm.h */,
|
||||
F3F7D8CD2933074C00816151 /* SDL_thread.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 */,
|
||||
);
|
||||
name = "Public Headers";
|
||||
path = ../../include;
|
||||
@ -1098,6 +1170,7 @@
|
||||
A7D8A91123E2514000DCD162 /* libm */,
|
||||
A7D8A85D23E2513F00DCD162 /* loadso */,
|
||||
566E26CB246274AE00718109 /* locale */,
|
||||
000082EF09C89B62BD840000 /* main */,
|
||||
5616CA47252BB278005D5928 /* misc */,
|
||||
A7D8A7DF23E2513F00DCD162 /* power */,
|
||||
A7D8A8DA23E2514000DCD162 /* render */,
|
||||
@ -1108,11 +1181,11 @@
|
||||
A7D8A5EB23E2513D00DCD162 /* video */,
|
||||
A7D8A7F523E2513F00DCD162 /* SDL_assert_c.h */,
|
||||
A7D8A94423E2514000DCD162 /* SDL_assert.c */,
|
||||
A7D8A92823E2514000DCD162 /* SDL_dataqueue.c */,
|
||||
A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */,
|
||||
A7D8A57523E2513D00DCD162 /* SDL_error_c.h */,
|
||||
A7D8A8BF23E2513F00DCD162 /* SDL_error.c */,
|
||||
F382071C284F362F004DD584 /* SDL_guid.c */,
|
||||
000078E1881E857EBB6C0000 /* SDL_hashtable.c */,
|
||||
0000B6ADCD88CAD6610F0000 /* SDL_hashtable.h */,
|
||||
A7D8A8D123E2514000DCD162 /* SDL_hints_c.h */,
|
||||
A7D8A5AB23E2513D00DCD162 /* SDL_hints.c */,
|
||||
A7D8A58323E2513D00DCD162 /* SDL_internal.h */,
|
||||
@ -1120,6 +1193,7 @@
|
||||
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */,
|
||||
F386F6E42884663E001840AA /* SDL_log_c.h */,
|
||||
A7D8A5DD23E2513D00DCD162 /* SDL_log.c */,
|
||||
F3E5A6EA2AD5E0E600293D83 /* SDL_properties.c */,
|
||||
F386F6E52884663E001840AA /* SDL_utils_c.h */,
|
||||
F386F6E62884663E001840AA /* SDL_utils.c */,
|
||||
A7D8A57123E2513D00DCD162 /* SDL.c */,
|
||||
@ -1304,6 +1378,7 @@
|
||||
A7D8A5DB23E2513D00DCD162 /* SDL_dynapi_procs.h */,
|
||||
A7D8A5DA23E2513D00DCD162 /* SDL_dynapi.c */,
|
||||
A7D8A5D823E2513D00DCD162 /* SDL_dynapi.h */,
|
||||
E4F7981B2AD8D85500669F54 /* SDL_dynapi_unsupported.h */,
|
||||
);
|
||||
path = dynapi;
|
||||
sourceTree = "<group>";
|
||||
@ -1311,7 +1386,6 @@
|
||||
A7D8A5DE23E2513D00DCD162 /* timer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7D8A5E123E2513D00DCD162 /* dummy */,
|
||||
A7D8A5E723E2513D00DCD162 /* unix */,
|
||||
A7D8A5E023E2513D00DCD162 /* SDL_timer_c.h */,
|
||||
A7D8A5DF23E2513D00DCD162 /* SDL_timer.c */,
|
||||
@ -1319,14 +1393,6 @@
|
||||
path = timer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A7D8A5E123E2513D00DCD162 /* dummy */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7D8A5E223E2513D00DCD162 /* SDL_systimer.c */,
|
||||
);
|
||||
path = dummy;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A7D8A5E723E2513D00DCD162 /* unix */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1357,6 +1423,7 @@
|
||||
A7D8A64C23E2513D00DCD162 /* SDL_blit.c */,
|
||||
A7D8A76B23E2513E00DCD162 /* SDL_blit.h */,
|
||||
A7D8A77323E2513E00DCD162 /* SDL_bmp.c */,
|
||||
F3DDCC4D2AFD42B500B0842B /* SDL_clipboard_c.h */,
|
||||
A7D8A67B23E2513E00DCD162 /* SDL_clipboard.c */,
|
||||
A7D8A60423E2513D00DCD162 /* SDL_egl_c.h */,
|
||||
A7D8A6B623E2513E00DCD162 /* SDL_egl.c */,
|
||||
@ -1364,14 +1431,21 @@
|
||||
A7D8A74023E2513E00DCD162 /* SDL_pixels_c.h */,
|
||||
A7D8A64D23E2513D00DCD162 /* SDL_pixels.c */,
|
||||
A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */,
|
||||
F3DDCC542AFD42B600B0842B /* SDL_rect_impl.h */,
|
||||
A7D8A63423E2513D00DCD162 /* SDL_rect.c */,
|
||||
A7D8A76723E2513E00DCD162 /* SDL_RLEaccel_c.h */,
|
||||
A7D8A61523E2513D00DCD162 /* SDL_RLEaccel.c */,
|
||||
A7D8A60D23E2513D00DCD162 /* SDL_shape_internals.h */,
|
||||
A7D8A76923E2513E00DCD162 /* SDL_shape.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 */,
|
||||
A7D8A64023E2513D00DCD162 /* SDL_vulkan_utils.c */,
|
||||
@ -1465,8 +1539,6 @@
|
||||
A7D8A67F23E2513E00DCD162 /* SDL_cocoaopengl.m */,
|
||||
A7D8A69023E2513E00DCD162 /* SDL_cocoaopengles.h */,
|
||||
A7D8A68223E2513E00DCD162 /* SDL_cocoaopengles.m */,
|
||||
A7D8A67E23E2513E00DCD162 /* SDL_cocoashape.h */,
|
||||
A7D8A68E23E2513E00DCD162 /* SDL_cocoashape.m */,
|
||||
A7D8A69323E2513E00DCD162 /* SDL_cocoavideo.h */,
|
||||
A7D8A68523E2513E00DCD162 /* SDL_cocoavideo.m */,
|
||||
A7D8A68F23E2513E00DCD162 /* SDL_cocoavulkan.h */,
|
||||
@ -1595,12 +1667,16 @@
|
||||
A7D8A7BE23E2513E00DCD162 /* hidapi */,
|
||||
A7D8A7A123E2513E00DCD162 /* steam */,
|
||||
75E09157241EA924004729E1 /* virtual */,
|
||||
A7D8A7AD23E2513E00DCD162 /* SDL_gamepad.c */,
|
||||
A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */,
|
||||
F362B9152B3349E200D30B94 /* controller_list.h */,
|
||||
F3820712284F3609004DD584 /* controller_type.c */,
|
||||
A7D8A7D923E2513E00DCD162 /* controller_type.h */,
|
||||
F362B9162B3349E200D30B94 /* SDL_gamepad_c.h */,
|
||||
A7D8A79E23E2513E00DCD162 /* SDL_gamepad_db.h */,
|
||||
A7D8A7AD23E2513E00DCD162 /* SDL_gamepad.c */,
|
||||
A7D8A7D023E2513E00DCD162 /* SDL_joystick_c.h */,
|
||||
A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */,
|
||||
F362B9182B3349E200D30B94 /* SDL_steam_virtual_gamepad.c */,
|
||||
F362B9172B3349E200D30B94 /* SDL_steam_virtual_gamepad.h */,
|
||||
A7D8A7CF23E2513E00DCD162 /* SDL_sysjoystick.h */,
|
||||
A7D8A7CB23E2513E00DCD162 /* usb_ids.h */,
|
||||
);
|
||||
@ -1636,6 +1712,7 @@
|
||||
A7D8A7BE23E2513E00DCD162 /* hidapi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A797456F2B2E9D39009D224A /* SDL_hidapi_steamdeck.c */,
|
||||
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */,
|
||||
A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */,
|
||||
F3F07D59269640160074468B /* SDL_hidapi_luna.c */,
|
||||
@ -1789,10 +1866,16 @@
|
||||
A7D8A8AF23E2513F00DCD162 /* disk */,
|
||||
A7D8A87023E2513F00DCD162 /* dummy */,
|
||||
A7D8A87323E2513F00DCD162 /* SDL_audio_c.h */,
|
||||
F32DDAC92AB795A30041EAA5 /* SDL_audio_channel_converters.h */,
|
||||
F32DDACC2AB795A30041EAA5 /* SDL_audio_resampler_filter.h */,
|
||||
A7D8A8B823E2513F00DCD162 /* SDL_audio.c */,
|
||||
A7D8A8A123E2513F00DCD162 /* SDL_audiocvt.c */,
|
||||
A7D8A87723E2513F00DCD162 /* SDL_audiodev_c.h */,
|
||||
A7D8A88F23E2513F00DCD162 /* SDL_audiodev.c */,
|
||||
F32DDACB2AB795A30041EAA5 /* SDL_audioqueue.c */,
|
||||
F32DDACD2AB795A30041EAA5 /* SDL_audioqueue.h */,
|
||||
F32DDACE2AB795A30041EAA5 /* SDL_audioresample.c */,
|
||||
F32DDACA2AB795A30041EAA5 /* SDL_audioresample.h */,
|
||||
A7D8A8A023E2513F00DCD162 /* SDL_audiotypecvt.c */,
|
||||
A7D8A86523E2513F00DCD162 /* SDL_mixer.c */,
|
||||
A7D8A89F23E2513F00DCD162 /* SDL_sysaudio.h */,
|
||||
@ -1856,6 +1939,7 @@
|
||||
A7D8A8FF23E2514000DCD162 /* SDL_d3dmath.c */,
|
||||
A7D8A8DC23E2514000DCD162 /* SDL_d3dmath.h */,
|
||||
A7D8A8DB23E2514000DCD162 /* SDL_render.c */,
|
||||
E4F7981D2AD8D86A00669F54 /* SDL_render_unsupported.c */,
|
||||
A7D8A8EE23E2514000DCD162 /* SDL_sysrender.h */,
|
||||
A7D8A8EC23E2514000DCD162 /* SDL_yuv_sw_c.h */,
|
||||
A7D8A8ED23E2514000DCD162 /* SDL_yuv_sw.c */,
|
||||
@ -1971,6 +2055,8 @@
|
||||
A7D8A93823E2514000DCD162 /* SDL_keyboard.c */,
|
||||
A7D8A92B23E2514000DCD162 /* SDL_mouse_c.h */,
|
||||
A7D8A92A23E2514000DCD162 /* SDL_mouse.c */,
|
||||
63134A232A7902FD0021E9A6 /* SDL_pen_c.h */,
|
||||
63134A242A7902FD0021E9A6 /* SDL_pen.c */,
|
||||
A7D8A93C23E2514000DCD162 /* SDL_quit.c */,
|
||||
A7D8A93723E2514000DCD162 /* SDL_touch_c.h */,
|
||||
A7D8A93E23E2514000DCD162 /* SDL_touch.c */,
|
||||
@ -1988,9 +2074,18 @@
|
||||
path = SDL3;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A568B42AF763940062EEC4 /* generic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A568B52AF763940062EEC4 /* SDL_sysmain_callbacks.c */,
|
||||
);
|
||||
path = generic;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F36C7ACF294B9F5E004D61C3 /* core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4F798192AD8D84800669F54 /* SDL_core_unsupported.c */,
|
||||
F36C7AD0294BA009004D61C3 /* SDL_runapp.c */,
|
||||
);
|
||||
path = core;
|
||||
@ -2036,7 +2131,9 @@
|
||||
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 */,
|
||||
A7D8B7B223E2514400DCD162 /* SDL_audiodev_c.h in Headers */,
|
||||
F3F7D9E12933074E00816151 /* SDL_begin_code.h in Headers */,
|
||||
F3F7D9A52933074E00816151 /* SDL_bits.h in Headers */,
|
||||
@ -2052,6 +2149,7 @@
|
||||
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 */,
|
||||
@ -2060,17 +2158,17 @@
|
||||
A7D8AF1E23E2514100DCD162 /* SDL_cocoamouse.h in Headers */,
|
||||
A7D8AEDC23E2514100DCD162 /* SDL_cocoaopengl.h in Headers */,
|
||||
A7D8AEEE23E2514100DCD162 /* SDL_cocoaopengles.h in Headers */,
|
||||
A7D8AE8223E2514100DCD162 /* 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 */,
|
||||
A7D8A94523E2514000DCD162 /* SDL_dataqueue.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 */,
|
||||
@ -2080,9 +2178,11 @@
|
||||
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 */,
|
||||
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 */,
|
||||
@ -2122,6 +2222,7 @@
|
||||
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 */,
|
||||
@ -2137,12 +2238,15 @@
|
||||
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 */,
|
||||
F3F7D9192933074E00816151 /* SDL_pixels.h in Headers */,
|
||||
A7D8B2C023E2514200DCD162 /* SDL_pixels_c.h in Headers */,
|
||||
F3F7D8F12933074E00816151 /* SDL_platform.h in Headers */,
|
||||
@ -2165,8 +2269,6 @@
|
||||
A7D8B98C23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */,
|
||||
A7D8B9A123E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
|
||||
F3F7D92D2933074E00816151 /* SDL_shape.h in Headers */,
|
||||
A7D8AC0923E2514100DCD162 /* SDL_shape_internals.h in Headers */,
|
||||
F3F7D8F52933074E00816151 /* SDL_stdinc.h in Headers */,
|
||||
A7D8BBC723E2561500DCD162 /* SDL_steamcontroller.h in Headers */,
|
||||
F3F7D9312933074E00816151 /* SDL_surface.h in Headers */,
|
||||
@ -2185,7 +2287,6 @@
|
||||
A7D8B42823E2514300DCD162 /* SDL_systhread_c.h in Headers */,
|
||||
5616CA4D252BB2A6005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A7D8AC3F23E2514100DCD162 /* SDL_sysvideo.h in Headers */,
|
||||
F3F7D9412933074E00816151 /* SDL_syswm.h in Headers */,
|
||||
F3F7D9792933074E00816151 /* SDL_thread.h in Headers */,
|
||||
A7D8B3EC23E2514300DCD162 /* SDL_thread_c.h in Headers */,
|
||||
F3F7D90D2933074E00816151 /* SDL_timer.h in Headers */,
|
||||
@ -2193,6 +2294,7 @@
|
||||
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 */,
|
||||
@ -2207,6 +2309,7 @@
|
||||
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 */,
|
||||
@ -2238,6 +2341,7 @@
|
||||
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 */,
|
||||
@ -2249,14 +2353,18 @@
|
||||
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 */,
|
||||
A7D8B3C823E2514200DCD162 /* yuv_rgb_sse_func.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;
|
||||
};
|
||||
@ -2385,18 +2493,20 @@
|
||||
A7D8B41C23E2514300DCD162 /* SDL_systls.c in Sources */,
|
||||
9846B07C287A9020000C35C8 /* SDL_hidapi_shield.c in Sources */,
|
||||
A7D8BBD923E2574800DCD162 /* SDL_uikitmessagebox.m in Sources */,
|
||||
F32DDAD42AB795A30041EAA5 /* SDL_audioresample.c in Sources */,
|
||||
A7D8AD2923E2514100DCD162 /* SDL_vulkan_utils.c in Sources */,
|
||||
A7D8A95123E2514000DCD162 /* SDL_spinlock.c in Sources */,
|
||||
F34B9895291DEFF500AAC96E /* SDL_hidapi_steam.c in Sources */,
|
||||
A7D8BAAF23E2514400DCD162 /* s_atan.c in Sources */,
|
||||
A7D8B75223E2514300DCD162 /* SDL_sysloadso.c in Sources */,
|
||||
A7D8BBE123E2574800DCD162 /* SDL_uikitopenglview.m in Sources */,
|
||||
A79745702B2E9D39009D224A /* SDL_hidapi_steamdeck.c in Sources */,
|
||||
A7D8B98623E2514400DCD162 /* SDL_render_metal.m in Sources */,
|
||||
A7D8AE7623E2514100DCD162 /* SDL_clipboard.c in Sources */,
|
||||
A7D8AEC423E2514100DCD162 /* SDL_cocoaevents.m in Sources */,
|
||||
A7D8B86623E2514400DCD162 /* SDL_audiocvt.c in Sources */,
|
||||
A7D8B3AA23E2514200DCD162 /* SDL_shape.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 */,
|
||||
@ -2414,6 +2524,7 @@
|
||||
A7D8AB7323E2514100DCD162 /* SDL_offscreenframebuffer.c in Sources */,
|
||||
A7D8B3BF23E2514200DCD162 /* yuv_rgb.c 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 */,
|
||||
@ -2421,7 +2532,7 @@
|
||||
F3D60A8328C16A1900788A3A /* SDL_hidapi_wii.c in Sources */,
|
||||
A7D8B9DD23E2514400DCD162 /* SDL_blendpoint.c in Sources */,
|
||||
A7D8B4EE23E2514300DCD162 /* SDL_gamepad.c in Sources */,
|
||||
A7D8AB3723E2514100DCD162 /* SDL_systimer.c in Sources */,
|
||||
E4A568B62AF763940062EEC4 /* SDL_sysmain_callbacks.c in Sources */,
|
||||
A7D8BA1323E2514400DCD162 /* SDL_render_sw.c in Sources */,
|
||||
A7D8B42223E2514300DCD162 /* SDL_syssem.c in Sources */,
|
||||
A7D8B53923E2514300DCD162 /* SDL_hidapi_xbox360.c in Sources */,
|
||||
@ -2448,6 +2559,7 @@
|
||||
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 */,
|
||||
@ -2461,9 +2573,9 @@
|
||||
A7D8AED023E2514100DCD162 /* SDL_cocoamessagebox.m in Sources */,
|
||||
F376F6552559B4E300CFC0BC /* SDL_hidapi.c in Sources */,
|
||||
A7D8BA2B23E2514400DCD162 /* SDL_blendfillrect.c in Sources */,
|
||||
A7D8AEE223E2514100DCD162 /* SDL_cocoashape.m in Sources */,
|
||||
A7D8BBD323E2574800DCD162 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A7D8AEB823E2514100DCD162 /* SDL_cocoamouse.m in Sources */,
|
||||
F32DDAD12AB795A30041EAA5 /* SDL_audioqueue.c in Sources */,
|
||||
A7D8B8E423E2514400DCD162 /* SDL_error.c in Sources */,
|
||||
A7D8AD6823E2514100DCD162 /* SDL_blit.c in Sources */,
|
||||
A7D8B5BD23E2514300DCD162 /* SDL_rwops.c in Sources */,
|
||||
@ -2474,11 +2586,13 @@
|
||||
A7D8BAD323E2514500DCD162 /* s_tan.c in Sources */,
|
||||
A7D8AA6523E2514000DCD162 /* SDL_hints.c in Sources */,
|
||||
A7D8B53F23E2514300DCD162 /* SDL_hidapi_ps4.c in Sources */,
|
||||
F362B91C2B3349E200D30B94 /* SDL_steam_virtual_gamepad.c in Sources */,
|
||||
A7D8AD6E23E2514100DCD162 /* SDL_pixels.c in Sources */,
|
||||
A7D8B75E23E2514300DCD162 /* SDL_sysloadso.c in Sources */,
|
||||
A7D8BBD723E2574800DCD162 /* SDL_uikitevents.m in Sources */,
|
||||
A7D8B5F323E2514300DCD162 /* SDL_syspower.c in Sources */,
|
||||
A7D8B95023E2514400DCD162 /* SDL_iconv.c in Sources */,
|
||||
F3E5A6EB2AD5E0E600293D83 /* SDL_properties.c in Sources */,
|
||||
A7D8BA9D23E2514400DCD162 /* s_fabs.c in Sources */,
|
||||
F395C1B12569C6A000942BFF /* SDL_mfijoystick.m in Sources */,
|
||||
A7D8B99223E2514400DCD162 /* SDL_shaders_metal.metal in Sources */,
|
||||
@ -2507,6 +2621,7 @@
|
||||
A7D8B79A23E2514400DCD162 /* SDL_dummyaudio.c in Sources */,
|
||||
A7D8B3A423E2514200DCD162 /* SDL_fillrect.c in Sources */,
|
||||
A7D8ABDF23E2514100DCD162 /* SDL_nullframebuffer.c in Sources */,
|
||||
E4F7981A2AD8D84800669F54 /* SDL_core_unsupported.c in Sources */,
|
||||
A7D8A96923E2514000DCD162 /* SDL_dummysensor.c in Sources */,
|
||||
A7D8B95C23E2514400DCD162 /* SDL_string.c in Sources */,
|
||||
A7D8BA7F23E2514400DCD162 /* SDL_render_gl.c in Sources */,
|
||||
@ -2527,6 +2642,7 @@
|
||||
A7D8B55123E2514300DCD162 /* SDL_hidapi_switch.c in Sources */,
|
||||
A7D8B96223E2514400DCD162 /* SDL_strtokr.c in Sources */,
|
||||
A7D8BB7523E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
|
||||
E4F798202AD8D87F00669F54 /* SDL_video_unsupported.c in Sources */,
|
||||
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8BAB523E2514400DCD162 /* k_cos.c in Sources */,
|
||||
A7D8B54523E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
|
||||
@ -2546,13 +2662,13 @@
|
||||
A7D8BBD523E2574800DCD162 /* SDL_uikitclipboard.m in Sources */,
|
||||
A7D8B5C923E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
F386F6F92884663E001840AA /* SDL_utils.c in Sources */,
|
||||
E4F7981E2AD8D86A00669F54 /* SDL_render_unsupported.c in Sources */,
|
||||
A7D8AC0F23E2514100DCD162 /* SDL_video.c in Sources */,
|
||||
A7D8BA5B23E2514400DCD162 /* SDL_shaders_gles2.c in Sources */,
|
||||
A7D8B14023E2514200DCD162 /* SDL_blit_1.c in Sources */,
|
||||
A7D8BBDB23E2574800DCD162 /* SDL_uikitmetalview.m in Sources */,
|
||||
A7D8BB1523E2514500DCD162 /* SDL_mouse.c in Sources */,
|
||||
A7D8BAD923E2514500DCD162 /* e_rem_pio2.c in Sources */,
|
||||
A7D8BB0F23E2514500DCD162 /* SDL_dataqueue.c in Sources */,
|
||||
F395C19C2569C68F00942BFF /* SDL_iokitjoystick.c in Sources */,
|
||||
A7D8B4B223E2514300DCD162 /* SDL_sysjoystick.c in Sources */,
|
||||
A7D8B3E023E2514300DCD162 /* SDL_cpuinfo.c in Sources */,
|
||||
@ -2568,6 +2684,10 @@
|
||||
A7D8AEA023E2514100DCD162 /* SDL_cocoavulkan.m in Sources */,
|
||||
A7D8AB6123E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
566E26D8246274CC00718109 /* SDL_locale.c in Sources */,
|
||||
63134A262A7902FD0021E9A6 /* SDL_pen.c in Sources */,
|
||||
000040E76FDC6AE48CBF0000 /* SDL_hashtable.c in Sources */,
|
||||
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */,
|
||||
000028F8113A53F4333E0000 /* SDL_main_callbacks.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
|
@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 52;
|
||||
objectVersion = 55;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
@ -153,7 +153,6 @@
|
||||
F35E56DF2983130F00A43A5F /* testautomation_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56C72983130E00A43A5F /* testautomation_keyboard.c */; };
|
||||
F35E56E02983130F00A43A5F /* testautomation_sdltest.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56C82983130E00A43A5F /* testautomation_sdltest.c */; };
|
||||
F35E56E12983130F00A43A5F /* testautomation_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56C92983130E00A43A5F /* testautomation_guid.c */; };
|
||||
F35E56E22983130F00A43A5F /* testautomation_syswm.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56CA2983130E00A43A5F /* testautomation_syswm.c */; };
|
||||
F35E56E32983130F00A43A5F /* testautomation_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56CB2983130F00A43A5F /* testautomation_surface.c */; };
|
||||
F35E56E42983130F00A43A5F /* testautomation.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56CC2983130F00A43A5F /* testautomation.c */; };
|
||||
F35E56E52983130F00A43A5F /* testautomation_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = F35E56CD2983130F00A43A5F /* testautomation_mouse.c */; };
|
||||
@ -1329,7 +1328,6 @@
|
||||
F35E56C72983130E00A43A5F /* testautomation_keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_keyboard.c; sourceTree = "<group>"; };
|
||||
F35E56C82983130E00A43A5F /* testautomation_sdltest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_sdltest.c; sourceTree = "<group>"; };
|
||||
F35E56C92983130E00A43A5F /* testautomation_guid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_guid.c; sourceTree = "<group>"; };
|
||||
F35E56CA2983130E00A43A5F /* testautomation_syswm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_syswm.c; sourceTree = "<group>"; };
|
||||
F35E56CB2983130F00A43A5F /* testautomation_surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_surface.c; sourceTree = "<group>"; };
|
||||
F35E56CC2983130F00A43A5F /* testautomation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation.c; sourceTree = "<group>"; };
|
||||
F35E56CD2983130F00A43A5F /* testautomation_mouse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testautomation_mouse.c; sourceTree = "<group>"; };
|
||||
@ -1780,7 +1778,6 @@
|
||||
F35E56C82983130E00A43A5F /* testautomation_sdltest.c */,
|
||||
F35E56BE2983130C00A43A5F /* testautomation_stdlib.c */,
|
||||
F35E56CB2983130F00A43A5F /* testautomation_surface.c */,
|
||||
F35E56CA2983130E00A43A5F /* testautomation_syswm.c */,
|
||||
F35E56BD2983130B00A43A5F /* testautomation_timer.c */,
|
||||
F35E56C12983130C00A43A5F /* testautomation_video.c */,
|
||||
F35E56CC2983130F00A43A5F /* testautomation.c */,
|
||||
@ -3357,7 +3354,6 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F35E56D12983130F00A43A5F /* testautomation_render.c in Sources */,
|
||||
F35E56E22983130F00A43A5F /* testautomation_syswm.c in Sources */,
|
||||
F399C6512A7892D800C86979 /* testautomation_intrinsics.c in Sources */,
|
||||
F35E56D22983130F00A43A5F /* testautomation_rwops.c in Sources */,
|
||||
F35E56E32983130F00A43A5F /* testautomation_surface.c in Sources */,
|
||||
|
@ -8,23 +8,23 @@ else {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
if (buildAsApplication) {
|
||||
namespace "org.libsdl.app"
|
||||
}
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.libsdl.app"
|
||||
}
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 31
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-16"
|
||||
arguments "APP_PLATFORM=android-19"
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
cmake {
|
||||
arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
||||
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
@ -54,7 +54,7 @@ android {
|
||||
}
|
||||
|
||||
}
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
com.gamemaker.game
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.libsdl.app"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0"
|
||||
android:installLocation="auto">
|
||||
|
@ -273,6 +273,7 @@ public class HIDDeviceManager {
|
||||
final int XB1_IFACE_SUBCLASS = 71;
|
||||
final int XB1_IFACE_PROTOCOL = 208;
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x03f0, // HP
|
||||
0x044f, // Thrustmaster
|
||||
0x045e, // Microsoft
|
||||
0x0738, // Mad Catz
|
||||
@ -358,6 +359,12 @@ public class HIDDeviceManager {
|
||||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12 */ &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH_CONNECT, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH_CONNECT");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
|
@ -23,9 +23,6 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.Selection;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
@ -39,12 +36,9 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
@ -186,6 +180,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZEALL = 9;
|
||||
private static final int SDL_SYSTEM_CURSOR_NO = 10;
|
||||
private static final int SDL_SYSTEM_CURSOR_HAND = 11;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT = 12;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_TOP = 13;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT = 14;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_RIGHT = 15;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT = 16;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_BOTTOM = 17;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT = 18;
|
||||
private static final int SDL_SYSTEM_CURSOR_WINDOW_LEFT = 19;
|
||||
|
||||
protected static final int SDL_ORIENTATION_UNKNOWN = 0;
|
||||
protected static final int SDL_ORIENTATION_LANDSCAPE = 1;
|
||||
@ -210,7 +212,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
// Main components
|
||||
protected static SDLActivity mSingleton;
|
||||
protected static SDLSurface mSurface;
|
||||
protected static DummyEdit mTextEdit;
|
||||
protected static SDLDummyEdit mTextEdit;
|
||||
protected static boolean mScreenKeyboardShown;
|
||||
protected static ViewGroup mLayout;
|
||||
protected static SDLClipboardHandler mClipboardHandler;
|
||||
@ -238,6 +240,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
return mMotionListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method creates a Runnable which invokes SDL_main. The default implementation
|
||||
* uses the getMainSharedObject() and getMainFunction() methods to invoke native
|
||||
* code from the specified shared library.
|
||||
*/
|
||||
protected Runnable createSDLMainRunnable() {
|
||||
return new SDLMain();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the name of the shared object with the application entry point
|
||||
* It can be overridden by derived classes.
|
||||
@ -672,11 +683,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
|
||||
// Wait for "SDLThread" thread to end
|
||||
try {
|
||||
// 500ms timeout, because:
|
||||
// Use a timeout because:
|
||||
// C SDLmain() thread might have started (mSDLThread.start() called)
|
||||
// while the SDL_Init() might not have been called yet,
|
||||
// and so the previous QUIT event will be discarded by SDL_Init() and app is running, not exiting.
|
||||
SDLActivity.mSDLThread.join(500);
|
||||
SDLActivity.mSDLThread.join(1000);
|
||||
} catch(Exception e) {
|
||||
Log.v(TAG, "Problem stopping SDLThread: " + e);
|
||||
}
|
||||
@ -777,13 +788,13 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
|
||||
// Try a transition to resumed state
|
||||
if (mNextNativeState == NativeState.RESUMED) {
|
||||
if (mSurface.mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
|
||||
if (mSurface.mIsSurfaceReady && (mHasFocus || mHasMultiWindow) && mIsResumedCalled) {
|
||||
if (mSDLThread == null) {
|
||||
// This is the entry point to the C app.
|
||||
// Start up the C app thread and enable sensor input for the first time
|
||||
// FIXME: Why aren't we enabling sensor input at start?
|
||||
|
||||
mSDLThread = new Thread(new SDLMain(), "SDLThread");
|
||||
mSDLThread = new Thread(SDLActivity.mSingleton.createSDLMainRunnable(), "SDLThread");
|
||||
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
|
||||
mSDLThread.start();
|
||||
|
||||
@ -799,11 +810,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
|
||||
// Messages from the SDLMain thread
|
||||
static final int COMMAND_CHANGE_TITLE = 1;
|
||||
static final int COMMAND_CHANGE_WINDOW_STYLE = 2;
|
||||
static final int COMMAND_TEXTEDIT_HIDE = 3;
|
||||
static final int COMMAND_SET_KEEP_SCREEN_ON = 5;
|
||||
|
||||
protected static final int COMMAND_CHANGE_TITLE = 1;
|
||||
protected static final int COMMAND_CHANGE_WINDOW_STYLE = 2;
|
||||
protected static final int COMMAND_TEXTEDIT_HIDE = 3;
|
||||
protected static final int COMMAND_SET_KEEP_SCREEN_ON = 5;
|
||||
protected static final int COMMAND_USER = 0x8000;
|
||||
|
||||
protected static boolean mFullscreenModeActive;
|
||||
@ -911,7 +921,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
Handler commandHandler = new SDLCommandHandler();
|
||||
|
||||
// Send a message from the SDLMain thread
|
||||
boolean sendCommand(int command, Object data) {
|
||||
protected boolean sendCommand(int command, Object data) {
|
||||
Message msg = commandHandler.obtainMessage();
|
||||
msg.arg1 = command;
|
||||
msg.obj = data;
|
||||
@ -1123,23 +1133,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean shouldMinimizeOnFocusLoss() {
|
||||
/*
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
if (mSingleton == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mSingleton.isInMultiWindowMode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mSingleton.isInPictureInPictureMode()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1344,7 +1337,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
params.topMargin = y;
|
||||
|
||||
if (mTextEdit == null) {
|
||||
mTextEdit = new DummyEdit(SDL.getContext());
|
||||
mTextEdit = new SDLDummyEdit(SDL.getContext());
|
||||
|
||||
mLayout.addView(mTextEdit, params);
|
||||
} else {
|
||||
@ -1416,23 +1409,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (isTextInputEvent(event)) {
|
||||
if (ic != null) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
} else {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
}
|
||||
onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
||||
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
||||
// they are ignored here because sending them as mouse input to SDL is messy
|
||||
@ -1447,6 +1423,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (isTextInputEvent(event)) {
|
||||
if (ic != null) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
} else {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
}
|
||||
onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1830,6 +1821,30 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
case SDL_SYSTEM_CURSOR_HAND:
|
||||
cursor_type = 1002; //PointerIcon.TYPE_HAND;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT:
|
||||
cursor_type = 1017; //PointerIcon.TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_TOP:
|
||||
cursor_type = 1015; //PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT:
|
||||
cursor_type = 1016; //PointerIcon.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_RIGHT:
|
||||
cursor_type = 1014; //PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT:
|
||||
cursor_type = 1017; //PointerIcon.TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_BOTTOM:
|
||||
cursor_type = 1015; //PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT:
|
||||
cursor_type = 1016; //PointerIcon.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WINDOW_LEFT:
|
||||
cursor_type = 1014; //PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
|
||||
break;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
try {
|
||||
@ -1900,11 +1915,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
try
|
||||
{
|
||||
class OneShotTask implements Runnable {
|
||||
String mMessage;
|
||||
int mDuration;
|
||||
int mGravity;
|
||||
int mXOffset;
|
||||
int mYOffset;
|
||||
private final String mMessage;
|
||||
private final int mDuration;
|
||||
private final int mGravity;
|
||||
private final int mXOffset;
|
||||
private final int mYOffset;
|
||||
|
||||
OneShotTask(String message, int duration, int gravity, int xOffset, int yOffset) {
|
||||
mMessage = message;
|
||||
@ -1968,186 +1983,6 @@ class SDLMain implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
/* This is a fake invisible editor view that receives the input and defines the
|
||||
* pan&scan region
|
||||
*/
|
||||
class DummyEdit extends View implements View.OnKeyListener {
|
||||
InputConnection ic;
|
||||
|
||||
public DummyEdit(Context context) {
|
||||
super(context);
|
||||
setFocusableInTouchMode(true);
|
||||
setFocusable(true);
|
||||
setOnKeyListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCheckIsTextEditor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
return SDLActivity.handleKeyEvent(v, keyCode, event, ic);
|
||||
}
|
||||
|
||||
//
|
||||
@Override
|
||||
public boolean onKeyPreIme (int keyCode, KeyEvent event) {
|
||||
// As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
|
||||
// FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
|
||||
// FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
|
||||
// FIXME: A more effective solution would be to assume our Layout to be RelativeLayout or LinearLayout
|
||||
// FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
|
||||
// FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
|
||||
if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
|
||||
SDLActivity.onNativeKeyboardFocusLost();
|
||||
}
|
||||
}
|
||||
return super.onKeyPreIme(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
|
||||
ic = new SDLInputConnection(this, true);
|
||||
|
||||
outAttrs.inputType = InputType.TYPE_CLASS_TEXT |
|
||||
InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI |
|
||||
EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;
|
||||
|
||||
return ic;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLInputConnection extends BaseInputConnection {
|
||||
|
||||
protected EditText mEditText;
|
||||
protected String mCommittedText = "";
|
||||
|
||||
public SDLInputConnection(View targetView, boolean fullEditor) {
|
||||
super(targetView, fullEditor);
|
||||
mEditText = new EditText(SDL.getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Editable getEditable() {
|
||||
return mEditText.getEditableText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendKeyEvent(KeyEvent event) {
|
||||
/*
|
||||
* This used to handle the keycodes from soft keyboard (and IME-translated input from hardkeyboard)
|
||||
* However, as of Ice Cream Sandwich and later, almost all soft keyboard doesn't generate key presses
|
||||
* and so we need to generate them ourselves in commitText. To avoid duplicates on the handful of keys
|
||||
* that still do, we empty this out.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Return DOES still generate a key event, however. So rather than using it as the 'click a button' key
|
||||
* as we do with physical keyboards, let's just use it to hide the keyboard.
|
||||
*/
|
||||
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return super.sendKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean commitText(CharSequence text, int newCursorPosition) {
|
||||
if (!super.commitText(text, newCursorPosition)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setComposingText(CharSequence text, int newCursorPosition) {
|
||||
if (!super.setComposingText(text, newCursorPosition)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||
if (Build.VERSION.SDK_INT <= 29 /* Android 10.0 (Q) */) {
|
||||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||
if (beforeLength > 0 && afterLength == 0) {
|
||||
// backspace(s)
|
||||
while (beforeLength-- > 0) {
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void updateText() {
|
||||
final Editable content = getEditable();
|
||||
if (content == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String text = content.toString();
|
||||
int compareLength = Math.min(text.length(), mCommittedText.length());
|
||||
int matchLength, offset;
|
||||
|
||||
/* Backspace over characters that are no longer in the string */
|
||||
for (matchLength = 0; matchLength < compareLength; ) {
|
||||
int codePoint = mCommittedText.codePointAt(matchLength);
|
||||
if (codePoint != text.codePointAt(matchLength)) {
|
||||
break;
|
||||
}
|
||||
matchLength += Character.charCount(codePoint);
|
||||
}
|
||||
/* FIXME: This doesn't handle graphemes, like '🌬️' */
|
||||
for (offset = matchLength; offset < mCommittedText.length(); ) {
|
||||
int codePoint = mCommittedText.codePointAt(offset);
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
|
||||
if (matchLength < text.length()) {
|
||||
String pendingText = text.subSequence(matchLength, text.length()).toString();
|
||||
for (offset = 0; offset < pendingText.length(); ) {
|
||||
int codePoint = pendingText.codePointAt(offset);
|
||||
if (codePoint == '\n') {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Higher code points don't generate simulated scancodes */
|
||||
if (codePoint < 128) {
|
||||
nativeGenerateScancodeForUnichar((char)codePoint);
|
||||
}
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
SDLInputConnection.nativeCommitText(pendingText, 0);
|
||||
}
|
||||
mCommittedText = text;
|
||||
}
|
||||
|
||||
public static native void nativeCommitText(String text, int newCursorPosition);
|
||||
|
||||
public static native void nativeGenerateScancodeForUnichar(char c);
|
||||
}
|
||||
|
||||
class SDLClipboardHandler implements
|
||||
ClipboardManager.OnPrimaryClipChangedListener {
|
||||
|
||||
|
@ -0,0 +1,62 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.*;
|
||||
import android.text.InputType;
|
||||
import android.view.*;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
|
||||
/* This is a fake invisible editor view that receives the input and defines the
|
||||
* pan&scan region
|
||||
*/
|
||||
public class SDLDummyEdit extends View implements View.OnKeyListener
|
||||
{
|
||||
InputConnection ic;
|
||||
|
||||
public SDLDummyEdit(Context context) {
|
||||
super(context);
|
||||
setFocusableInTouchMode(true);
|
||||
setFocusable(true);
|
||||
setOnKeyListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCheckIsTextEditor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
return SDLActivity.handleKeyEvent(v, keyCode, event, ic);
|
||||
}
|
||||
|
||||
//
|
||||
@Override
|
||||
public boolean onKeyPreIme (int keyCode, KeyEvent event) {
|
||||
// As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
|
||||
// FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
|
||||
// FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
|
||||
// FIXME: A more effective solution would be to assume our Layout to be RelativeLayout or LinearLayout
|
||||
// FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
|
||||
// FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
|
||||
if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
|
||||
SDLActivity.onNativeKeyboardFocusLost();
|
||||
}
|
||||
}
|
||||
return super.onKeyPreIme(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
|
||||
ic = new SDLInputConnection(this, true);
|
||||
|
||||
outAttrs.inputType = InputType.TYPE_CLASS_TEXT |
|
||||
InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI |
|
||||
EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;
|
||||
|
||||
return ic;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,136 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.*;
|
||||
import android.os.Build;
|
||||
import android.text.Editable;
|
||||
import android.view.*;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.widget.EditText;
|
||||
|
||||
public class SDLInputConnection extends BaseInputConnection
|
||||
{
|
||||
protected EditText mEditText;
|
||||
protected String mCommittedText = "";
|
||||
|
||||
public SDLInputConnection(View targetView, boolean fullEditor) {
|
||||
super(targetView, fullEditor);
|
||||
mEditText = new EditText(SDL.getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Editable getEditable() {
|
||||
return mEditText.getEditableText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendKeyEvent(KeyEvent event) {
|
||||
/*
|
||||
* This used to handle the keycodes from soft keyboard (and IME-translated input from hardkeyboard)
|
||||
* However, as of Ice Cream Sandwich and later, almost all soft keyboard doesn't generate key presses
|
||||
* and so we need to generate them ourselves in commitText. To avoid duplicates on the handful of keys
|
||||
* that still do, we empty this out.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Return DOES still generate a key event, however. So rather than using it as the 'click a button' key
|
||||
* as we do with physical keyboards, let's just use it to hide the keyboard.
|
||||
*/
|
||||
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return super.sendKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean commitText(CharSequence text, int newCursorPosition) {
|
||||
if (!super.commitText(text, newCursorPosition)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setComposingText(CharSequence text, int newCursorPosition) {
|
||||
if (!super.setComposingText(text, newCursorPosition)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||
if (Build.VERSION.SDK_INT <= 29 /* Android 10.0 (Q) */) {
|
||||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection
|
||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||
if (beforeLength > 0 && afterLength == 0) {
|
||||
// backspace(s)
|
||||
while (beforeLength-- > 0) {
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!super.deleteSurroundingText(beforeLength, afterLength)) {
|
||||
return false;
|
||||
}
|
||||
updateText();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void updateText() {
|
||||
final Editable content = getEditable();
|
||||
if (content == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String text = content.toString();
|
||||
int compareLength = Math.min(text.length(), mCommittedText.length());
|
||||
int matchLength, offset;
|
||||
|
||||
/* Backspace over characters that are no longer in the string */
|
||||
for (matchLength = 0; matchLength < compareLength; ) {
|
||||
int codePoint = mCommittedText.codePointAt(matchLength);
|
||||
if (codePoint != text.codePointAt(matchLength)) {
|
||||
break;
|
||||
}
|
||||
matchLength += Character.charCount(codePoint);
|
||||
}
|
||||
/* FIXME: This doesn't handle graphemes, like '🌬️' */
|
||||
for (offset = matchLength; offset < mCommittedText.length(); ) {
|
||||
int codePoint = mCommittedText.codePointAt(offset);
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
|
||||
if (matchLength < text.length()) {
|
||||
String pendingText = text.subSequence(matchLength, text.length()).toString();
|
||||
for (offset = 0; offset < pendingText.length(); ) {
|
||||
int codePoint = pendingText.codePointAt(offset);
|
||||
if (codePoint == '\n') {
|
||||
if (SDLActivity.onNativeSoftReturnKey()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Higher code points don't generate simulated scancodes */
|
||||
if (codePoint < 128) {
|
||||
nativeGenerateScancodeForUnichar((char)codePoint);
|
||||
}
|
||||
offset += Character.charCount(codePoint);
|
||||
}
|
||||
SDLInputConnection.nativeCommitText(pendingText, 0);
|
||||
}
|
||||
mCommittedText = text;
|
||||
}
|
||||
|
||||
public static native void nativeCommitText(String text, int newCursorPosition);
|
||||
|
||||
public static native void nativeGenerateScancodeForUnichar(char c);
|
||||
}
|
||||
|
@ -164,13 +164,10 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
// Don't skip in MultiWindow.
|
||||
// Don't skip if we might be multi-window or have popup dialogs
|
||||
if (skip) {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
if (SDLActivity.mSingleton.isInMultiWindowMode()) {
|
||||
Log.v("SDL", "Don't skip in Multi-Window");
|
||||
skip = false;
|
||||
}
|
||||
skip = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +193,24 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
return SDLActivity.handleKeyEvent(v, keyCode, event, null);
|
||||
}
|
||||
|
||||
private float getNormalizedX(float x)
|
||||
{
|
||||
if (mWidth <= 1) {
|
||||
return 0.5f;
|
||||
} else {
|
||||
return (x / (mWidth - 1));
|
||||
}
|
||||
}
|
||||
|
||||
private float getNormalizedY(float y)
|
||||
{
|
||||
if (mHeight <= 1) {
|
||||
return 0.5f;
|
||||
} else {
|
||||
return (y / (mHeight - 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Touch events
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
@ -242,8 +257,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
for (i = 0; i < pointerCount; i++) {
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
x = getNormalizedX(event.getX(i));
|
||||
y = getNormalizedY(event.getY(i));
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
@ -267,8 +282,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
x = getNormalizedX(event.getX(i));
|
||||
y = getNormalizedY(event.getY(i));
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
@ -281,8 +296,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
for (i = 0; i < pointerCount; i++) {
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
x = getNormalizedX(event.getX(i));
|
||||
y = getNormalizedY(event.getY(i));
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -1069,11 +1069,6 @@ typedef SDL_GameControllerButton, SDL_GamepadButton;
|
||||
- SDL_GameControllerButton
|
||||
+ SDL_GamepadButton
|
||||
@@
|
||||
typedef SDL_GameControllerButtonBind, SDL_GamepadBinding;
|
||||
@@
|
||||
- SDL_GameControllerButtonBind
|
||||
+ SDL_GamepadBinding
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerClose
|
||||
+ SDL_CloseGamepad
|
||||
@ -1115,16 +1110,6 @@ typedef SDL_GameControllerButtonBind, SDL_GamepadBinding;
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetBindForAxis
|
||||
+ SDL_GetGamepadBindForAxis
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetBindForButton
|
||||
+ SDL_GetGamepadBindForButton
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetButton
|
||||
+ SDL_GetGamepadButton
|
||||
(...)
|
||||
@ -1255,21 +1240,11 @@ typedef SDL_GameControllerButtonBind, SDL_GamepadBinding;
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerMappingForIndex
|
||||
+ SDL_GetGamepadMappingForIndex
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerName
|
||||
+ SDL_GetGamepadName
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerNumMappings
|
||||
+ SDL_GetNumGamepadMappings
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerOpen
|
||||
+ SDL_OpenGamepad
|
||||
(...)
|
||||
@ -1949,10 +1924,10 @@ expression e2;
|
||||
+ SDL_BlitSurfaceUnchecked
|
||||
(...)
|
||||
@@
|
||||
expression e1, e2, e3, e4;
|
||||
@@
|
||||
- SDL_LowerBlitScaled
|
||||
+ SDL_BlitSurfaceUncheckedScaled
|
||||
(...)
|
||||
- SDL_LowerBlitScaled(e1, e2, e3, e4)
|
||||
+ SDL_BlitSurfaceUncheckedScaled(e1, e2, e3, e4, SDL_SCALEMODE_NEAREST)
|
||||
@@
|
||||
@@
|
||||
- SDL_SetClipRect
|
||||
@ -1969,10 +1944,10 @@ expression e2;
|
||||
+ SDL_BlitSurface
|
||||
(...)
|
||||
@@
|
||||
expression e1, e2, e3, e4;
|
||||
@@
|
||||
- SDL_UpperBlitScaled
|
||||
+ SDL_BlitSurfaceScaled
|
||||
(...)
|
||||
- SDL_UpperBlitScaled(e1, e2, e3, e4)
|
||||
+ SDL_BlitSurfaceScaled(e1, e2, e3, e4, SDL_SCALEMODE_NEAREST)
|
||||
@@
|
||||
@@
|
||||
- SDL_RenderGetD3D11Device
|
||||
@ -2591,51 +2566,51 @@ typedef SDL_cond, SDL_Condition;
|
||||
@@
|
||||
@@
|
||||
- AUDIO_F32
|
||||
+ SDL_AUDIO_F32
|
||||
+ SDL_AUDIO_F32LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_F32LSB
|
||||
+ SDL_AUDIO_F32LSB
|
||||
+ SDL_AUDIO_F32LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_F32MSB
|
||||
+ SDL_AUDIO_F32MSB
|
||||
+ SDL_AUDIO_F32BE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_F32SYS
|
||||
+ SDL_AUDIO_F32SYS
|
||||
+ SDL_AUDIO_F32
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S16
|
||||
+ SDL_AUDIO_S16
|
||||
+ SDL_AUDIO_S16LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S16LSB
|
||||
+ SDL_AUDIO_S16LSB
|
||||
+ SDL_AUDIO_S16LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S16MSB
|
||||
+ SDL_AUDIO_S16MSB
|
||||
+ SDL_AUDIO_S16BE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S16SYS
|
||||
+ SDL_AUDIO_S16SYS
|
||||
+ SDL_AUDIO_S16
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S32
|
||||
+ SDL_AUDIO_S32
|
||||
+ SDL_AUDIO_S32LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S32LSB
|
||||
+ SDL_AUDIO_S32LSB
|
||||
+ SDL_AUDIO_S32LE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S32MSB
|
||||
+ SDL_AUDIO_S32MSB
|
||||
+ SDL_AUDIO_S32BE
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S32SYS
|
||||
+ SDL_AUDIO_S32SYS
|
||||
+ SDL_AUDIO_S32
|
||||
@@
|
||||
@@
|
||||
- AUDIO_S8
|
||||
@ -2750,3 +2725,42 @@ typedef SDL_cond, SDL_Condition;
|
||||
- SDL_WriteBE64
|
||||
+ SDL_WriteU64BE
|
||||
(...)
|
||||
@@
|
||||
expression e, n;
|
||||
@@
|
||||
- SDL_GetWindowData(e, n)
|
||||
+ SDL_GetProperty(SDL_GetWindowProperties(e), n)
|
||||
@@
|
||||
expression e, n, v;
|
||||
@@
|
||||
- SDL_SetWindowData(e, n, v)
|
||||
+ SDL_SetProperty(SDL_GetWindowProperties(e), n, v, NULL, NULL)
|
||||
@@
|
||||
expression w, i, s;
|
||||
@@
|
||||
- SDL_Vulkan_CreateSurface(w, i, s)
|
||||
+ SDL_Vulkan_CreateSurface(w, i, NULL, s)
|
||||
@@
|
||||
@@
|
||||
- SDL_RenderFlush
|
||||
+ SDL_FlushRenderer
|
||||
(...)
|
||||
@@
|
||||
@@
|
||||
- SDL_CONTROLLERSTEAMHANDLEUPDATED
|
||||
+ SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
|
||||
@@
|
||||
@@
|
||||
- SDL_GameControllerGetSteamHandle
|
||||
+ SDL_GetGamepadSteamHandle
|
||||
(...)
|
||||
@@
|
||||
expression e1, e2, e3, e4;
|
||||
@@
|
||||
- SDL_SoftStretch(e1, e2, e3, e4)
|
||||
+ SDL_SoftStretch(e1, e2, e3, e4, SDL_SCALEMODE_NEAREST)
|
||||
@@
|
||||
expression e1, e2, e3, e4;
|
||||
@@
|
||||
- SDL_SoftStretchLinear(e1, e2, e3, e4)
|
||||
+ SDL_SoftStretch(e1, e2, e3, e4, SDL_SCALEMODE_LINEAR)
|
||||
|
600
build-scripts/add-source-to-projects.pl
Executable file
600
build-scripts/add-source-to-projects.pl
Executable file
@ -0,0 +1,600 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Add source files and headers to Xcode and Visual Studio projects.
|
||||
# THIS IS NOT ROBUST, THIS IS JUST RYAN AVOIDING RUNNING BETWEEN
|
||||
# THREE COMPUTERS AND A BUNCH OF DEVELOPMENT ENVIRONMENTS TO ADD
|
||||
# A STUPID FILE TO THE BUILD.
|
||||
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
|
||||
my %xcode_references = ();
|
||||
sub generate_xcode_id {
|
||||
my @chars = ('0'..'9', 'A'..'F');
|
||||
my $str;
|
||||
|
||||
do {
|
||||
my $len = 16;
|
||||
$str = '0000'; # start and end with '0000' so we know we added it.
|
||||
while ($len--) {
|
||||
$str .= $chars[rand @chars]
|
||||
};
|
||||
$str .= '0000'; # start and end with '0000' so we know we added it.
|
||||
} while (defined($xcode_references{$str}));
|
||||
|
||||
$xcode_references{$str} = 1; # so future calls can't generate this one.
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
sub process_xcode {
|
||||
my $addpath = shift;
|
||||
my $pbxprojfname = shift;
|
||||
my $lineno;
|
||||
|
||||
%xcode_references = ();
|
||||
|
||||
my $addfname = basename($addpath);
|
||||
my $addext = '';
|
||||
if ($addfname =~ /\.(.*?)\Z/) {
|
||||
$addext = $1;
|
||||
}
|
||||
|
||||
my $is_public_header = ($addpath =~ /\Ainclude\/SDL3\//) ? 1 : 0;
|
||||
my $filerefpath = $is_public_header ? "SDL3/$addfname" : $addfname;
|
||||
|
||||
my $srcs_or_headers = '';
|
||||
my $addfiletype = '';
|
||||
|
||||
if ($addext eq 'c') {
|
||||
$srcs_or_headers = 'Sources';
|
||||
$addfiletype = 'sourcecode.c.c';
|
||||
} elsif ($addext eq 'm') {
|
||||
$srcs_or_headers = 'Sources';
|
||||
$addfiletype = 'sourcecode.c.objc';
|
||||
} elsif ($addext eq 'h') {
|
||||
$srcs_or_headers = 'Headers';
|
||||
$addfiletype = 'sourcecode.c.h';
|
||||
} else {
|
||||
die("Unexpected file extension '$addext'\n");
|
||||
}
|
||||
|
||||
my $fh;
|
||||
|
||||
open $fh, '<', $pbxprojfname or die("Failed to open '$pbxprojfname': $!\n");
|
||||
chomp(my @pbxproj = <$fh>);
|
||||
close($fh);
|
||||
|
||||
# build a table of all ids, in case we duplicate one by some miracle.
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
|
||||
# like "F3676F582A7885080091160D /* SDL3.dmg */ = {"
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
$xcode_references{$1} = $2;
|
||||
}
|
||||
}
|
||||
|
||||
# build out of a tree of PBXGroup items.
|
||||
my %pbxgroups = ();
|
||||
my $thispbxgroup;
|
||||
my $pbxgroup_children;
|
||||
my $pbxgroup_state = 0;
|
||||
my $pubheaders_group_hash = '';
|
||||
my $libsrc_group_hash = '';
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
if ($pbxgroup_state == 0) {
|
||||
$pbxgroup_state++ if /\A\/\* Begin PBXGroup section \*\/\Z/;
|
||||
} elsif ($pbxgroup_state == 1) {
|
||||
# like "F3676F582A7885080091160D /* SDL3.dmg */ = {"
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
my %newhash = ();
|
||||
$pbxgroups{$1} = \%newhash;
|
||||
$thispbxgroup = \%newhash;
|
||||
$pubheaders_group_hash = $1 if $2 eq 'Public Headers';
|
||||
$libsrc_group_hash = $1 if $2 eq 'Library Source';
|
||||
$pbxgroup_state++;
|
||||
} elsif (/\A\/\* End PBXGroup section \*\/\Z/) {
|
||||
last;
|
||||
} else {
|
||||
die("Expected pbxgroup obj on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 2) {
|
||||
if (/\A\t\t\tisa \= PBXGroup;\Z/) {
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's isa field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 3) {
|
||||
if (/\A\t\t\tchildren \= \(\Z/) {
|
||||
my %newhash = ();
|
||||
$$thispbxgroup{'children'} = \%newhash;
|
||||
$pbxgroup_children = \%newhash;
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's children field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 4) {
|
||||
if (/\A\t\t\t\t([A-F0-9]{24}) \/\* (.*?) \*\/,\Z/) {
|
||||
$$pbxgroup_children{$1} = $2;
|
||||
} elsif (/\A\t\t\t\);\Z/) {
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's children element on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 5) {
|
||||
if (/\A\t\t\t(.*?) \= (.*?);\Z/) {
|
||||
$$thispbxgroup{$1} = $2;
|
||||
} elsif (/\A\t\t\};\Z/) {
|
||||
$pbxgroup_state = 1;
|
||||
} else {
|
||||
die("Expected pbxgroup obj field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} else {
|
||||
die("bug in this script.");
|
||||
}
|
||||
}
|
||||
|
||||
die("Didn't see PBXGroup section in '$pbxprojfname'. Bug?\n") if $pbxgroup_state == 0;
|
||||
die("Didn't see Public Headers PBXGroup in '$pbxprojfname'. Bug?\n") if $pubheaders_group_hash eq '';
|
||||
die("Didn't see Library Source PBXGroup in '$pbxprojfname'. Bug?\n") if $libsrc_group_hash eq '';
|
||||
|
||||
# Some debug log dumping...
|
||||
if (0) {
|
||||
foreach (keys %pbxgroups) {
|
||||
my $k = $_;
|
||||
my $g = $pbxgroups{$k};
|
||||
print("$_:\n");
|
||||
foreach (keys %$g) {
|
||||
print(" $_:\n");
|
||||
if ($_ eq 'children') {
|
||||
my $kids = $$g{$_};
|
||||
foreach (keys %$kids) {
|
||||
print(" $_ -> " . $$kids{$_} . "\n");
|
||||
}
|
||||
} else {
|
||||
print(' ' . $$g{$_} . "\n");
|
||||
}
|
||||
}
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
# Get some unique IDs for our new thing.
|
||||
my $fileref = generate_xcode_id();
|
||||
my $buildfileref = generate_xcode_id();
|
||||
|
||||
|
||||
# Figure out what group to insert this into (or what groups to make)
|
||||
my $add_to_group_fileref = $fileref;
|
||||
my $add_to_group_addfname = $addfname;
|
||||
my $newgrptext = '';
|
||||
my $grphash = '';
|
||||
if ($is_public_header) {
|
||||
$grphash = $pubheaders_group_hash; # done!
|
||||
} else {
|
||||
$grphash = $libsrc_group_hash;
|
||||
my @splitpath = split(/\//, dirname($addpath));
|
||||
if ($splitpath[0] eq 'src') {
|
||||
shift @splitpath;
|
||||
}
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
my $g = $pbxgroups{$grphash};
|
||||
my $kids = $$g{'children'};
|
||||
my $found = 0;
|
||||
foreach (keys %$kids) {
|
||||
my $hash = $_;
|
||||
my $fname = $$kids{$hash};
|
||||
if (uc($fname) eq uc($elem)) {
|
||||
$grphash = $hash;
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
unshift(@splitpath, $elem), last if (not $found);
|
||||
}
|
||||
|
||||
if (@splitpath) { # still elements? We need to build groups.
|
||||
my $newgroupref = generate_xcode_id();
|
||||
|
||||
$add_to_group_fileref = $newgroupref;
|
||||
$add_to_group_addfname = $splitpath[0];
|
||||
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
my $lastelem = @splitpath ? 0 : 1;
|
||||
my $childhash = $lastelem ? $fileref : generate_xcode_id();
|
||||
my $childpath = $lastelem ? $addfname : $splitpath[0];
|
||||
$newgrptext .= "\t\t$newgroupref /* $elem */ = {\n";
|
||||
$newgrptext .= "\t\t\tisa = PBXGroup;\n";
|
||||
$newgrptext .= "\t\t\tchildren = (\n";
|
||||
$newgrptext .= "\t\t\t\t$childhash /* $childpath */,\n";
|
||||
$newgrptext .= "\t\t\t);\n";
|
||||
$newgrptext .= "\t\t\tpath = $elem;\n";
|
||||
$newgrptext .= "\t\t\tsourceTree = \"<group>\";\n";
|
||||
$newgrptext .= "\t\t};\n";
|
||||
$newgroupref = $childhash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $tmpfname = "$pbxprojfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
my $add_to_this_group = 0;
|
||||
$pbxgroup_state = 0;
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
if ($pbxgroup_state == 0) {
|
||||
# Drop in new references at the end of their sections...
|
||||
if (/\A\/\* End PBXBuildFile section \*\/\Z/) {
|
||||
print $fh "\t\t$buildfileref /* $addfname in $srcs_or_headers */ = {isa = PBXBuildFile; fileRef = $fileref /* $addfname */;";
|
||||
if ($is_public_header) {
|
||||
print $fh " settings = {ATTRIBUTES = (Public, ); };";
|
||||
}
|
||||
print $fh " };\n";
|
||||
} elsif (/\A\/\* End PBXFileReference section \*\/\Z/) {
|
||||
print $fh "\t\t$fileref /* $addfname */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = $addfiletype; name = $addfname; path = $filerefpath; sourceTree = \"<group>\"; };\n";
|
||||
} elsif (/\A\/\* Begin PBXGroup section \*\/\Z/) {
|
||||
$pbxgroup_state = 1;
|
||||
} elsif (/\A\/\* Begin PBXSourcesBuildPhase section \*\/\Z/) {
|
||||
$pbxgroup_state = 5;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 1) {
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
$pbxgroup_state++;
|
||||
$add_to_this_group = $1 eq $grphash;
|
||||
} elsif (/\A\/\* End PBXGroup section \*\/\Z/) {
|
||||
print $fh $newgrptext;
|
||||
$pbxgroup_state = 0;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 2) {
|
||||
if (/\A\t\t\tchildren \= \(\Z/) {
|
||||
$pbxgroup_state++;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 3) {
|
||||
if (/\A\t\t\t\);\Z/) {
|
||||
if ($add_to_this_group) {
|
||||
print $fh "\t\t\t\t$add_to_group_fileref /* $add_to_group_addfname */,\n";
|
||||
}
|
||||
$pbxgroup_state++;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 4) {
|
||||
if (/\A\t\t\};\Z/) {
|
||||
$add_to_this_group = 0;
|
||||
}
|
||||
$pbxgroup_state = 1;
|
||||
} elsif ($pbxgroup_state == 5) {
|
||||
if (/\A\t\t\t\);\Z/) {
|
||||
if ($srcs_or_headers eq 'Sources') {
|
||||
print $fh "\t\t\t\t$buildfileref /* $addfname in $srcs_or_headers */,\n";
|
||||
}
|
||||
$pbxgroup_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $pbxprojfname);
|
||||
}
|
||||
|
||||
my %visualc_references = ();
|
||||
sub generate_visualc_id { # these are just standard Windows GUIDs.
|
||||
my @chars = ('0'..'9', 'a'..'f');
|
||||
my $str;
|
||||
|
||||
do {
|
||||
my $len = 24;
|
||||
$str = '0000'; # start and end with '0000' so we know we added it.
|
||||
while ($len--) {
|
||||
$str .= $chars[rand @chars]
|
||||
};
|
||||
$str .= '0000'; # start and end with '0000' so we know we added it.
|
||||
$str =~ s/\A(........)(....)(....)(............)\Z/$1-$2-$3-$4/; # add dashes in the appropriate places.
|
||||
} while (defined($visualc_references{$str}));
|
||||
|
||||
$visualc_references{$str} = 1; # so future calls can't generate this one.
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
sub process_visualstudio {
|
||||
my $addpath = shift;
|
||||
my $vcxprojfname = shift;
|
||||
my $lineno;
|
||||
|
||||
%visualc_references = ();
|
||||
|
||||
my $is_public_header = ($addpath =~ /\Ainclude\/SDL3\//) ? 1 : 0;
|
||||
|
||||
my $addfname = basename($addpath);
|
||||
my $addext = '';
|
||||
if ($addfname =~ /\.(.*?)\Z/) {
|
||||
$addext = $1;
|
||||
}
|
||||
|
||||
my $isheader = 0;
|
||||
if ($addext eq 'c') {
|
||||
$isheader = 0;
|
||||
} elsif ($addext eq 'm') {
|
||||
return; # don't add Objective-C files to Visual Studio projects!
|
||||
} elsif ($addext eq 'h') {
|
||||
$isheader = 1;
|
||||
} else {
|
||||
die("Unexpected file extension '$addext'\n");
|
||||
}
|
||||
|
||||
my $fh;
|
||||
|
||||
open $fh, '<', $vcxprojfname or die("Failed to open '$vcxprojfname': $!\n");
|
||||
chomp(my @vcxproj = <$fh>);
|
||||
close($fh);
|
||||
|
||||
my $vcxgroup_state;
|
||||
|
||||
my $rawaddvcxpath = "$addpath";
|
||||
$rawaddvcxpath =~ s/\//\\/g;
|
||||
|
||||
# Figure out relative path from vcxproj file...
|
||||
my $addvcxpath = '';
|
||||
my @subdirs = split(/\//, $vcxprojfname);
|
||||
pop @subdirs;
|
||||
foreach (@subdirs) {
|
||||
$addvcxpath .= "..\\";
|
||||
}
|
||||
$addvcxpath .= $rawaddvcxpath;
|
||||
|
||||
my $prevname = undef;
|
||||
|
||||
my $tmpfname;
|
||||
|
||||
$tmpfname = "$vcxprojfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
my $added = 0;
|
||||
|
||||
$added = 0;
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
$lineno = 0;
|
||||
foreach (@vcxproj) {
|
||||
$lineno++;
|
||||
if ($vcxgroup_state == 0) {
|
||||
if (/\A \<ItemGroup\>\Z/) {
|
||||
$vcxgroup_state = 1;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 1) {
|
||||
if (/\A \<ClInclude .*\Z/) {
|
||||
$vcxgroup_state = 2 if $isheader;
|
||||
} elsif (/\A \<ClCompile .*\Z/) {
|
||||
$vcxgroup_state = 3 if not $isheader;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
}
|
||||
}
|
||||
|
||||
# Don't do elsif, we need to check this line again.
|
||||
if ($vcxgroup_state == 2) {
|
||||
if (/\A <ClInclude Include="(.*?)" \/\>\Z/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
}
|
||||
} elsif ($vcxgroup_state == 3) {
|
||||
if (/\A <ClCompile Include="(.*?)" \/\>\Z/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $vcxprojfname);
|
||||
|
||||
my $vcxfiltersfname = "$vcxprojfname.filters";
|
||||
open $fh, '<', $vcxfiltersfname or die("Failed to open '$vcxfiltersfname': $!\n");
|
||||
chomp(my @vcxfilters = <$fh>);
|
||||
close($fh);
|
||||
|
||||
my $newgrptext = '';
|
||||
my $filter = '';
|
||||
if ($is_public_header) {
|
||||
$filter = 'API Headers';
|
||||
} else {
|
||||
$filter = lc(dirname($addpath));
|
||||
$filter =~ s/\Asrc\///; # there's no filter for the base "src/" dir, where SDL.c and friends live.
|
||||
$filter =~ s/\//\\/g;
|
||||
$filter = '' if $filter eq 'src';
|
||||
|
||||
if ($filter ne '') {
|
||||
# see if the filter already exists, otherwise add it.
|
||||
my %existing_filters = ();
|
||||
my $current_filter = '';
|
||||
my $found = 0;
|
||||
foreach (@vcxfilters) {
|
||||
# These lines happen to be unique, so we don't have to parse down to find this section.
|
||||
if (/\A \<Filter Include\="(.*?)"\>\Z/) {
|
||||
$current_filter = lc($1);
|
||||
if ($current_filter eq $filter) {
|
||||
$found = 1;
|
||||
}
|
||||
} elsif (/\A \<UniqueIdentifier\>\{(.*?)\}\<\/UniqueIdentifier\>\Z/) {
|
||||
$visualc_references{$1} = $current_filter; # gather up existing GUIDs to avoid duplicates.
|
||||
$existing_filters{$current_filter} = $1;
|
||||
}
|
||||
}
|
||||
|
||||
if (not $found) { # didn't find it? We need to build filters.
|
||||
my $subpath = '';
|
||||
my @splitpath = split(/\\/, $filter);
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
$subpath .= "\\" if ($subpath ne '');
|
||||
$subpath .= $elem;
|
||||
if (not $existing_filters{$subpath}) {
|
||||
my $newgroupref = generate_visualc_id();
|
||||
$newgrptext .= " <Filter Include=\"$subpath\">\n";
|
||||
$newgrptext .= " <UniqueIdentifier>{$newgroupref}</UniqueIdentifier>\n";
|
||||
$newgrptext .= " </Filter>\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tmpfname = "$vcxfiltersfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
$added = 0;
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
$lineno = 0;
|
||||
foreach (@vcxfilters) {
|
||||
$lineno++;
|
||||
|
||||
# We cheat here, because these lines are unique, we don't have to fully parse this file.
|
||||
if ($vcxgroup_state == 0) {
|
||||
if (/\A \<Filter Include\="(.*?)"\>\Z/) {
|
||||
if ($newgrptext ne '') {
|
||||
$vcxgroup_state = 1;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif (/\A \<ClInclude .*\Z/) {
|
||||
if ($isheader) {
|
||||
$vcxgroup_state = 2;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif (/\A \<ClCompile .*\Z/) {
|
||||
if (not $isheader) {
|
||||
$vcxgroup_state = 3;
|
||||
$prevname = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Don't do elsif, we need to check this line again.
|
||||
if ($vcxgroup_state == 1) {
|
||||
if (/\A \<\/ItemGroup\>\Z/) {
|
||||
print $fh $newgrptext;
|
||||
$newgrptext = '';
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 2) {
|
||||
if (/\A <ClInclude Include="(.*?)"/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClInclude>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClInclude>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 3) {
|
||||
if (/\A <ClCompile Include="(.*?)"/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClCompile>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClCompile>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $vcxfiltersfname);
|
||||
}
|
||||
|
||||
|
||||
# Mainline!
|
||||
|
||||
chdir(dirname($0)); # assumed to be in build-scripts
|
||||
chdir('..'); # head to root of source tree.
|
||||
|
||||
foreach (@ARGV) {
|
||||
s/\A\.\///; # Turn "./path/to/file.txt" into "path/to/file.txt"
|
||||
my $arg = $_;
|
||||
process_xcode($arg, 'Xcode/SDL/SDL.xcodeproj/project.pbxproj');
|
||||
process_visualstudio($arg, 'VisualC/SDL/SDL.vcxproj');
|
||||
process_visualstudio($arg, 'VisualC-GDK/SDL/SDL.vcxproj');
|
||||
process_visualstudio($arg, 'VisualC-WinRT/SDL-UWP.vcxproj');
|
||||
}
|
||||
|
||||
print("Done. Please run `git diff` and make sure this looks okay!\n");
|
||||
|
||||
exit(0);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
# 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -269,7 +269,7 @@ static void write_converter(const int fromchans, const int tochans)
|
||||
"\n", lowercase(fromstr), lowercase(tostr));
|
||||
|
||||
if (convert_backwards) { /* must convert backwards when growing the output in-place. */
|
||||
printf(" /* convert backwards, since output is growing in-place. */\n");
|
||||
printf(" // convert backwards, since output is growing in-place.\n");
|
||||
printf(" src += (num_frames-1)");
|
||||
if (fromchans != 1) {
|
||||
printf(" * %d", fromchans);
|
||||
@ -406,7 +406,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
@ -425,7 +425,7 @@ int main(void)
|
||||
" 3. This notice may not be removed or altered from any source distribution.\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"/* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_channel_conversion.c */\n"
|
||||
"// DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_channel_conversion.c\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"typedef void (*SDL_AudioChannelConverter)(float *dst, const float *src, int num_frames);\n"
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -25,7 +25,7 @@ Built with:
|
||||
|
||||
gcc -o genfilter build-scripts/gen_audio_resampler_filter.c -lm && ./genfilter > src/audio/SDL_audio_resampler_filter.h
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
/*
|
||||
SDL's resampler uses a "bandlimited interpolation" algorithm:
|
||||
@ -41,23 +41,28 @@ gcc -o genfilter build-scripts/gen_audio_resampler_filter.c -lm && ./genfilter >
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#define RESAMPLER_ZERO_CROSSINGS 5
|
||||
#define RESAMPLER_BITS_PER_SAMPLE 16
|
||||
#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))
|
||||
#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)
|
||||
#define RESAMPLER_BITS_PER_ZERO_CROSSING ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1)
|
||||
#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << RESAMPLER_BITS_PER_ZERO_CROSSING)
|
||||
#define RESAMPLER_FILTER_SIZE (RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS)
|
||||
|
||||
/* This is a "modified" bessel function, so you can't use POSIX j0() */
|
||||
static double
|
||||
bessel(const double x)
|
||||
{
|
||||
const double xdiv2 = x / 2.0;
|
||||
double i0 = 1.0f;
|
||||
double f = 1.0f;
|
||||
double i0 = 1.0;
|
||||
double f = 1.0;
|
||||
int i = 1;
|
||||
|
||||
while (1) {
|
||||
const double diff = pow(xdiv2, i * 2) / pow(f, 2);
|
||||
if (diff < 1.0e-21f) {
|
||||
if (diff < 1.0e-21) {
|
||||
break;
|
||||
}
|
||||
i0 += diff;
|
||||
@ -70,30 +75,21 @@ bessel(const double x)
|
||||
|
||||
/* build kaiser table with cardinal sine applied to it, and array of differences between elements. */
|
||||
static void
|
||||
kaiser_and_sinc(float *table, float *diffs, const int tablelen, const double beta)
|
||||
kaiser_and_sinc(double *table, const int tablelen, const double beta)
|
||||
{
|
||||
const int lenm1 = tablelen - 1;
|
||||
const int lenm1div2 = lenm1 / 2;
|
||||
const double bessel_beta = bessel(beta);
|
||||
int i;
|
||||
|
||||
table[0] = 1.0f;
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const double kaiser = bessel(beta * sqrt(1.0 - pow(((i - lenm1) / 2.0) / lenm1div2, 2.0))) / bessel_beta;
|
||||
table[tablelen - i] = (float) kaiser;
|
||||
}
|
||||
table[0] = 1.0;
|
||||
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const float x = (((float) i) / ((float) RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) * ((float) M_PI);
|
||||
table[i] *= sinf(x) / x;
|
||||
diffs[i - 1] = table[i] - table[i - 1];
|
||||
const double kaiser = bessel(beta * sqrt(1.0 - pow((double)i / (double)(tablelen), 2.0))) / bessel_beta;
|
||||
const double x = (((double) i) / ((double) RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) * M_PI;
|
||||
table[i] = kaiser * (sin(x) / x);
|
||||
}
|
||||
diffs[lenm1] = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
static float ResamplerFilter[RESAMPLER_FILTER_SIZE];
|
||||
static float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE];
|
||||
static double ResamplerFilter[RESAMPLER_FILTER_SIZE];
|
||||
|
||||
static void
|
||||
PrepareResampleFilter(void)
|
||||
@ -101,19 +97,19 @@ PrepareResampleFilter(void)
|
||||
/* if dB > 50, beta=(0.1102 * (dB - 8.7)), according to Matlab. */
|
||||
const double dB = 80.0;
|
||||
const double beta = 0.1102 * (dB - 8.7);
|
||||
kaiser_and_sinc(ResamplerFilter, ResamplerFilterDifference, RESAMPLER_FILTER_SIZE, beta);
|
||||
kaiser_and_sinc(ResamplerFilter, RESAMPLER_FILTER_SIZE, beta);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
PrepareResampleFilter();
|
||||
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
@ -132,26 +128,20 @@ int main(void)
|
||||
" 3. This notice may not be removed or altered from any source distribution.\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"/* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_resampler_filter.c */\n"
|
||||
"// DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_resampler_filter.c\n"
|
||||
"\n"
|
||||
"#define RESAMPLER_ZERO_CROSSINGS %d\n"
|
||||
"#define RESAMPLER_BITS_PER_SAMPLE %d\n"
|
||||
"#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))\n"
|
||||
"#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)\n"
|
||||
"#define RESAMPLER_BITS_PER_ZERO_CROSSING ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1)\n"
|
||||
"#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << RESAMPLER_BITS_PER_ZERO_CROSSING)\n"
|
||||
"#define RESAMPLER_FILTER_SIZE (RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS)\n"
|
||||
"\n", RESAMPLER_ZERO_CROSSINGS, RESAMPLER_BITS_PER_SAMPLE
|
||||
);
|
||||
|
||||
printf("static const float ResamplerFilter[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilter[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilter[i+1]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static const float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilterDifference[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilterDifference[i+1]);
|
||||
printf("static const float ResamplerFilter[RESAMPLER_FILTER_SIZE] = {");
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE; i++) {
|
||||
j = (i % RESAMPLER_ZERO_CROSSINGS) * RESAMPLER_SAMPLES_PER_ZERO_CROSSING + (i / RESAMPLER_ZERO_CROSSINGS);
|
||||
printf("%s%12.9ff,", (i % RESAMPLER_ZERO_CROSSINGS) ? "" : "\n ", ResamplerFilter[j]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
|
@ -36,6 +36,10 @@ def main():
|
||||
if not header.exists():
|
||||
raise Exception("Couldn't find header %s" % header)
|
||||
|
||||
header_name = header.name
|
||||
if (header.name == "SDL_gamepad.h"):
|
||||
header_name = "SDL_gamecontroller.h"
|
||||
|
||||
header_text = header.read_text()
|
||||
|
||||
# Replace the symbols in source code
|
||||
@ -62,8 +66,8 @@ def main():
|
||||
oldname = args.args[i + 0]
|
||||
newname = args.args[i + 1]
|
||||
|
||||
add_symbol_to_oldnames(header.name, oldname, newname)
|
||||
add_symbol_to_migration(header.name, args.type, oldname, newname)
|
||||
add_symbol_to_oldnames(header_name, oldname, newname)
|
||||
add_symbol_to_migration(header_name, args.type, oldname, newname)
|
||||
add_symbol_to_coccinelle(args.type, oldname, newname)
|
||||
i += 2
|
||||
|
||||
|
@ -25,7 +25,7 @@ def main():
|
||||
|
||||
else:
|
||||
if len(args.args) < 3:
|
||||
print("Usage: %s oldname newname files_or_directories ..." % sys.argv[0])
|
||||
print("Usage: %s [--substring] oldname newname files_or_directories ..." % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
replacements = { args.args[0]: args.args[1] }
|
||||
|
@ -31,6 +31,7 @@ my $optionsfname = undef;
|
||||
my $wikipreamble = undef;
|
||||
my $changeformat = undef;
|
||||
my $manpath = undef;
|
||||
my $gitrev = undef;
|
||||
|
||||
foreach (@ARGV) {
|
||||
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
|
||||
@ -47,6 +48,9 @@ foreach (@ARGV) {
|
||||
} elsif (/\A--manpath=(.*)\Z/) {
|
||||
$manpath = $1;
|
||||
next;
|
||||
} elsif (/\A--rev=(.*)\Z/) {
|
||||
$gitrev = $1;
|
||||
next;
|
||||
}
|
||||
$srcpath = $_, next if not defined $srcpath;
|
||||
$wikipath = $_, next if not defined $wikipath;
|
||||
@ -788,6 +792,45 @@ while (my $d = readdir(DH)) {
|
||||
}
|
||||
closedir(DH);
|
||||
|
||||
delete $wikifuncs{"Undocumented"};
|
||||
|
||||
{
|
||||
my $path = "$wikipath/Undocumented.md";
|
||||
open(FH, '>', $path) or die("Can't open '$path': $!\n");
|
||||
|
||||
print FH "# Undocumented\n\n";
|
||||
|
||||
print FH "## Functions defined in the headers, but not in the wiki\n\n";
|
||||
my $header_only_func = 0;
|
||||
foreach (sort keys %headerfuncs) {
|
||||
my $fn = $_;
|
||||
if (not defined $wikifuncs{$fn}) {
|
||||
print FH "- [$fn]($fn)\n";
|
||||
$header_only_func = 1;
|
||||
}
|
||||
}
|
||||
if (!$header_only_func) {
|
||||
print FH "(none)\n";
|
||||
}
|
||||
print FH "\n";
|
||||
|
||||
print FH "## Functions defined in the wiki, but not in the headers\n\n";
|
||||
|
||||
my $wiki_only_func = 0;
|
||||
foreach (sort keys %wikifuncs) {
|
||||
my $fn = $_;
|
||||
if (not defined $headerfuncs{$fn}) {
|
||||
print FH "- [$fn]($fn)\n";
|
||||
$wiki_only_func = 1;
|
||||
}
|
||||
}
|
||||
if (!$wiki_only_func) {
|
||||
print FH "(none)\n";
|
||||
}
|
||||
print FH "\n";
|
||||
|
||||
close(FH);
|
||||
}
|
||||
|
||||
if ($warn_about_missing) {
|
||||
foreach (keys %wikifuncs) {
|
||||
@ -1047,7 +1090,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
my $dent = $_;
|
||||
if ($dent =~ /\A(.*?)\.md\Z/) { # we only bridge Markdown files here.
|
||||
next if $1 eq 'FrontPage';
|
||||
filecopy("$wikireadmepath/$dent", "$readmepath/README-$dent", "\r\n");
|
||||
filecopy("$wikireadmepath/$dent", "$readmepath/README-$dent", "\n");
|
||||
}
|
||||
}
|
||||
closedir(DH);
|
||||
@ -1437,8 +1480,10 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
close(FH);
|
||||
}
|
||||
|
||||
my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
|
||||
chomp($gitrev);
|
||||
if (!$gitrev) {
|
||||
$gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
|
||||
chomp($gitrev);
|
||||
}
|
||||
|
||||
# !!! FIXME
|
||||
open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
|
||||
|
138
cmake/FindFFmpeg.cmake
Normal file
138
cmake/FindFFmpeg.cmake
Normal file
@ -0,0 +1,138 @@
|
||||
# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
|
||||
#
|
||||
# Once done this will define
|
||||
# FFMPEG_FOUND - System has the all required components.
|
||||
# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
|
||||
#
|
||||
# For each of the components it will additionally set.
|
||||
# - AVCODEC
|
||||
# - AVDEVICE
|
||||
# - AVFORMAT
|
||||
# - AVFILTER
|
||||
# - AVUTIL
|
||||
# - POSTPROC
|
||||
# - SWSCALE
|
||||
# the following target will be defined
|
||||
# FFmpeg::SDL::<component> - link to this target to
|
||||
# the following variables will be defined
|
||||
# FFmpeg_<component>_FOUND - System has <component>
|
||||
# FFmpeg_<component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
|
||||
# FFmpeg_<component>_LIBRARIES - Link these to use <component>
|
||||
# FFmpeg_<component>_DEFINITIONS - Compiler switches required for using <component>
|
||||
# FFmpeg_<component>_VERSION - The components version
|
||||
#
|
||||
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
|
||||
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
|
||||
# Copyright (c) 2023, Sam lantinga, <slouken@libsdl.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PkgConfigHelper.cmake")
|
||||
|
||||
# The default components were taken from a survey over other FindFFMPEG.cmake files
|
||||
if(NOT FFmpeg_FIND_COMPONENTS)
|
||||
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
|
||||
foreach(_component IN LISTS FFmpeg_FIND_COMPONENTS)
|
||||
set(FFmpeg_FIND_REQUIRED_${_component} TRUE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
#
|
||||
### Macro: find_component
|
||||
#
|
||||
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
|
||||
# include directories.
|
||||
#
|
||||
macro(find_component _component _pkgconfig _library _header)
|
||||
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_${_component} QUIET ${_pkgconfig})
|
||||
endif()
|
||||
|
||||
find_path(FFmpeg_${_component}_INCLUDE_DIRS
|
||||
NAMES ${_header}
|
||||
HINTS
|
||||
${PC_${_component}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
ffmpeg
|
||||
)
|
||||
|
||||
find_library(FFmpeg_${_component}_LIBRARY
|
||||
NAMES ${_library}
|
||||
HINTS
|
||||
${PC_${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if(FFmpeg_${_component}_INCLUDE_DIRS AND FFmpeg_${_component}_LIBRARY)
|
||||
set(FFmpeg_${_component}_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(PC_${_component}_FOUND)
|
||||
get_flags_from_pkg_config("${FFmpeg_${_component}_LIBRARY}" "PC_${_component}" "${_component}")
|
||||
endif()
|
||||
|
||||
set(FFmpeg_${_component}_VERSION "${PC_${_component}_VERSION}")
|
||||
|
||||
set(FFmpeg_${_component}_COMPILE_OPTIONS "${${_component}_options}" CACHE STRING "Extra compile options of FFmpeg ${_component}")
|
||||
|
||||
set(FFmpeg_${_component}_LIBRARIES "${${_component}_link_libraries}" CACHE STRING "Extra link libraries of FFmpeg ${_component}")
|
||||
|
||||
set(FFmpeg_${_component}_LINK_OPTIONS "${${_component}_link_options}" CACHE STRING "Extra link flags of FFmpeg ${_component}")
|
||||
|
||||
set(FFmpeg_${_component}_LINK_DIRECTORIES "${${_component}_link_directories}" CACHE PATH "Extra link directories of FFmpeg ${_component}")
|
||||
|
||||
mark_as_advanced(
|
||||
FFmpeg_${_component}_INCLUDE_DIRS
|
||||
FFmpeg_${_component}_LIBRARY
|
||||
FFmpeg_${_component}_COMPILE_OPTIONS
|
||||
FFmpeg_${_component}_LIBRARIES
|
||||
FFmpeg_${_component}_LINK_OPTIONS
|
||||
FFmpeg_${_component}_LINK_DIRECTORIES
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Check for all possible component.
|
||||
find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
|
||||
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
|
||||
find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
|
||||
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
|
||||
find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h)
|
||||
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
|
||||
find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
|
||||
find_component(SWRESAMPLE libswresample swresample libswresample/swresample.h)
|
||||
|
||||
# Compile the list of required vars
|
||||
set(_FFmpeg_REQUIRED_VARS)
|
||||
foreach(_component ${FFmpeg_FIND_COMPONENTS})
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS FFmpeg_${_component}_INCLUDE_DIRS FFmpeg_${_component}_LIBRARY)
|
||||
endforeach ()
|
||||
|
||||
# Give a nice error message if some of the required vars are missing.
|
||||
find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})
|
||||
|
||||
set(FFMPEG_LIBRARIES)
|
||||
if(FFmpeg_FOUND)
|
||||
foreach(_component IN LISTS FFmpeg_FIND_COMPONENTS)
|
||||
if(FFmpeg_${_component}_FOUND)
|
||||
list(APPEND FFMPEG_LIBRARIES FFmpeg::SDL::${_component})
|
||||
if(NOT TARGET FFmpeg::SDL::${_component})
|
||||
add_library(FFmpeg::SDL::${_component} UNKNOWN IMPORTED)
|
||||
set_target_properties(FFmpeg::SDL::${_component} PROPERTIES
|
||||
IMPORTED_LOCATION "${FFmpeg_${_component}_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FFmpeg_${_component}_INCLUDE_DIRS}"
|
||||
INTERFACE_COMPILE_OPTIONS "${FFmpeg_${_component}_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${FFmpeg_${_component}_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${FFmpeg_${_component}_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${FFmpeg_${_component}_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
@ -2,13 +2,11 @@
|
||||
|
||||
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||
if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
|
||||
set(_include_dirs ${_pc_prefix}_STATIC_INCLUDE_DIRS)
|
||||
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
||||
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
||||
else()
|
||||
set(_include_dirs ${_pc_prefix}_INCLUDE_DIRS)
|
||||
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
||||
@ -21,9 +19,6 @@ function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||
# Work around CMake's flag deduplication when pc files use `-framework A` instead of `-Wl,-framework,A`
|
||||
string(REPLACE "-framework;" "-Wl,-framework," "_filtered_link_options" "${${_link_options}}")
|
||||
|
||||
set(${_out_prefix}_include_dirs
|
||||
"${${_include_dirs}}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_compile_options
|
||||
"${${_cflags}}"
|
||||
PARENT_SCOPE)
|
||||
|
@ -48,6 +48,11 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3jarTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3jarTargets.cmake")
|
||||
set(SDL3_Jar_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
|
||||
set(SDL3_SDL3_FOUND TRUE)
|
||||
endif()
|
||||
|
10
cmake/SDL3jarTargets.cmake.in
Normal file
10
cmake/SDL3jarTargets.cmake.in
Normal file
@ -0,0 +1,10 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set_and_check(SDL3_JAR "@PACKAGE_SDL_INSTALL_JAVADIR@/SDL3/SDL3-@SDL3_VERSION@.jar")
|
||||
|
||||
if(NOT TARGET SDL3::Jar)
|
||||
add_library(SDL3::Jar INTERFACE IMPORTED)
|
||||
set_property(TARGET SDL3::Jar PROPERTY JAR_FILE "${SDL3_JAR}")
|
||||
endif()
|
||||
|
||||
unset(SDL3_JAR)
|
@ -82,16 +82,48 @@ if(APPLE)
|
||||
enable_language(OBJC)
|
||||
endif()
|
||||
|
||||
function(SDL_detect_linker)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.29)
|
||||
if(NOT DEFINED SDL_CMAKE_C_COMPILER_LINKER_ID)
|
||||
execute_process(COMMAND ${CMAKE_LINKER} -v OUTPUT_VARIABLE LINKER_OUTPUT ERROR_VARIABLE LINKER_OUTPUT)
|
||||
string(REGEX REPLACE "[\r\n]" " " LINKER_OUTPUT "${LINKER_OUTPUT}")
|
||||
if(LINKER_OUTPUT MATCHES ".*Microsoft.*")
|
||||
set(linker MSVC)
|
||||
else()
|
||||
set(linker GNUlike)
|
||||
endif()
|
||||
message(STATUS "Linker identification: ${linker}")
|
||||
set(SDL_CMAKE_C_COMPILER_LINKER_ID "${linker}" CACHE STRING "Linker identification")
|
||||
mark_as_advanced(SDL_CMAKE_C_COMPILER_LINKER_ID)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER_LINKER_ID "${SDL_CMAKE_C_COMPILER_LINKER_ID}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(check_linker_supports_version_file VAR)
|
||||
SDL_detect_linker()
|
||||
if(CMAKE_C_COMPILER_LINKER_ID MATCHES "^(MSVC)$")
|
||||
set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
|
||||
else()
|
||||
cmake_push_check_state(RESET)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/dummy.sym")
|
||||
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
set(${VAR} "${LINKER_SUPPORTS_VERSION_SCRIPT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.18)
|
||||
function(check_linker_flag LANG FLAG VAR)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${FLAG} )
|
||||
cmake_push_check_state(RESET)
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${FLAG})
|
||||
if(LANG STREQUAL "C")
|
||||
include(CheckCSourceCompiles)
|
||||
check_c_source_compiles("int main(int argc,char*argv[]){(void)argc;(void)argv;return 0;}" ${VAR} FAIL_REGEX "warning")
|
||||
check_c_source_compiles("int main(int argc,char*argv[]){(void)argc;(void)argv;return 0;}" ${VAR} FAIL_REGEX "(unsupported|syntax error)")
|
||||
elseif(LANG STREQUAL "CXX")
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("int main(int argc,char*argv[]){(void)argc;(void)argv;return 0;}" ${VAR} FAIL_REGEX "warning")
|
||||
check_cxx_source_compiles("int main(int argc,char*argv[]){(void)argc;(void)argv;return 0;}" ${VAR} FAIL_REGEX "(unsupported|syntax error)")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported language: ${LANG}")
|
||||
endif()
|
||||
@ -169,3 +201,17 @@ function(SDL_PrintSummary)
|
||||
message(STATUS "")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(SDL_install_pdb TARGET DIRECTORY)
|
||||
get_property(type TARGET ${TARGET} PROPERTY TYPE)
|
||||
if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$")
|
||||
install(FILES $<TARGET_PDB_FILE:${TARGET}> DESTINATION "${DIRECTORY}" OPTIONAL)
|
||||
elseif(type STREQUAL "STATIC_LIBRARY")
|
||||
# FIXME: Use $<TARGET_COMPILE_PDB_FILE:${TARGET} once it becomes available (https://gitlab.kitware.com/cmake/cmake/-/issues/25244)
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio.*")
|
||||
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/${TARGET}.pdb\")")
|
||||
else()
|
||||
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET}.dir/${TARGET}.pdb\")")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -10,4 +10,4 @@ Version: @PROJECT_VERSION@
|
||||
Requires.private: @SDL_PC_PRIVATE_REQUIRES@
|
||||
Conflicts:
|
||||
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_PC_LIBS@ @SDL_PC_SECTION_LIBS_PRIVATE@ @SDL_PC_STATIC_LIBS@
|
||||
Cflags: -I${includedir} -I${includedir}/SDL3 @SDL_PC_CFLAGS@
|
||||
Cflags: -I${includedir} @SDL_PC_CFLAGS@
|
||||
|
@ -162,7 +162,7 @@ endmacro()
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckPulseAudio)
|
||||
if(SDL_PULSEAUDIO)
|
||||
set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=5.0")
|
||||
set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=0.9.15")
|
||||
pkg_check_modules(PC_PULSEAUDIO IMPORTED_TARGET ${PulseAudio_PKG_CONFIG_SPEC})
|
||||
if(PC_PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO TRUE)
|
||||
@ -307,7 +307,9 @@ macro(CheckX11)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/x11/*.c")
|
||||
set(SDL_VIDEO_DRIVER_X11 1)
|
||||
|
||||
# !!! FIXME: why is this disabled for Apple?
|
||||
# Note: Disabled on Apple because the dynamic mode backend for X11 doesn't
|
||||
# work properly on Apple during several issues like inconsistent paths
|
||||
# among platforms. See #6778 (https://github.com/libsdl-org/SDL/issues/6778)
|
||||
if(APPLE)
|
||||
set(SDL_X11_SHARED OFF)
|
||||
endif()
|
||||
@ -533,11 +535,6 @@ macro(CheckWayland)
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL3_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
|
||||
endforeach()
|
||||
|
||||
if(SDL_WAYLAND_QT_TOUCH)
|
||||
set(HAVE_WAYLAND_QT_TOUCH TRUE)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1)
|
||||
endif()
|
||||
|
||||
if(SDL_WAYLAND_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message(WARNING "You must have SDL_LoadObject() support for dynamic Wayland loading")
|
||||
endif()
|
||||
@ -560,10 +557,10 @@ 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.1.2 or higher is needed for suspended window state and statically linked min/max getters.
|
||||
if(PC_LIBDECOR_VERSION VERSION_GREATER_EQUAL "0.1.2")
|
||||
set(SDL_HAVE_LIBDECOR_VER_0_1_2 1)
|
||||
set(LibDecor_PKG_CONFIG_SPEC "libdecor-0>=0.1.2")
|
||||
# Version 0.2.0 or higher is needed for suspended window state and statically linked min/max getters.
|
||||
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)
|
||||
set(HAVE_LIBDECOR_H 1)
|
||||
@ -1019,35 +1016,37 @@ endmacro()
|
||||
|
||||
# Check for HIDAPI support
|
||||
macro(CheckHIDAPI)
|
||||
set(HAVE_HIDAPI TRUE)
|
||||
if(SDL_HIDAPI)
|
||||
set(HAVE_HIDAPI ON)
|
||||
if(SDL_HIDAPI_LIBUSB)
|
||||
set(HAVE_LIBUSB FALSE)
|
||||
|
||||
set(LibUSB_PKG_CONFIG_SPEC libusb-1.0)
|
||||
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)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${PC_LIBUSB_INCLUDE_DIRS})
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES PkgConfig::PC_LIBUSB)
|
||||
check_c_source_compiles("
|
||||
#include <stddef.h>
|
||||
#include <libusb.h>
|
||||
int main(int argc, char **argv) {
|
||||
libusb_close(NULL);
|
||||
return 0;
|
||||
}" HAVE_LIBUSB_H)
|
||||
cmake_pop_check_state()
|
||||
if(HAVE_LIBUSB_H)
|
||||
set(HAVE_LIBUSB TRUE)
|
||||
if(HIDAPI_ONLY_LIBUSB)
|
||||
sdl_link_dependency(hidapi LIBS PkgConfig::PC_LIBUSB PKG_CONFIG_PREFIX PC_LIBUSB PKG_CONFIG_SPECS ${LibUSB_PKG_CONFIG_SPEC})
|
||||
else()
|
||||
# libusb is loaded dynamically, so don't add link to it
|
||||
FindLibraryAndSONAME("usb-1.0" LIBDIRS ${PC_LIBUSB_LIBRARY_DIRS})
|
||||
if(USB_1.0_LIB)
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
|
||||
endif()
|
||||
FindLibraryAndSONAME("usb-1.0" LIBDIRS ${PC_LIBUSB_LIBRARY_DIRS})
|
||||
if(SDL_HIDAPI_LIBUSB_SHARED AND USB_1.0_LIB_SONAME)
|
||||
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>)
|
||||
else()
|
||||
sdl_link_dependency(hidapi LIBS PkgConfig::PC_LIBUSB PKG_CONFIG_PREFIX PC_LIBUSB PKG_CONFIG_SPECS ${LibUSB_PKG_CONFIG_SPEC})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
|
||||
set(HAVE_HIDAPI FALSE)
|
||||
endif()
|
||||
set(HAVE_HIDAPI_LIBUSB ${HAVE_LIBUSB})
|
||||
endif()
|
||||
|
||||
|
@ -49,12 +49,12 @@ function(SDL_AddCommonCompilerFlags TARGET)
|
||||
|
||||
check_c_compiler_flag(-Wundef HAVE_GCC_WUNDEF)
|
||||
if(HAVE_GCC_WUNDEF)
|
||||
target_compile_options(${TARGET} PRIVATE "-Wundef")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-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 "-fno-strict-aliasing")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fno-strict-aliasing>")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation HAVE_GCC_WDOCUMENTATION)
|
||||
@ -62,10 +62,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 "-Werror=documentation")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=documentation>")
|
||||
endif()
|
||||
endif()
|
||||
target_compile_options(${TARGET} PRIVATE "-Wdocumentation")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wdocumentation>")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation-unknown-command HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
||||
@ -73,30 +73,30 @@ 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 "-Werror=documentation-unknown-command")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=documentation-unknown-command>")
|
||||
endif()
|
||||
endif()
|
||||
target_compile_options(${TARGET} PRIVATE "-Wdocumentation-unknown-command")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-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 "-fcomment-block-commands=threadsafety")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-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 "/clang:-fcomment-block-commands=threadsafety")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:/clang:-fcomment-block-commands=threadsafety>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wshadow HAVE_GCC_WSHADOW)
|
||||
if(HAVE_GCC_WSHADOW)
|
||||
target_compile_options(${TARGET} PRIVATE "-Wshadow")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-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 "-Wno-unused-local-typedefs")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-local-typedefs>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -109,7 +109,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 "-Werror")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Werror>")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -117,12 +117,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 "-fcolor-diagnostics")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-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 "-fdiagnostics-color=always")
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-fdiagnostics-color=always>")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -2,7 +2,9 @@ include(CMakeParseArguments)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
function(SDL_generate_manpages)
|
||||
cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE;WIKIHEADERS_PL_PATH" "" ${ARGN})
|
||||
cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE;WIKIHEADERS_PL_PATH;REVISION" "" ${ARGN})
|
||||
|
||||
set(wikiheaders_extra_args)
|
||||
|
||||
if(NOT ARG_NAME)
|
||||
set(ARG_NAME "${PROJECT_NAME}")
|
||||
@ -17,7 +19,7 @@ function(SDL_generate_manpages)
|
||||
endif()
|
||||
|
||||
if(NOT ARG_HEADERS_DIR)
|
||||
set(ARG_HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3")
|
||||
message(FATAL_ERROR "Missing required HEADERS_DIR argument")
|
||||
endif()
|
||||
|
||||
# FIXME: get rid of SYMBOL and let the perl script figure out the dependencies
|
||||
@ -25,6 +27,10 @@ function(SDL_generate_manpages)
|
||||
message(FATAL_ERROR "Missing required SYMBOL argument")
|
||||
endif()
|
||||
|
||||
if(ARG_REVISION)
|
||||
list(APPEND wikiheaders_extra_args "--rev=${ARG_REVISION}")
|
||||
endif()
|
||||
|
||||
if(NOT ARG_BUILD_DOCDIR)
|
||||
set(ARG_BUILD_DOCDIR "${CMAKE_CURRENT_BINARY_DIR}/docs")
|
||||
endif()
|
||||
@ -40,13 +46,13 @@ function(SDL_generate_manpages)
|
||||
add_custom_command(
|
||||
OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md"
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${BUILD_WIKIDIR}"
|
||||
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki
|
||||
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki ${wikiheaders_extra_args}
|
||||
DEPENDS ${HEADER_FILES} "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
||||
COMMENT "Generating ${ARG_NAME} wiki markdown files"
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3"
|
||||
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages
|
||||
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages ${wikiheaders_extra_args}
|
||||
DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
||||
COMMENT "Generating ${ARG_NAME} man pages"
|
||||
)
|
||||
|
@ -332,6 +332,9 @@ function(configure_sdl3_pc)
|
||||
endif()
|
||||
|
||||
# Calculate prefix relative to location of sdl3.pc
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
file(RELATIVE_PATH SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${CMAKE_INSTALL_PREFIX}/${SDL_PKGCONFIG_INSTALLDIR}" "${CMAKE_INSTALL_PREFIX}")
|
||||
string(REGEX REPLACE "[/]+$" "" SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG}")
|
||||
set(SDL_PKGCONFIG_PREFIX "\${pcfiledir}/${SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG}")
|
||||
|
@ -93,4 +93,8 @@ find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
|
||||
add_executable(gui-whatever WIN32 main_gui.c)
|
||||
target_link_libraries(gui-whatever PRIVATE SDL3::SDL3)
|
||||
|
||||
if(ANDROID)
|
||||
find_package(SDL3 REQUIRED CONFIG COMPONENTS Jar)
|
||||
endif()
|
||||
|
||||
feature_summary(WHAT ALL)
|
||||
|
@ -10,7 +10,7 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
window = SDL_CreateWindow("Hello SDL", 640, 480, 0);
|
||||
if (window == NULL) {
|
||||
if (!window) {
|
||||
SDL_Log("could not create window: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ def main():
|
||||
|
||||
binary_data = args.input.open("rb").read()
|
||||
|
||||
with args.output.open("w") as fout:
|
||||
with args.output.open("w", newline="\n") as fout:
|
||||
fout.write("unsigned char {}[] = {{\n".format(varname))
|
||||
bytes_written = 0
|
||||
while bytes_written < len(binary_data):
|
||||
|
@ -10,13 +10,13 @@ The rest of this README covers the Android gradle style build process.
|
||||
Requirements
|
||||
================================================================================
|
||||
|
||||
Android SDK (version 31 or later)
|
||||
Android SDK (version 34 or later)
|
||||
https://developer.android.com/sdk/index.html
|
||||
|
||||
Android NDK r15c or later
|
||||
https://developer.android.com/tools/sdk/ndk/index.html
|
||||
|
||||
Minimum API level supported by SDL: 16 (Android 4.1)
|
||||
Minimum API level supported by SDL: 19 (Android 4.4)
|
||||
|
||||
|
||||
How the port works
|
||||
@ -435,13 +435,13 @@ The Tegra Graphics Debugger is available from NVidia here:
|
||||
https://developer.nvidia.com/tegra-graphics-debugger
|
||||
|
||||
|
||||
Why is API level 16 the minimum required?
|
||||
Why is API level 19 the minimum required?
|
||||
================================================================================
|
||||
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 16.
|
||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
||||
about 99% of the Android devices accessing Google Play support API level 16 or
|
||||
higher (January 2018).
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 19.
|
||||
As of this writing, according to https://www.composables.com/tools/distribution-chart
|
||||
about 99.7% of the Android devices accessing Google Play support API level 19 or
|
||||
higher (August 2023).
|
||||
|
||||
|
||||
A note regarding the use of the "dirty rectangles" rendering technique
|
||||
|
@ -1,27 +1,187 @@
|
||||
# Emscripten
|
||||
|
||||
(This documentation is not very robust; we will update and expand this later.)
|
||||
## The state of things
|
||||
|
||||
## A quick note about audio
|
||||
(As of September 2023, but things move quickly and we don't update this
|
||||
document often.)
|
||||
|
||||
In modern times, all the browsers you probably care about (Chrome, Firefox,
|
||||
Edge, and Safari, on Windows, macOS, Linux, iOS and Android), support some
|
||||
reasonable base configurations:
|
||||
|
||||
- WebAssembly (don't bother with asm.js any more)
|
||||
- WebGL (which will look like OpenGL ES 2 or 3 to your app).
|
||||
- Threads (see caveats, though!)
|
||||
- Game controllers
|
||||
- Autoupdating (so you can assume they have a recent version of the browser)
|
||||
|
||||
All this to say we're at the point where you don't have to make a lot of
|
||||
concessions to get even a fairly complex SDL-based game up and running.
|
||||
|
||||
|
||||
## RTFM
|
||||
|
||||
This document is a quick rundown of some high-level details. The
|
||||
documentation at [emscripten.org](https://emscripten.org/) is vast
|
||||
and extremely detailed for a wide variety of topics, and you should at
|
||||
least skim through it at some point.
|
||||
|
||||
|
||||
## Porting your app to Emscripten
|
||||
|
||||
Many many things just need some simple adjustments and they'll compile
|
||||
like any other C/C++ code, as long as SDL was handling the platform-specific
|
||||
work for your program.
|
||||
|
||||
First, you probably need this in at least one of your source files:
|
||||
|
||||
```c
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
```
|
||||
|
||||
Second: assembly language code has to go. Replace it with C. You can even use
|
||||
[x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)!
|
||||
|
||||
Third: Middleware has to go. If you have a third-party library you link
|
||||
against, you either need an Emscripten port of it, or the source code to it
|
||||
to compile yourself, or you need to remove it.
|
||||
|
||||
Fourth: You still start in a function called main(), but you need to get out of
|
||||
it and into a function that gets called repeatedly, and returns quickly,
|
||||
called a mainloop.
|
||||
|
||||
Somewhere in your program, you probably have something that looks like a more
|
||||
complicated version of this:
|
||||
|
||||
```c
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
while (game_is_still_running) {
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
deinitialize_the_game();
|
||||
}
|
||||
```
|
||||
|
||||
This will not work on Emscripten, because the main thread needs to be free
|
||||
to do stuff and can't sit in this loop forever. So Emscripten lets you set up
|
||||
a [mainloop](https://emscripten.org/docs/porting/emscripten-runtime-environment.html#browser-main-loop).
|
||||
|
||||
```c
|
||||
static void mainloop(void) /* this will run often, possibly at the monitor's refresh rate */
|
||||
{
|
||||
if (!game_is_still_running) {
|
||||
deinitialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
||||
#else
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop(mainloop, 0, 1);
|
||||
#else
|
||||
while (1) { mainloop(); }
|
||||
#endif
|
||||
}
|
||||
```
|
||||
|
||||
Basically, `emscripten_set_main_loop(mainloop, 0, 1);` says "run
|
||||
`mainloop` over and over until I end the program." The function will
|
||||
run, and return, freeing the main thread for other tasks, and then
|
||||
run again when it's time. The `1` parameter does some magic to make
|
||||
your main() function end immediately; this is useful because you
|
||||
don't want any shutdown code that might be sitting below this code
|
||||
to actually run if main() were to continue on, since we're just
|
||||
getting started.
|
||||
|
||||
There's a lot of little details that are beyond the scope of this
|
||||
document, but that's the biggest intial set of hurdles to porting
|
||||
your app to the web.
|
||||
|
||||
|
||||
## Do you need threads?
|
||||
|
||||
If you plan to use threads, they work on all major browsers now. HOWEVER,
|
||||
they bring with them a lot of careful considerations. Rendering _must_
|
||||
be done on the main thread. This is a general guideline for many
|
||||
platforms, but a hard requirement on the web.
|
||||
|
||||
Many other things also must happen on the main thread; often times SDL
|
||||
and Emscripten make efforts to "proxy" work to the main thread that
|
||||
must be there, but you have to be careful (and read more detailed
|
||||
documentation than this for the finer points).
|
||||
|
||||
Even when using threads, your main thread needs to set an Emscripten
|
||||
mainloop that runs quickly and returns, or things will fail to work
|
||||
correctly.
|
||||
|
||||
You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html)
|
||||
for all the finer points. Mostly SDL's thread API will work as expected,
|
||||
but is built on pthreads, so it shares the same little incompatibilities
|
||||
that are documented there, such as where you can use a mutex, and when
|
||||
a thread will start running, etc.
|
||||
|
||||
|
||||
IMPORTANT: You have to decide to either build something that uses
|
||||
threads or something that doesn't; you can't have one build
|
||||
that works everywhere. This is an Emscripten (or maybe WebAssembly?
|
||||
Or just web browsers in general?) limitation. If you aren't using
|
||||
threads, it's easier to not enable them at all, at build time.
|
||||
|
||||
If you use threads, you _have to_ run from a web server that has
|
||||
[COOP/COEP headers set correctly](https://web.dev/why-coop-coep/)
|
||||
or your program will fail to start at all.
|
||||
|
||||
If building with threads, `__EMSCRIPTEN_PTHREADS__` will be defined
|
||||
for checking with the C preprocessor, so you can build something
|
||||
different depending on what sort of build you're compiling.
|
||||
|
||||
|
||||
## Audio
|
||||
|
||||
Audio works as expected at the API level, but not exactly like other
|
||||
platforms.
|
||||
|
||||
You'll only see a single default audio device. Audio capture also works;
|
||||
if the browser pops up a prompt to ask for permission to access the
|
||||
microphone, the SDL_OpenAudioDevice call will succeed and start producing
|
||||
silence at a regular interval. Once the user approves the request, real
|
||||
audio data will flow. If the user denies it, the app is not informed and
|
||||
will just continue to receive silence.
|
||||
|
||||
Modern web browsers will not permit web pages to produce sound before the
|
||||
user has interacted with them; this is for several reasons, not the least
|
||||
of which being that no one likes when a random browser tab suddenly starts
|
||||
making noise and the user has to scramble to figure out which and silence
|
||||
it.
|
||||
user has interacted with them (clicked or tapped on them, usually); this is
|
||||
for several reasons, not the least of which being that no one likes when a
|
||||
random browser tab suddenly starts making noise and the user has to scramble
|
||||
to figure out which and silence it.
|
||||
|
||||
To solve this, most browsers will refuse to let a web app use the audio
|
||||
subsystem at all before the user has interacted with (clicked on) the page
|
||||
in a meaningful way. SDL-based apps also have to deal with this problem; if
|
||||
the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
|
||||
SDL will allow you to open the audio device for playback in this
|
||||
circumstance, and your audio callback will fire, but SDL will throw the audio
|
||||
data away until the user interacts with the page. This helps apps that depend
|
||||
on the audio callback to make progress, and also keeps audio playback in sync
|
||||
once the app is finally allowed to make noise.
|
||||
|
||||
There are two reasonable ways to deal with this: if you are writing some
|
||||
sort of media player thing, where the user expects there to be a volume
|
||||
control when you mouseover the canvas, just default that control to a muted
|
||||
state; if the user clicks on the control to unmute it, on this first click,
|
||||
open the audio device. This allows the media to play at start, the user can
|
||||
reasonably opt-in to listening, and you never get access denied to the audio
|
||||
device.
|
||||
There are two reasonable ways to deal with the silence at the app level:
|
||||
if you are writing some sort of media player thing, where the user expects
|
||||
there to be a volume control when you mouseover the canvas, just default
|
||||
that control to a muted state; if the user clicks on the control to unmute
|
||||
it, on this first click, open the audio device. This allows the media to
|
||||
play at start, and the user can reasonably opt-in to listening.
|
||||
|
||||
Many games do not have this sort of UI, and are more rigid about starting
|
||||
audio along with everything else at the start of the process. For these, your
|
||||
@ -36,41 +196,170 @@ Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
||||
for some Javascript code to steal for this approach.
|
||||
|
||||
|
||||
## Rendering
|
||||
|
||||
If you use SDL's 2D render API, it will use GLES2 internally, which
|
||||
Emscripten will turn into WebGL calls. You can also use OpenGL ES 2
|
||||
directly by creating a GL context and drawing into it.
|
||||
|
||||
Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
|
||||
present anything on the screen until your return from your mainloop
|
||||
function.
|
||||
|
||||
|
||||
## Building SDL/emscripten
|
||||
|
||||
First: do you _really_ need to build SDL from source?
|
||||
|
||||
If you aren't developing SDL itself, have a desire to mess with its source
|
||||
code, or need something on the bleeding edge, don't build SDL. Just use
|
||||
Emscripten's packaged version!
|
||||
|
||||
Compile and link your app with `-sUSE_SDL=2` and it'll use a build of
|
||||
SDL packaged with Emscripten. This comes from the same source code and
|
||||
fixes the Emscripten project makes to SDL are generally merged into SDL's
|
||||
revision control, so often this is much easier for app developers.
|
||||
|
||||
`-sUSE_SDL=1` will select Emscripten's JavaScript reimplementation of SDL
|
||||
1.2 instead; if you need SDL 1.2, this might be fine, but we generally
|
||||
recommend you don't use SDL 1.2 in modern times.
|
||||
|
||||
|
||||
If you want to build SDL, though...
|
||||
|
||||
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
|
||||
are likely to work, as well.
|
||||
|
||||
|
||||
Build:
|
||||
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emcmake cmake ..
|
||||
$ emmake make
|
||||
This works on Linux/Unix and macOS. Please send comments about Windows.
|
||||
|
||||
Or with cmake:
|
||||
Make sure you've [installed emsdk](https://emscripten.org/docs/getting_started/downloads.html)
|
||||
first, and run `source emsdk_env.sh` at the command line so it finds the
|
||||
tools.
|
||||
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emcmake cmake ..
|
||||
$ emmake make
|
||||
(These cmake options might be overkill, but this has worked for me.)
|
||||
|
||||
To build one of the tests:
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake ..
|
||||
# you can also do `emcmake cmake -G Ninja ..` and then use `ninja` instead of this command.
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
$ cd test/
|
||||
$ emcc -O2 --js-opts 0 -g4 testdraw.c -I../include ../build/.libs/libSDL3.a ../build/libSDL3_test.a -o a.html
|
||||
If you want to build with thread support, something like this works:
|
||||
|
||||
Uses GLES2 renderer or software
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake -DSDL_THREADS=On ..
|
||||
# you can also do `emcmake cmake -G Ninja ..` and then use `ninja` instead of this command.
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
Some other SDL3 libraries can be easily built (assuming SDL3 is installed somewhere):
|
||||
To build the tests, add `-DSDL_TESTS=On` to the `emcmake cmake` command line.
|
||||
|
||||
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
|
||||
|
||||
$ emcmake cmake ..
|
||||
build as usual...
|
||||
## Building your app
|
||||
|
||||
You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but
|
||||
mostly it uses the same command line arguments as Clang.
|
||||
|
||||
Link against the SDL/build/libSDL3.a file you generated by building SDL,
|
||||
link with `-sUSE_SDL=2` to use Emscripten's prepackaged SDL2 build.
|
||||
|
||||
Usually you would produce a binary like this:
|
||||
|
||||
```bash
|
||||
gcc -o mygame mygame.c # or whatever
|
||||
```
|
||||
|
||||
But for Emscripten, you want to output something else:
|
||||
|
||||
```bash
|
||||
emcc -o index.html mygame.c
|
||||
```
|
||||
|
||||
This will produce several files...support Javascript and WebAssembly (.wasm)
|
||||
files. The `-o index.html` will produce a simple HTML page that loads and
|
||||
runs your app. You will (probably) eventually want to replace or customize
|
||||
that file and do `-o index.js` instead to just build the code pieces.
|
||||
|
||||
If you're working on a program of any serious size, you'll likely need to
|
||||
link with `-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb` to get access
|
||||
to more memory. If using pthreads, you'll need the `-sMAXIMUM_MEMORY=1gb`
|
||||
or the app will fail to start on iOS browsers, but this might be a bug that
|
||||
goes away in the future.
|
||||
|
||||
|
||||
## Data files
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
other options, like "IDBFS" (files are stored in a local database, so they
|
||||
don't need to be in RAM all the time and they can persist between runs of the
|
||||
program, but access is not synchronous). You can mix and match these file
|
||||
systems, mounting a MEMFS filesystem at one place and idbfs elsewhere, etc,
|
||||
but that's beyond the scope of this document. Please refer to Emscripten's
|
||||
[page on the topic](https://emscripten.org/docs/porting/files/file_systems_overview.html)
|
||||
for more info.
|
||||
|
||||
The _easiest_ (but not the best) way to get at your data files is to embed
|
||||
them in the app itself. Emscripten's linker has support for automating this.
|
||||
|
||||
```bash
|
||||
emcc -o index.html loopwave.c --embed-file=../test/sample.wav@/sounds/sample.wav
|
||||
```
|
||||
|
||||
This will pack ../test/sample.wav in your app, and make it available at
|
||||
"/sounds/sample.wav" at runtime. Emscripten makes sure this data is available
|
||||
before your main() function runs, and since it's in MEMFS, you can just
|
||||
read it like you do on other platforms. `--embed-file` can also accept a
|
||||
directory to pack an entire tree, and you can specify the argument multiple
|
||||
times to pack unrelated things into the final installation.
|
||||
|
||||
Note that this is absolutely the best approach if you have a few small
|
||||
files to include and shouldn't worry about the issue further. However, if you
|
||||
have hundreds of megabytes and/or thousands of files, this is not so great,
|
||||
since the user will download it all every time they load your page, and it
|
||||
all has to live in memory at runtime.
|
||||
|
||||
[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
|
||||
gives other options and details, and is worth a read.
|
||||
|
||||
|
||||
## Debugging
|
||||
|
||||
Debugging web apps is a mixed bag. You should compile and link with
|
||||
`-gsource-map`, which embeds a ton of source-level debugging information into
|
||||
the build, and make sure _the app source code is available on the web server_,
|
||||
which is often a scary proposition for various reasons.
|
||||
|
||||
When you debug from the browser's tools and hit a breakpoint, you can step
|
||||
through the actual C/C++ source code, though, which can be nice.
|
||||
|
||||
If you try debugging in Firefox and it doesn't work well for no apparent
|
||||
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
||||
and improving all the time.
|
||||
|
||||
SDL_Log() (or even plain old printf) will write to the Javascript console,
|
||||
and honestly I find printf-style debugging to be easier than setting up a build
|
||||
for proper debugging, so use whatever tools work best for you.
|
||||
|
||||
|
||||
## Questions?
|
||||
|
||||
Please give us feedback on this document at [the SDL bug tracker](https://github.com/libsdl-org/SDL/issues).
|
||||
If something is wrong or unclear, we want to know!
|
||||
|
||||
|
||||
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
||||
|
||||
$ emcmake cmake ..
|
||||
build as usual...
|
||||
|
@ -3,15 +3,16 @@ GDK
|
||||
|
||||
This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
|
||||
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are both supported and all the required code is included in this public SDL release. However, only licensed Xbox developers have access to the GDKX libraries which will allow you to build the Xbox targets.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
|
||||
* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
|
||||
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
|
||||
* Microsoft GDK October 2023 Update 1 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/October_2023_Update_1))
|
||||
* For Xbox, you will need the corresponding GDKX version (licensed developers only)
|
||||
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the test identifiers used by the GDK test programs in the included solution work.
|
||||
|
||||
|
||||
Windows GDK Status
|
||||
@ -29,6 +30,12 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
|
||||
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
|
||||
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
|
||||
|
||||
* Single-player games have some additional features available:
|
||||
* Call `SDL_GDKGetDefaultUser` to get the default XUserHandle pointer.
|
||||
* `SDL_GetPrefPath` still works, but only for single-player titles.
|
||||
|
||||
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
||||
|
||||
* What doesn't work:
|
||||
* Compilation with anything other than through the included Visual C++ solution file
|
||||
|
||||
@ -68,7 +75,7 @@ While the Gaming.Desktop.x64 configuration sets most of the required settings, t
|
||||
* Under Linker > Input > Additional Dependencies, you need the following:
|
||||
* `SDL3.lib`
|
||||
* `xgameruntime.lib`
|
||||
* `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
|
||||
* `../Microsoft.Xbox.Services.GDK.C.Thunks.lib`
|
||||
* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
|
||||
|
||||
### 4. Setting up SDL_main ###
|
||||
@ -80,7 +87,7 @@ Rather than using your own implementation of `WinMain`, it's recommended that yo
|
||||
The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
|
||||
|
||||
* Your SDL3.dll
|
||||
* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
|
||||
* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll"
|
||||
* XCurl.dll
|
||||
|
||||
You can either copy these in a post-build step, or you can add the dlls into the project and set its Configuration Properties > General > Item type to "Copy file," which will also copy them into the output directory.
|
||||
@ -137,6 +144,20 @@ To create the package:
|
||||
6. Once the package is installed, you can run it from the start menu.
|
||||
7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
|
||||
|
||||
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
|
||||
* 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:
|
||||
`makepkg pack /f PackageLayout.xml /lt /d . /pd Package`
|
||||
* To install the package, use:
|
||||
`xbapp install [PACKAGE].xvc`
|
||||
* For some reason, if you make changes that require SDL3.dll to build, and you are running through the debugger (instead of a package), you have to rebuild your .exe target for the debugger to recognize the dll has changed and needs to be transferred to the console again
|
||||
* While there are successful releases of Xbox titles using this port, it is not as extensively tested as other targets
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
@ -125,26 +125,6 @@ SDL for iPhone supports polling the built in accelerometer as a joystick device.
|
||||
The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_GetJoystickAxis() reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_GetJoystickAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.
|
||||
|
||||
|
||||
Notes -- OpenGL ES
|
||||
==============================================================================
|
||||
|
||||
Your SDL application for iOS uses OpenGL ES for video by default.
|
||||
|
||||
OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute().
|
||||
|
||||
If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.
|
||||
|
||||
Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0.
|
||||
|
||||
OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this:
|
||||
|
||||
- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called.
|
||||
- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called.
|
||||
- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called.
|
||||
|
||||
The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
|
||||
|
||||
|
||||
Notes -- Keyboard
|
||||
==============================================================================
|
||||
|
||||
|
194
docs/README-main-functions.md
Normal file
194
docs/README-main-functions.md
Normal file
@ -0,0 +1,194 @@
|
||||
# Where an SDL program starts running.
|
||||
|
||||
## History
|
||||
|
||||
SDL has a long, complicated history with starting a program.
|
||||
|
||||
In most of the civilized world, an application starts in a C-callable
|
||||
function named "main". You probably learned it a long time ago:
|
||||
|
||||
```c
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
But not all platforms work like this. Windows apps might want a different
|
||||
function named "WinMain", for example, so SDL set out to paper over this
|
||||
difference.
|
||||
|
||||
Generally how this would work is: your app would always use the "standard"
|
||||
`main(argc, argv)` function as its entry point, and `#include` the proper
|
||||
SDL header before that, which did some macro magic. On platforms that used
|
||||
a standard `main`, it would do nothing and what you saw was what you got.
|
||||
|
||||
But those other platforms! If they needed something that _wasn't_ `main`,
|
||||
SDL's macro magic would quietly rename your function to `SDL_main`, and
|
||||
provide its own entry point that called it. Your app was none the wiser and
|
||||
your code worked everywhere without changes.
|
||||
|
||||
|
||||
## The main entry point in SDL3
|
||||
|
||||
Previous versions of SDL had a static library, SDLmain, that you would link
|
||||
your app against. SDL3 still has the same macro tricks, but the static library
|
||||
is gone. Now it's supplied by a "single-header library," which means you
|
||||
`#include <SDL3/SDL_main.h>` and that header will insert a small amount of
|
||||
code into the source file that included it, so you no longer have to worry
|
||||
about linking against an extra library that you might need on some platforms.
|
||||
You just build your app and it works.
|
||||
|
||||
You should _only_ include SDL_main.h from one file (the umbrella header,
|
||||
SDL.h, does _not_ include it), and know that it will `#define main` to
|
||||
something else, so if you use this symbol elsewhere as a variable name, etc,
|
||||
it can cause you unexpected problems.
|
||||
|
||||
SDL_main.h will also include platform-specific code (WinMain or whatnot) that
|
||||
calls your _actual_ main function. This is compiled directly into your
|
||||
program.
|
||||
|
||||
If for some reason you need to include SDL_main.h in a file but also _don't_
|
||||
want it to generate this platform-specific code, you should define a special
|
||||
macro before including the header:
|
||||
|
||||
|
||||
```c
|
||||
#define SDL_MAIN_NOIMPL
|
||||
```
|
||||
|
||||
If you are moving from SDL2, remove any references to the SDLmain static
|
||||
library from your build system, and you should be done. Things should work as
|
||||
they always have.
|
||||
|
||||
If you have never controlled your process's entry point (you are using SDL
|
||||
as a module from a general-purpose scripting language interpreter, or you're
|
||||
using SDL in a plugin for some otherwise-unrelated app), then there is nothing
|
||||
required of you here; there is no startup code in SDL's entry point code that
|
||||
is required, so using SDL_main.h is completely optional. Just start using
|
||||
the SDL API when you are ready.
|
||||
|
||||
|
||||
## Main callbacks in SDL3
|
||||
|
||||
There is a second option in SDL3 for how to structure your program. This is
|
||||
completely optional and you can ignore it if you're happy using a standard
|
||||
"main" function.
|
||||
|
||||
Some platforms would rather your program operate in chunks. Most of the time,
|
||||
games tend to look like this at the highest level:
|
||||
|
||||
```c
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
initialize();
|
||||
while (keep_running()) {
|
||||
handle_new_events();
|
||||
do_one_frame_of_stuff();
|
||||
}
|
||||
deinitialize();
|
||||
}
|
||||
```
|
||||
|
||||
There are platforms that would rather be in charge of that `while` loop:
|
||||
iOS would rather you return from main() immediately and then it will let you
|
||||
know that it's time to update and draw the next frame of video. Emscripten
|
||||
(programs that run on a web page) absolutely requires this to function at all.
|
||||
Video targets like Wayland can notify the app when to draw a new frame, to
|
||||
save battery life and cooperate with the compositor more closely.
|
||||
|
||||
In most cases, you can add special-case code to your program to deal with this
|
||||
on different platforms, but SDL3 offers a system to handle this transparently on
|
||||
the app's behalf.
|
||||
|
||||
To use this, you have to redesign the highest level of your app a little. Once
|
||||
you do, it'll work on all supported SDL platforms without problems and
|
||||
`#ifdef`s in your code.
|
||||
|
||||
Instead of providing a "main" function, under this system, you would provide
|
||||
several functions that SDL will call as appropriate.
|
||||
|
||||
Using the callback entry points works on every platform, because on platforms
|
||||
that don't require them, we can fake them with a simple loop in an internal
|
||||
implementation of the usual SDL_main.
|
||||
|
||||
The primary way we expect people to write SDL apps is still with SDL_main, and
|
||||
this is not intended to replace it. If the app chooses to use this, it just
|
||||
removes some platform-specific details they might have to otherwise manage,
|
||||
and maybe removes a barrier to entry on some future platform. And you might
|
||||
find you enjoy structuring your program like this more!
|
||||
|
||||
|
||||
## How to use main callbacks in SDL3
|
||||
|
||||
To enable the callback entry points, you include SDL_main.h with an extra define,
|
||||
from a single source file in your project:
|
||||
|
||||
```c
|
||||
#define SDL_MAIN_USE_CALLBACKS
|
||||
#include <SDL3/SDL_main.h>
|
||||
```
|
||||
|
||||
Once you do this, you do not write a "main" function at all (and if you do,
|
||||
the app will likely fail to link). Instead, you provide the following
|
||||
functions:
|
||||
|
||||
First:
|
||||
|
||||
```c
|
||||
int SDL_AppInit(int argc, char **argv);
|
||||
```
|
||||
|
||||
This will be called _once_ before anything else. argc/argv work like they
|
||||
always do. If this returns 0, the app runs. If it returns < 0, the app calls
|
||||
SDL_AppQuit and terminates with an exit code that reports an error to the
|
||||
platform. If it returns > 0, the app calls SDL_AppQuit and terminates with
|
||||
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.
|
||||
|
||||
Then:
|
||||
|
||||
```c
|
||||
int SDL_AppIterate(void);
|
||||
```
|
||||
|
||||
This is called over and over, possibly at the refresh rate of the display or
|
||||
some other metric that the platform dictates. This is where the heart of your
|
||||
app runs. It should return as quickly as reasonably possible, but it's not a
|
||||
"run one memcpy and that's all the time you have" sort of thing. The app
|
||||
should do any game updates, and render a frame of video. If it returns < 0,
|
||||
SDL will call SDL_AppQuit and terminate the process with an exit code that
|
||||
reports an error to the platform. If it returns > 0, the app calls
|
||||
SDL_AppQuit and terminates with an exit code that reports success to the
|
||||
platform. If it returns 0, then SDL_AppIterate will be called again at some
|
||||
regular frequency. The platform may choose to run this more or less (perhaps
|
||||
less in the background, etc), or it might just call this function in a loop
|
||||
as fast as possible. You do not check the event queue in this function
|
||||
(SDL_AppEvent exists for that).
|
||||
|
||||
Next:
|
||||
|
||||
```c
|
||||
int SDL_AppEvent(const SDL_Event *event);
|
||||
```
|
||||
|
||||
This will be called whenever an SDL event arrives, on the thread that runs
|
||||
SDL_AppIterate. Your app should also not call SDL_PollEvent, SDL_PumpEvent,
|
||||
etc, as SDL will manage all this for you. Return values are the same as from
|
||||
SDL_AppIterate(), so you can terminate in response to SDL_EVENT_QUIT, etc.
|
||||
|
||||
|
||||
Finally:
|
||||
|
||||
```c
|
||||
void SDL_AppQuit(void);
|
||||
```
|
||||
|
||||
This is called once before terminating the app--assuming the app isn't being
|
||||
forcibly killed or crashed--as a last chance to clean up. After this returns,
|
||||
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.
|
||||
|
@ -4,6 +4,8 @@ This guide provides useful information for migrating applications from SDL 2.0 t
|
||||
|
||||
Details on API changes are organized by SDL 2.0 header below.
|
||||
|
||||
The file with your main() function should include <SDL3/SDL_main.h>, as that is no longer included in SDL.h.
|
||||
|
||||
Many functions and symbols have been renamed. We have provided a handy Python script [rename_symbols.py](https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_symbols.py) to rename SDL2 functions to their SDL3 counterparts:
|
||||
```sh
|
||||
rename_symbols.py --all-symbols source_code_path
|
||||
@ -11,14 +13,11 @@ 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:
|
||||
```sh
|
||||
rename_headers.py source_code_path
|
||||
```
|
||||
|
||||
The file with your main() function should also include <SDL3/SDL_main.h>, see below in the SDL_main.h section.
|
||||
|
||||
CMake users should use this snippet to include SDL support in their project:
|
||||
```
|
||||
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
||||
@ -39,10 +38,7 @@ LDFLAGS += $(shell pkg-config sdl3 --libs)
|
||||
|
||||
The SDL3test library has been renamed SDL3_test.
|
||||
|
||||
There is no SDLmain library anymore, it's now header-only, see below in the SDL_main.h section.
|
||||
|
||||
|
||||
begin_code.h and close_code.h in the public headers have been renamed to SDL_begin_code.h and SDL_close_code.h. These aren't meant to be included directly by applications, but if your application did, please update your `#include` lines.
|
||||
The SDLmain library has been removed, it's been entirely replaced by SDL_main.h.
|
||||
|
||||
The vi format comments have been removed from source code. Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim) to automatically set tab spacing for the SDL coding style.
|
||||
|
||||
@ -53,20 +49,20 @@ The following structures have been renamed:
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
The SDL 1.2 audio compatibility API has also been removed, as it was a simplified version of the audio callback interface.
|
||||
|
||||
SDL3 will not implicitly initialize the audio subsystem on your behalf if you open a device without doing so. Please explicitly call SDL_Init(SDL_INIT_AUDIO) at some point.
|
||||
|
||||
If your app depends on the callback method, there is a similar approach you can take. But first, this is the new approach:
|
||||
SDL3's audio subsystem offers an enormous amount of power over SDL2, but if you just want a simple migration of your existing code, you can ignore most of it. The simplest migration path from SDL2 looks something like this:
|
||||
|
||||
In SDL2, you might have done something like this to play audio:
|
||||
In SDL2, you might have done something like this to play audio...
|
||||
|
||||
```c
|
||||
void SDLCALL MyAudioCallback(void *userdata, Uint8 * stream, int len)
|
||||
{
|
||||
/* calculate a little more audio here, maybe using `userdata`, write it to `stream` */
|
||||
/* Calculate a little more audio here, maybe using `userdata`, write it to `stream` */
|
||||
}
|
||||
|
||||
/* ...somewhere near startup... */
|
||||
@ -82,42 +78,52 @@ In SDL2, you might have done something like this to play audio:
|
||||
SDL_PauseAudioDevice(my_audio_device, 0);
|
||||
```
|
||||
|
||||
in SDL3:
|
||||
...in SDL3, you can do this...
|
||||
|
||||
```c
|
||||
void SDLCALL MyNewAudioCallback(void *userdata, SDL_AudioStream *stream, int additional_amount, int total_amount)
|
||||
{
|
||||
/* Calculate a little more audio here, maybe using `userdata`, write it to `stream`
|
||||
*
|
||||
* If you want to use the original callback, you could do something like this:
|
||||
*/
|
||||
if (additional_amount > 0) {
|
||||
Uint8 *data = SDL_stack_alloc(Uint8, additional_amount);
|
||||
if (data) {
|
||||
MyAudioCallback(userdata, data, additional_amount);
|
||||
SDL_PutAudioStreamData(stream, data, additional_amount);
|
||||
SDL_stack_free(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ...somewhere near startup... */
|
||||
const SDL_AudioSpec spec = { SDL_AUDIO_S16, 2, 44100 };
|
||||
SDL_AudioStream *stream = SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec, MyNewAudioCallback, &my_audio_callback_user_data);
|
||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(stream));
|
||||
```
|
||||
|
||||
If you used SDL_QueueAudio instead of a callback in SDL2, this is also straightforward.
|
||||
|
||||
```c
|
||||
/* ...somewhere near startup... */
|
||||
SDL_AudioSpec spec = { SDL_AUDIO_S16, 2, 44100 };
|
||||
SDL_AudioDeviceID my_audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec);
|
||||
SDL_AudioSteam *stream = SDL_CreateAndBindAudioStream(my_audio_device, &spec);
|
||||
const SDL_AudioSpec spec = { SDL_AUDIO_S16, 2, 44100 };
|
||||
SDL_AudioStream *stream = SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec, NULL, NULL);
|
||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(stream));
|
||||
|
||||
/* ...in your main loop... */
|
||||
/* calculate a little more audio into `buf`, add it to `stream` */
|
||||
SDL_PutAudioStreamData(stream, buf, buflen);
|
||||
|
||||
```
|
||||
|
||||
If you absolutely require the callback method, SDL_AudioStreams can use a callback whenever more data is to be read from them, which can be used to simulate SDL2 semantics:
|
||||
|
||||
```c
|
||||
void SDLCALL MyAudioCallback(SDL_AudioStream *stream, int len, void *userdata)
|
||||
{
|
||||
/* calculate a little more audio here, maybe using `userdata`, write it to `stream` */
|
||||
SDL_PutAudioStreamData(stream, newdata, len);
|
||||
}
|
||||
|
||||
/* ...somewhere near startup... */
|
||||
SDL_AudioSpec spec = { SDL_AUDIO_S16, 2, 44100 };
|
||||
SDL_AudioDeviceID my_audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec);
|
||||
SDL_AudioSteam *stream = SDL_CreateAndBindAudioStream(my_audio_device, &spec);
|
||||
SDL_SetAudioStreamGetCallback(stream, MyAudioCallback);
|
||||
|
||||
/* MyAudioCallback will be called whenever the device requests more audio data. */
|
||||
```
|
||||
...these same migration examples apply to audio capture, just using SDL_GetAudioStreamData instead of SDL_PutAudioStreamData.
|
||||
|
||||
SDL_AudioInit() and SDL_AudioQuit() have been removed. Instead you can call SDL_InitSubSystem() and SDL_QuitSubSystem() with SDL_INIT_AUDIO, which will properly refcount the subsystems. You can choose a specific audio driver using SDL_AUDIO_DRIVER hint.
|
||||
|
||||
The `SDL_AUDIO_ALLOW_*` symbols have been removed; now one may request the format they desire from the audio device, but ultimately SDL_AudioStream will manage the difference. One can use SDL_GetAudioDeviceFormat() to see what the final format is, if any "allowed" changes should be accomodated by the app.
|
||||
|
||||
SDL_AudioDeviceID now represents both an open audio device's handle (a "logical" device) and the instance ID that the hardware owns as long as it exists on the system (a "physical" device). The separation between device instances and device indexes is gone.
|
||||
SDL_AudioDeviceID now represents both an open audio device's handle (a "logical" device) and the instance ID that the hardware owns as long as it exists on the system (a "physical" device). The separation between device instances and device indexes is gone, and logical and physical devices are almost entirely interchangeable at the API level.
|
||||
|
||||
Devices are opened by physical device instance ID, and a new logical instance ID is generated by the open operation; This allows any device to be opened multiple times, possibly by unrelated pieces of code. SDL will manage the logical devices to provide a single stream of audio to the physical device behind the scenes.
|
||||
|
||||
@ -125,13 +131,13 @@ Devices are not opened by an arbitrary string name anymore, but by device instan
|
||||
|
||||
Many functions that would accept a device index and an `iscapture` parameter now just take an SDL_AudioDeviceID, as they are unique across all devices, instead of separate indices into output and capture device lists.
|
||||
|
||||
Rather than iterating over audio devices using a device index, there is a new function, SDL_GetAudioDevices(), to get the current list of devices, and new functions to get information about devices from their instance ID:
|
||||
Rather than iterating over audio devices using a device index, there are new functions, SDL_GetAudioOutputDevices() and SDL_GetAudioCaptureDevices(), to get the current list of devices, and new functions to get information about devices from their instance ID:
|
||||
|
||||
```c
|
||||
{
|
||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == 0) {
|
||||
int i, num_devices;
|
||||
SDL_AudioDeviceID *devices = SDL_GetAudioDevices(/*iscapture=*/SDL_FALSE, &num_devices);
|
||||
SDL_AudioDeviceID *devices = SDL_GetAudioOutputDevices(&num_devices);
|
||||
if (devices) {
|
||||
for (i = 0; i < num_devices; ++i) {
|
||||
SDL_AudioDeviceID instance_id = devices[i];
|
||||
@ -152,7 +158,7 @@ SDL_PauseAudioDevice() no longer takes a second argument; it always pauses the d
|
||||
|
||||
Audio devices, opened by SDL_OpenAudioDevice(), no longer start in a paused state, as they don't begin processing audio until a stream is bound.
|
||||
|
||||
SDL_GetAudioDeviceStatus() has been removed; there is now SDL_IsAudioDevicePaused().
|
||||
SDL_GetAudioDeviceStatus() has been removed; there is now SDL_AudioDevicePaused().
|
||||
|
||||
SDL_QueueAudio(), SDL_DequeueAudio, and SDL_ClearQueuedAudio and SDL_GetQueuedAudioSize() have been removed; an SDL_AudioStream bound to a device provides the exact same functionality.
|
||||
|
||||
@ -259,18 +265,18 @@ The following functions have been removed:
|
||||
* SDL_GetQueuedAudioSize()
|
||||
|
||||
The following symbols have been renamed:
|
||||
* AUDIO_F32 => SDL_AUDIO_F32
|
||||
* AUDIO_F32LSB => SDL_AUDIO_F32LSB
|
||||
* AUDIO_F32MSB => SDL_AUDIO_F32MSB
|
||||
* AUDIO_F32SYS => SDL_AUDIO_F32SYS
|
||||
* AUDIO_S16 => SDL_AUDIO_S16
|
||||
* AUDIO_S16LSB => SDL_AUDIO_S16LSB
|
||||
* AUDIO_S16MSB => SDL_AUDIO_S16MSB
|
||||
* AUDIO_S16SYS => SDL_AUDIO_S16SYS
|
||||
* AUDIO_S32 => SDL_AUDIO_S32
|
||||
* AUDIO_S32LSB => SDL_AUDIO_S32LSB
|
||||
* AUDIO_S32MSB => SDL_AUDIO_S32MSB
|
||||
* AUDIO_S32SYS => SDL_AUDIO_S32SYS
|
||||
* AUDIO_F32 => SDL_AUDIO_F32LE
|
||||
* AUDIO_F32LSB => SDL_AUDIO_F32LE
|
||||
* AUDIO_F32MSB => SDL_AUDIO_F32BE
|
||||
* AUDIO_F32SYS => SDL_AUDIO_F32
|
||||
* AUDIO_S16 => SDL_AUDIO_S16LE
|
||||
* AUDIO_S16LSB => SDL_AUDIO_S16LE
|
||||
* AUDIO_S16MSB => SDL_AUDIO_S16BE
|
||||
* AUDIO_S16SYS => SDL_AUDIO_S16
|
||||
* AUDIO_S32 => SDL_AUDIO_S32LE
|
||||
* AUDIO_S32LSB => SDL_AUDIO_S32LE
|
||||
* AUDIO_S32MSB => SDL_AUDIO_S32BE
|
||||
* AUDIO_S32SYS => SDL_AUDIO_S32
|
||||
* AUDIO_S8 => SDL_AUDIO_S8
|
||||
* AUDIO_U8 => SDL_AUDIO_U8
|
||||
|
||||
@ -280,8 +286,15 @@ The intrinsics headers (mmintrin.h, etc.) have been moved to `<SDL3/SDL_intrin.h
|
||||
|
||||
SDL_Has3DNow() has been removed; there is no replacement.
|
||||
|
||||
SDL_HasRDTSC() has been removed; there is no replacement. Don't use the RDTSC opcode in modern times, use SDL_GetPerformanceCounter and SDL_GetPerformanceFrequency instead.
|
||||
|
||||
SDL_SIMDAlloc(), SDL_SIMDRealloc(), and SDL_SIMDFree() have been removed. You can use SDL_aligned_alloc() and SDL_aligned_free() with SDL_SIMDGetAlignment() to get the same functionality.
|
||||
|
||||
## SDL_error.h
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_GetErrorMsg() - Can be implemented as `SDL_strlcpy(errstr, SDL_GetError(), maxlen);`
|
||||
|
||||
## SDL_events.h
|
||||
|
||||
The timestamp member of the SDL_Event structure now represents nanoseconds, and is populated with SDL_GetTicksNS()
|
||||
@ -290,6 +303,8 @@ 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.
|
||||
|
||||
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.
|
||||
|
||||
The SDL_DISPLAYEVENT_* events have been moved to top level events, and SDL_DISPLAYEVENT has been removed. In general, handling this change just means checking for the individual events instead of first checking for SDL_DISPLAYEVENT and then checking for display events. You can compare the event >= SDL_EVENT_DISPLAY_FIRST and <= SDL_EVENT_DISPLAY_LAST if you need to see whether it's a display event.
|
||||
@ -304,6 +319,8 @@ The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor hav
|
||||
|
||||
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.
|
||||
|
||||
The following symbols have been renamed:
|
||||
* SDL_APP_DIDENTERBACKGROUND => SDL_EVENT_DID_ENTER_BACKGROUND
|
||||
* SDL_APP_DIDENTERFOREGROUND => SDL_EVENT_DID_ENTER_FOREGROUND
|
||||
@ -321,6 +338,7 @@ The following symbols have been renamed:
|
||||
* SDL_CONTROLLERDEVICEREMAPPED => SDL_EVENT_GAMEPAD_REMAPPED
|
||||
* SDL_CONTROLLERDEVICEREMOVED => SDL_EVENT_GAMEPAD_REMOVED
|
||||
* SDL_CONTROLLERSENSORUPDATE => SDL_EVENT_GAMEPAD_SENSOR_UPDATE
|
||||
* SDL_CONTROLLERSTEAMHANDLEUPDATED => SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
|
||||
* SDL_CONTROLLERTOUCHPADDOWN => SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN
|
||||
* SDL_CONTROLLERTOUCHPADMOTION => SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION
|
||||
* SDL_CONTROLLERTOUCHPADUP => SDL_EVENT_GAMEPAD_TOUCHPAD_UP
|
||||
@ -378,7 +396,71 @@ The SDL_EVENT_GAMEPAD_ADDED event now provides the joystick instance ID in the w
|
||||
|
||||
The functions SDL_GetGamepads(), SDL_GetGamepadInstanceName(), SDL_GetGamepadInstancePath(), SDL_GetGamepadInstancePlayerIndex(), SDL_GetGamepadInstanceGUID(), SDL_GetGamepadInstanceVendor(), SDL_GetGamepadInstanceProduct(), SDL_GetGamepadInstanceProductVersion(), and SDL_GetGamepadInstanceType() have been added to directly query the list of available gamepads.
|
||||
|
||||
The gamepad binding structure has been removed in favor of exchanging bindings in text format.
|
||||
The gamepad face buttons have been renamed from A/B/X/Y to North/South/East/West to indicate that they are positional rather than hardware-specific. You can use SDL_GetGamepadButtonLabel() to get the labels for the face buttons, e.g. A/B/X/Y or Cross/Circle/Square/Triangle. The hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS is ignored, and mappings that use this hint are translated correctly into positional buttons. Applications should provide a way for users to swap between South/East as their accept/cancel buttons, as this varies based on region and muscle memory. You can use an approach similar to the following to handle this:
|
||||
|
||||
```c
|
||||
#define CONFIRM_BUTTON SDL_GAMEPAD_BUTTON_SOUTH
|
||||
#define CANCEL_BUTTON SDL_GAMEPAD_BUTTON_EAST
|
||||
|
||||
SDL_bool flipped_buttons;
|
||||
|
||||
void InitMappedButtons(SDL_Gamepad *gamepad)
|
||||
{
|
||||
if (!GetFlippedButtonSetting(&flipped_buttons)) {
|
||||
if (SDL_GetGamepadButtonLabel(gamepad, SDL_GAMEPAD_BUTTON_SOUTH) == SDL_GAMEPAD_BUTTON_LABEL_B) {
|
||||
flipped_buttons = SDL_TRUE;
|
||||
} else {
|
||||
flipped_buttons = SDL_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SDL_GamepadButton GetMappedButton(SDL_GamepadButton button)
|
||||
{
|
||||
if (flipped_buttons) {
|
||||
switch (button) {
|
||||
case SDL_GAMEPAD_BUTTON_SOUTH:
|
||||
return SDL_GAMEPAD_BUTTON_EAST;
|
||||
case SDL_GAMEPAD_BUTTON_EAST:
|
||||
return SDL_GAMEPAD_BUTTON_SOUTH;
|
||||
case SDL_GAMEPAD_BUTTON_WEST:
|
||||
return SDL_GAMEPAD_BUTTON_NORTH;
|
||||
case SDL_GAMEPAD_BUTTON_NORTH:
|
||||
return SDL_GAMEPAD_BUTTON_WEST;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return button;
|
||||
}
|
||||
|
||||
SDL_GamepadButtonLabel GetConfirmActionLabel(SDL_Gamepad *gamepad)
|
||||
{
|
||||
return SDL_GetGamepadButtonLabel(gamepad, GetMappedButton(CONFIRM_BUTTON));
|
||||
}
|
||||
|
||||
SDL_GamepadButtonLabel GetCancelActionLabel(SDL_Gamepad *gamepad)
|
||||
{
|
||||
return SDL_GetGamepadButtonLabel(gamepad, GetMappedButton(CANCEL_BUTTON));
|
||||
}
|
||||
|
||||
void HandleGamepadEvent(SDL_Event *event)
|
||||
{
|
||||
if (event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN) {
|
||||
switch (GetMappedButton(event->gbutton.button)) {
|
||||
case CONFIRM_BUTTON:
|
||||
/* Handle confirm action */
|
||||
break;
|
||||
case CANCEL_BUTTON:
|
||||
/* Handle cancel action */
|
||||
break;
|
||||
default:
|
||||
/* ... */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
SDL_GameControllerGetSensorDataWithTimestamp() has been removed. If you want timestamps for the sensor data, you should use the sensor_timestamp member of SDL_EVENT_GAMEPAD_SENSOR_UPDATE events.
|
||||
|
||||
@ -417,7 +499,6 @@ The following enums have been renamed:
|
||||
|
||||
The following structures have been renamed:
|
||||
* SDL_GameController => SDL_Gamepad
|
||||
* SDL_GameControllerButtonBind => SDL_GamepadBinding
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_GameControllerAddMapping() => SDL_AddGamepadMapping()
|
||||
@ -431,8 +512,6 @@ The following functions have been renamed:
|
||||
* SDL_GameControllerGetAttached() => SDL_GamepadConnected()
|
||||
* SDL_GameControllerGetAxis() => SDL_GetGamepadAxis()
|
||||
* SDL_GameControllerGetAxisFromString() => SDL_GetGamepadAxisFromString()
|
||||
* SDL_GameControllerGetBindForAxis() => SDL_GetGamepadBindForAxis()
|
||||
* SDL_GameControllerGetBindForButton() => SDL_GetGamepadBindForButton()
|
||||
* SDL_GameControllerGetButton() => SDL_GetGamepadButton()
|
||||
* SDL_GameControllerGetButtonFromString() => SDL_GetGamepadButtonFromString()
|
||||
* SDL_GameControllerGetFirmwareVersion() => SDL_GetGamepadFirmwareVersion()
|
||||
@ -445,6 +524,7 @@ The following functions have been renamed:
|
||||
* SDL_GameControllerGetSensorData() => SDL_GetGamepadSensorData()
|
||||
* SDL_GameControllerGetSensorDataRate() => SDL_GetGamepadSensorDataRate()
|
||||
* SDL_GameControllerGetSerial() => SDL_GetGamepadSerial()
|
||||
* SDL_GameControllerGetSteamHandle() => SDL_GetGamepadSteamHandle()
|
||||
* SDL_GameControllerGetStringForAxis() => SDL_GetGamepadStringForAxis()
|
||||
* SDL_GameControllerGetStringForButton() => SDL_GetGamepadStringForButton()
|
||||
* SDL_GameControllerGetTouchpadFinger() => SDL_GetGamepadTouchpadFinger()
|
||||
@ -459,9 +539,7 @@ The following functions have been renamed:
|
||||
* SDL_GameControllerIsSensorEnabled() => SDL_GamepadSensorEnabled()
|
||||
* SDL_GameControllerMapping() => SDL_GetGamepadMapping()
|
||||
* SDL_GameControllerMappingForGUID() => SDL_GetGamepadMappingForGUID()
|
||||
* SDL_GameControllerMappingForIndex() => SDL_GetGamepadMappingForIndex()
|
||||
* SDL_GameControllerName() => SDL_GetGamepadName()
|
||||
* SDL_GameControllerNumMappings() => SDL_GetNumGamepadMappings()
|
||||
* SDL_GameControllerOpen() => SDL_OpenGamepad()
|
||||
* SDL_GameControllerPath() => SDL_GetGamepadPath()
|
||||
* SDL_GameControllerRumble() => SDL_RumbleGamepad()
|
||||
@ -475,12 +553,14 @@ The following functions have been renamed:
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_GameControllerEventState() - replaced with SDL_SetGamepadEventsEnabled() and SDL_GamepadEventsEnabled()
|
||||
* SDL_GameControllerGetBindForAxis()
|
||||
* SDL_GameControllerGetBindForButton()
|
||||
* SDL_GameControllerGetBindForAxis() - replaced with SDL_GetGamepadBindings()
|
||||
* SDL_GameControllerGetBindForButton() - replaced with SDL_GetGamepadBindings()
|
||||
* SDL_GameControllerMappingForDeviceIndex() - replaced with SDL_GetGamepadInstanceMapping()
|
||||
* SDL_GameControllerNameForIndex() - replaced with SDL_GetGamepadInstanceName()
|
||||
* 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
|
||||
@ -495,8 +575,8 @@ The following symbols have been renamed:
|
||||
* SDL_CONTROLLER_BINDTYPE_BUTTON => SDL_GAMEPAD_BINDTYPE_BUTTON
|
||||
* SDL_CONTROLLER_BINDTYPE_HAT => SDL_GAMEPAD_BINDTYPE_HAT
|
||||
* SDL_CONTROLLER_BINDTYPE_NONE => SDL_GAMEPAD_BINDTYPE_NONE
|
||||
* SDL_CONTROLLER_BUTTON_A => SDL_GAMEPAD_BUTTON_A
|
||||
* SDL_CONTROLLER_BUTTON_B => SDL_GAMEPAD_BUTTON_B
|
||||
* SDL_CONTROLLER_BUTTON_A => SDL_GAMEPAD_BUTTON_SOUTH
|
||||
* SDL_CONTROLLER_BUTTON_B => SDL_GAMEPAD_BUTTON_EAST
|
||||
* SDL_CONTROLLER_BUTTON_BACK => SDL_GAMEPAD_BUTTON_BACK
|
||||
* SDL_CONTROLLER_BUTTON_DPAD_DOWN => SDL_GAMEPAD_BUTTON_DPAD_DOWN
|
||||
* SDL_CONTROLLER_BUTTON_DPAD_LEFT => SDL_GAMEPAD_BUTTON_DPAD_LEFT
|
||||
@ -516,8 +596,8 @@ The following symbols have been renamed:
|
||||
* SDL_CONTROLLER_BUTTON_RIGHTSTICK => SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
* SDL_CONTROLLER_BUTTON_START => SDL_GAMEPAD_BUTTON_START
|
||||
* SDL_CONTROLLER_BUTTON_TOUCHPAD => SDL_GAMEPAD_BUTTON_TOUCHPAD
|
||||
* SDL_CONTROLLER_BUTTON_X => SDL_GAMEPAD_BUTTON_X
|
||||
* SDL_CONTROLLER_BUTTON_Y => SDL_GAMEPAD_BUTTON_Y
|
||||
* SDL_CONTROLLER_BUTTON_X => SDL_GAMEPAD_BUTTON_WEST
|
||||
* SDL_CONTROLLER_BUTTON_Y => SDL_GAMEPAD_BUTTON_NORTH
|
||||
* SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT => SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT
|
||||
* SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR => SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR
|
||||
* SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT => SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT
|
||||
@ -545,10 +625,16 @@ 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_VIDEO_HIGHDPI_DISABLED - high DPI support is always enabled
|
||||
* SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS - gamepad buttons are always positional
|
||||
* 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_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_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
|
||||
@ -699,27 +785,6 @@ Instead SDL_main.h is now a header-only library **and not included by SDL.h anym
|
||||
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.
|
||||
|
||||
The rest happens automatically: If your target platform needs the SDL_main functionality,
|
||||
your main function will be renamed to SDL_main (with a macro, just like in SDL2),
|
||||
and the real main-function will be implemented by inline code from SDL_main.h - and if your target
|
||||
platform doesn't need it, nothing happens.
|
||||
Like in SDL2, if you want to handle the platform-specific main yourself instead of using the SDL_main magic,
|
||||
you can `#define SDL_MAIN_HANDLED` before `#include <SDL3/SDL_main.h>` - don't forget to call SDL_SetMainReady()
|
||||
|
||||
If you need SDL_main.h in another source file (that doesn't implement main()), you also need to
|
||||
`#define SDL_MAIN_HANDLED` there, to avoid that multiple main functions are generated by SDL_main.h
|
||||
|
||||
There is currently one platform where this approach doesn't always work: WinRT.
|
||||
It requires WinMain to be implemented in a C++ source file that's compiled with `/ZW`. If your main
|
||||
is implemented in plain C, or you can't use `/ZW` on that file, you can add another .cpp
|
||||
source file that just contains `#include <SDL3/SDL_main.h>` and compile that with `/ZW` - but keep
|
||||
in mind that the source file with your standard main also needs that include!
|
||||
See [README-winrt.md](./README-winrt.md) for more details.
|
||||
|
||||
Furthermore, the different SDL_*RunApp() functions (SDL_WinRtRunApp, SDL_GDKRunApp, SDL_UIKitRunApp)
|
||||
have been unified into just `int SDL_RunApp(int argc, char* argv[], void * reserved)` (which is also
|
||||
used by additional platforms that didn't have a SDL_RunApp-like function before).
|
||||
|
||||
## SDL_metal.h
|
||||
|
||||
SDL_Metal_GetDrawableSize() has been removed. SDL_GetWindowSizeInPixels() can be used in its place.
|
||||
@ -735,6 +800,10 @@ The following functions have been renamed:
|
||||
|
||||
## SDL_mutex.h
|
||||
|
||||
SDL_MUTEX_MAXWAIT has been removed; it suggested there was a maximum timeout one could outlive, instead of an infinite wait. Instead, pass a -1 to functions that accepted this symbol.
|
||||
|
||||
SDL_LockMutex and SDL_UnlockMutex now return void; if the mutex is valid (including being a NULL pointer, which returns immediately), these functions never fail. If the mutex is invalid or the caller does something illegal, like unlock another thread's mutex, this is considered undefined behavior.
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_CondBroadcast() => SDL_BroadcastCondition()
|
||||
* SDL_CondSignal() => SDL_SignalCondition()
|
||||
@ -766,7 +835,7 @@ The following functions have been renamed:
|
||||
* SDL_PixelFormatEnumToMasks() => SDL_GetMasksForPixelFormatEnum()
|
||||
|
||||
The following symbols have been renamed:
|
||||
* SDL_DISPLAYEVENT_DISCONNECTED => SDL_EVENT_DISPLAY_DISCONNECTED
|
||||
* SDL_DISPLAYEVENT_DISCONNECTED => SDL_EVENT_DISPLAY_REMOVED
|
||||
* SDL_DISPLAYEVENT_MOVED => SDL_EVENT_DISPLAY_MOVED
|
||||
* SDL_DISPLAYEVENT_ORIENTATION => SDL_EVENT_DISPLAY_ORIENTATION
|
||||
* SDL_WINDOWEVENT_CLOSE => SDL_EVENT_WINDOW_CLOSE_REQUESTED
|
||||
@ -814,6 +883,13 @@ The following functions have been renamed:
|
||||
|
||||
## SDL_render.h
|
||||
|
||||
The 2D renderer API always uses batching in SDL3. There is no magic to turn
|
||||
it on and off; it doesn't matter if you select a specific renderer or try to
|
||||
use any hint. This means that all apps that use SDL3's 2D renderer and also
|
||||
want to call directly into the platform's lower-layer graphics API _must_ call
|
||||
SDL_FlushRenderer() before doing so. This will make sure any pending rendering
|
||||
work from SDL is done before the app starts directly drawing.
|
||||
|
||||
SDL_GetRenderDriverInfo() has been removed, since most of the information it reported were
|
||||
estimates and could not be accurate before creating a renderer. Often times this function
|
||||
was used to figure out the index of a driver, so one would call it in a for-loop, looking
|
||||
@ -863,6 +939,7 @@ The following functions have been renamed:
|
||||
* SDL_RenderDrawRectsF() => SDL_RenderRects()
|
||||
* SDL_RenderFillRectF() => SDL_RenderFillRect()
|
||||
* SDL_RenderFillRectsF() => SDL_RenderFillRects()
|
||||
* SDL_RenderFlush() => SDL_FlushRenderer()
|
||||
* SDL_RenderGetClipRect() => SDL_GetRenderClipRect()
|
||||
* SDL_RenderGetIntegerScale() => SDL_GetRenderIntegerScale()
|
||||
* SDL_RenderGetLogicalSize() => SDL_GetRenderLogicalPresentation()
|
||||
@ -882,9 +959,13 @@ The following functions have been renamed:
|
||||
* SDL_RenderWindowToLogical() => SDL_RenderCoordinatesFromWindow()
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_GL_BindTexture() - use SDL_GetTextureProperties() to get the OpenGL texture ID and bind the texture directly
|
||||
* SDL_GL_UnbindTexture() - use SDL_GetTextureProperties() to get the OpenGL texture ID and unbind the texture directly
|
||||
* SDL_GetTextureUserData() - use SDL_GetTextureProperties() instead
|
||||
* SDL_RenderGetIntegerScale()
|
||||
* SDL_RenderSetIntegerScale() - this is now explicit with SDL_LOGICAL_PRESENTATION_INTEGER_SCALE
|
||||
* SDL_RenderTargetSupported() - render targets are always supported
|
||||
* SDL_SetTextureUserData() - use SDL_GetTextureProperties() instead
|
||||
|
||||
The following symbols have been renamed:
|
||||
* SDL_ScaleModeBest => SDL_SCALEMODE_BEST
|
||||
@ -1085,6 +1166,10 @@ The following functions have been removed:
|
||||
* SDL_SensorGetDeviceType() - replaced with SDL_GetSensorInstanceType()
|
||||
* SDL_UnlockSensors()
|
||||
|
||||
## 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
|
||||
|
||||
## SDL_stdinc.h
|
||||
|
||||
The standard C headers like stdio.h and stdlib.h are no longer included, you should include them directly in your project if you use non-SDL C runtime functions.
|
||||
@ -1096,6 +1181,8 @@ The following functions have been renamed:
|
||||
|
||||
## 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()
|
||||
|
||||
Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat.
|
||||
|
||||
SDL_CreateRGBSurface() and SDL_CreateRGBSurfaceWithFormat() have been combined into a new function SDL_CreateSurface().
|
||||
@ -1137,6 +1224,9 @@ But if you're migrating your code which uses masks, you probably have a format i
|
||||
0x0000F800 0x000007E0 0x0000001F 0x00000000 => SDL_PIXELFORMAT_RGB565
|
||||
```
|
||||
|
||||
SDL_BlitSurfaceScaled() and SDL_BlitSurfaceUncheckedScaled() now take a scale paramater.
|
||||
|
||||
SDL_SoftStretch() now takes a scale paramater.
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_FillRect() => SDL_FillSurfaceRect()
|
||||
@ -1153,22 +1243,93 @@ The following functions have been renamed:
|
||||
* SDL_UpperBlit() => SDL_BlitSurface()
|
||||
* SDL_UpperBlitScaled() => SDL_BlitSurfaceScaled()
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_SoftStretchLinear() - use SDL_SoftStretch() with SDL_SCALEMODE_LINEAR
|
||||
|
||||
## SDL_system.h
|
||||
|
||||
SDL_WindowsMessageHook has changed signatures so the message may be modified and it can block further message processing.
|
||||
|
||||
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.
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_RenderGetD3D11Device() => SDL_GetRenderD3D11Device()
|
||||
* SDL_RenderGetD3D9Device() => SDL_GetRenderD3D9Device()
|
||||
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
|
||||
* SDL_RenderGetD3D9Device() - replaced with the "SDL.renderer.d3d9.device" property
|
||||
|
||||
## SDL_syswm.h
|
||||
|
||||
The structures in this file are versioned separately from the rest of SDL, allowing better backwards compatibility and limited forwards compatibility with your application. Instead of calling `SDL_VERSION(&info.version)` before calling SDL_GetWindowWMInfo(), you pass the version in explicitly as SDL_SYSWM_CURRENT_VERSION so SDL knows what fields you expect to be filled out.
|
||||
This header has been removed.
|
||||
|
||||
### SDL_GetWindowWMInfo
|
||||
The Windows and X11 events are now available via callbacks which you can set with SDL_SetWindowsMessageHook() and SDL_SetX11EventHook().
|
||||
|
||||
This function now returns a standard int result instead of SDL_bool, returning 0 if the function succeeds or a negative error code if there was an error. You should also pass SDL_SYSWM_CURRENT_VERSION as the new third version parameter. The version member of the info structure will be filled in with the version of data that is returned, the minimum of the version you requested and the version supported by the runtime SDL library.
|
||||
The information previously available in SDL_GetWindowWMInfo() is now available as window properties, e.g.
|
||||
```c
|
||||
SDL_SysWMinfo info;
|
||||
SDL_VERSION(&info.version);
|
||||
|
||||
#if defined(__WIN32__)
|
||||
HWND hwnd = NULL;
|
||||
if (SDL_GetWindowWMInfo(window, &info) && info.subsystem == SDL_SYSWM_WINDOWS) {
|
||||
hwnd = info.info.win.window;
|
||||
}
|
||||
if (hwnd) {
|
||||
...
|
||||
}
|
||||
#elif defined(__MACOSX__)
|
||||
NSWindow *nswindow = NULL;
|
||||
if (SDL_GetWindowWMInfo(window, &info) && info.subsystem == SDL_SYSWM_COCOA) {
|
||||
nswindow = (__bridge NSWindow *)info.info.cocoa.window;
|
||||
}
|
||||
if (nswindow) {
|
||||
...
|
||||
}
|
||||
#elif defined(__LINUX__)
|
||||
if (SDL_GetWindowWMInfo(window, &info)) {
|
||||
if (info.subsystem == SDL_SYSWM_X11) {
|
||||
Display *xdisplay = info.info.x11.display;
|
||||
Window xwindow = info.info.x11.window;
|
||||
if (xdisplay && xwindow) {
|
||||
...
|
||||
}
|
||||
} else if (info.subsystem == SDL_SYSWM_WAYLAND) {
|
||||
struct wl_display *display = info.info.wl.display;
|
||||
struct wl_surface *surface = info.info.wl.surface;
|
||||
if (display && surface) {
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
```
|
||||
becomes:
|
||||
```c
|
||||
#if defined(__WIN32__)
|
||||
HWND hwnd = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROPERTY_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);
|
||||
if (nswindow) {
|
||||
...
|
||||
}
|
||||
#elif defined(__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);
|
||||
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);
|
||||
if (display && surface) {
|
||||
...
|
||||
}
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
## SDL_thread.h
|
||||
|
||||
@ -1206,6 +1367,13 @@ If you were using this macro for other things besides SDL ticks values, you can
|
||||
|
||||
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.
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_GetNumTouchDevices() - replaced with SDL_GetTouchDevices()
|
||||
* SDL_GetTouchDevice() - replaced with SDL_GetTouchDevices()
|
||||
|
||||
|
||||
## SDL_version.h
|
||||
|
||||
SDL_GetRevisionNumber() has been removed from the API, it always returned 0 in SDL 2.0.
|
||||
@ -1235,7 +1403,21 @@ 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_CreateWindowWithPosition() if you need to set the window position when creating it.
|
||||
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_SetNumberProperty(props, "flags", flags);
|
||||
pWindow = SDL_CreateWindowWithProperties(props);
|
||||
SDL_DestroyProperties(props);
|
||||
if (window) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
The SDL_WINDOWPOS_UNDEFINED_DISPLAY() and SDL_WINDOWPOS_CENTERED_DISPLAY() macros take a display ID instead of display index. The display ID 0 has a special meaning in this case, and is used to indicate the primary display.
|
||||
|
||||
@ -1302,17 +1484,38 @@ The following functions have been removed:
|
||||
* SDL_GetDisplayMode()
|
||||
* SDL_GetNumDisplayModes() - replaced with SDL_GetFullscreenDisplayModes()
|
||||
* SDL_GetNumVideoDisplays() - replaced with SDL_GetDisplays()
|
||||
* SDL_GetWindowData() - use SDL_GetWindowProperties() instead
|
||||
* SDL_SetWindowData() - use SDL_GetWindowProperties() instead
|
||||
* SDL_CreateWindowFrom() - use SDL_CreateWindowWithProperties() with the properties that allow you to wrap an existing window
|
||||
|
||||
SDL_Window id type is named SDL_WindowID
|
||||
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
|
||||
* SDL_WINDOW_INPUT_GRABBED => SDL_WINDOW_MOUSE_GRABBED
|
||||
|
||||
The following window operations are now considered to be asynchronous requests and should not be assumed to succeed unless
|
||||
a corresponding event has been received:
|
||||
* SDL_SetWindowSize() (SDL_EVENT_WINDOW_RESIZED)
|
||||
* SDL_SetWindowPosition() (SDL_EVENT_WINDOW_MOVED)
|
||||
* SDL_MinimizeWindow() (SDL_EVENT_WINDOW_MINIMIZED)
|
||||
* SDL_MaximizeWindow() (SDL_EVENT_WINDOW_MAXIMIZED)
|
||||
* SDL_RestoreWindow() (SDL_EVENT_WINDOW_RESTORED)
|
||||
* SDL_SetWindowFullscreen() (SDL_EVENT_WINDOW_ENTER_FULLSCREEN / SDL_EVENT_WINDOW_LEAVE_FULLSCREEN)
|
||||
|
||||
If it is required that operations be applied immediately after one of the preceeding calls, the `SDL_SyncWindow()` function
|
||||
will attempt to wait until all pending window operations have completed. Be aware that this function can potentially block for
|
||||
long periods of time, as it may have to wait for window animations to complete. Also note that windowing systems can deny or
|
||||
not precisely obey these requests (e.g. windows may not be allowed to be larger than the usable desktop space or placed
|
||||
offscreen), so a corresponding event may never arrive or not contain the expected values.
|
||||
|
||||
## SDL_vulkan.h
|
||||
|
||||
SDL_Vulkan_GetInstanceExtensions() no longer takes a window parameter.
|
||||
SDL_Vulkan_GetInstanceExtensions() no longer takes a window parameter, and no longer makes the app allocate query/allocate space for the result, instead returning a static const internal string.
|
||||
|
||||
SDL_Vulkan_GetVkGetInstanceProcAddr() now returns `SDL_FunctionPointer` instead of `void *`, and should be cast to PFN_vkGetInstanceProcAddr.
|
||||
|
||||
SDL_Vulkan_CreateSurface() now takes a VkAllocationCallbacks pointer as its third parameter. If you don't have an allocator to supply, pass a NULL here to use the system default allocator (SDL2 always used the system default allocator here).
|
||||
|
||||
SDL_Vulkan_GetDrawableSize() has been removed. SDL_GetWindowSizeInPixels() can be used in its place.
|
||||
|
@ -47,11 +47,12 @@ These structures should _never_ be modified.
|
||||
|
||||
The following functions are included from SDL_touch.h
|
||||
|
||||
To get a SDL_TouchID call SDL_GetTouchDevice(int index).
|
||||
This returns a SDL_TouchID.
|
||||
IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this!
|
||||
Devices are tracked by instance ID, of type SDL_TouchID.
|
||||
|
||||
The number of touch devices can be queried with SDL_GetNumTouchDevices().
|
||||
To get a list of available device SDL_TouchID values, call SDL_GetTouchDevices().
|
||||
This returns an array of device IDs, terminated by a zero ID. Optionally, you can
|
||||
get a count of IDs by passing a non-NULL int* to SDL_GetTouchDevices() if you'd
|
||||
rather not iterate the whole array to get this number.
|
||||
|
||||
A SDL_TouchID may be used to get pointers to SDL_Finger.
|
||||
|
||||
|
@ -34,3 +34,190 @@ encounter limitations or behavior that is different from other windowing systems
|
||||
### Warping the global mouse cursor position via ```SDL_WarpMouseGlobal()``` doesn't work
|
||||
|
||||
- For security reasons, Wayland does not allow warping the global mouse cursor position.
|
||||
|
||||
### The application icon can't be set via ```SDL_SetWindowIcon()```
|
||||
|
||||
- Wayland doesn't support programmatically setting the application icon. To provide a custom icon for your application,
|
||||
you must create an associated desktop entry file, aka a `.desktop` file, that points to the icon image. Please see the
|
||||
[Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/) for more information
|
||||
on the format of this file. Note that if your application manually sets the application ID via the `SDL_APP_ID` hint
|
||||
string, the desktop entry file name should match the application ID. For example, if your application ID is set
|
||||
to `org.my_org.sdl_app`, the desktop entry file should be named `org.my_org.sdl_app.desktop`.
|
||||
|
||||
## Using custom Wayland windowing protocols with SDL windows
|
||||
|
||||
Under normal operation, an `SDL_Window` corresponds to an XDG toplevel window, which provides a standard desktop window.
|
||||
If an application wishes to use a different windowing protocol with an SDL window (e.g. wlr_layer_shell) while still
|
||||
having SDL handle input and rendering, it needs to create a custom, roleless surface and attach that surface to its own
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
attach their own viewports or change the surface scale manually, and the SDL backend will not interfere or change any
|
||||
values internally. In this case, calls to `SDL_SetWindowSize()` should pass the requested surface size in pixels, not
|
||||
the logical window size, as no scaling calculations will be done internally.
|
||||
|
||||
All window functions that control window state aside from `SDL_SetWindowSize()` are no-ops with custom surfaces.
|
||||
|
||||
Please see the minimal example in `tests/testwaylandcustom.c` for an example of how to use a custom, roleless surface
|
||||
and attach it to an application-managed toplevel window.
|
||||
|
||||
## Importing external surfaces into SDL windows
|
||||
|
||||
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
|
||||
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
|
||||
return the user provided value, if one was set while in the uninitialized state, or NULL.
|
||||
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
If the window is flagged as high pixel density, calls to `SDL_SetWindowSize()` should pass the logical size of the
|
||||
window and `SDL_GetWindowSizeInPixels()` should be used to retrieve the backbuffer size in pixels. Otherwise, calls to
|
||||
`SDL_SetWindowSize()` should pass the requested surface size in pixels, not the logical window size, as no scaling
|
||||
calculations will be done internally.
|
||||
|
||||
All window functions that control window state aside from `SDL_SetWindowSize()` are no-ops with external surfaces.
|
||||
|
||||
An example of how to use external surfaces with a `wl_display` owned by SDL can be seen in `tests/testnativewayland.c`,
|
||||
and the following is a minimal example of interoperation with Qt 6, with Qt owning the `wl_display`:
|
||||
|
||||
```c++
|
||||
#include <QApplication>
|
||||
#include <QWindow>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = -1;
|
||||
int done = 0;
|
||||
SDL_PropertiesID props;
|
||||
SDL_Event e;
|
||||
SDL_Window *sdlWindow = NULL;
|
||||
SDL_Renderer *sdlRenderer = NULL;
|
||||
struct wl_display *display = NULL;
|
||||
struct wl_surface *surface = NULL;
|
||||
|
||||
/* Initialize Qt */
|
||||
QApplication qtApp(argc, argv);
|
||||
QWindow qtWindow;
|
||||
|
||||
/* The windowing system must be Wayland. */
|
||||
if (QApplication::platformName() != "wayland") {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
{
|
||||
/* Get the wl_display object from Qt */
|
||||
QNativeInterface::QWaylandApplication *qtWlApp = qtApp.nativeInterface<QNativeInterface::QWaylandApplication>();
|
||||
display = qtWlApp->display();
|
||||
|
||||
if (!display) {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* 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_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
|
||||
|
||||
/* Create a basic, frameless QWindow */
|
||||
qtWindow.setFlags(Qt::FramelessWindowHint);
|
||||
qtWindow.setGeometry(0, 0, 640, 480);
|
||||
qtWindow.show();
|
||||
|
||||
{
|
||||
/* Get the native wl_surface backing resource for the window */
|
||||
QPlatformNativeInterface *qtNative = qtApp.platformNativeInterface();
|
||||
surface = (struct wl_surface *)qtNative->nativeResourceForWindow("surface", &qtWindow);
|
||||
|
||||
if (!surface) {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a window that wraps the wl_surface from the QWindow.
|
||||
* 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);
|
||||
sdlWindow = SDL_CreateWindowWithProperties(props);
|
||||
SDL_DestroyProperties(props);
|
||||
if (!sdlWindow) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Create a renderer */
|
||||
sdlRenderer = SDL_CreateRenderer(sdlWindow, NULL, 0);
|
||||
if (!sdlRenderer) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Draw a blue screen for the window until ESC is pressed or the window is no longer visible. */
|
||||
while (!done) {
|
||||
while (SDL_PollEvent(&e)) {
|
||||
if (e.type == SDL_EVENT_KEY_DOWN && e.key.keysym.sym == SDLK_ESCAPE) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
qtApp.processEvents();
|
||||
|
||||
/* Update the backbuffer size if the window scale changed. */
|
||||
qreal scale = qtWindow.devicePixelRatio();
|
||||
SDL_SetWindowSize(sdlWindow, SDL_lround(640. * scale), SDL_lround(480. * scale));
|
||||
|
||||
if (qtWindow.isVisible()) {
|
||||
SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 255, 255);
|
||||
SDL_RenderClear(sdlRenderer);
|
||||
SDL_RenderPresent(sdlRenderer);
|
||||
} else {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
exit:
|
||||
/* Cleanup */
|
||||
if (sdlRenderer) {
|
||||
SDL_DestroyRenderer(sdlRenderer);
|
||||
}
|
||||
if (sdlWindow) {
|
||||
SDL_DestroyWindow(sdlWindow);
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
return ret;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -56,3 +56,11 @@ it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
|
||||
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
|
||||
use Vulkan graphics in your application.
|
||||
|
||||
## Transparent Window Support
|
||||
|
||||
SDL uses the Desktop Window Manager (DWM) to create transparent windows. DWM is
|
||||
always enabled from Windows 8 and above. Windows 7 only enables DWM with Aero Glass
|
||||
theme.
|
||||
|
||||
However, it cannot be guaranteed to work on all hardware configurations (an example
|
||||
is hybrid GPU systems, such as NVIDIA Optimus laptops).
|
||||
|
@ -63,7 +63,7 @@ Here is a rough list of what works, and what doesn't:
|
||||
* using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can
|
||||
choose to render content directly via Direct3D, using SDL to manage the
|
||||
internal WinRT window, as well as input and audio. (Use
|
||||
SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into
|
||||
the window properties to get the WinRT 'CoreWindow', and pass it into
|
||||
IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.)
|
||||
|
||||
* What partially works:
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -58,16 +58,17 @@
|
||||
#include <SDL3/SDL_misc.h>
|
||||
#include <SDL3/SDL_mouse.h>
|
||||
#include <SDL3/SDL_mutex.h>
|
||||
#include <SDL3/SDL_pen.h>
|
||||
#include <SDL3/SDL_pixels.h>
|
||||
#include <SDL3/SDL_platform.h>
|
||||
#include <SDL3/SDL_power.h>
|
||||
#include <SDL3/SDL_properties.h>
|
||||
#include <SDL3/SDL_quit.h>
|
||||
#include <SDL3/SDL_rect.h>
|
||||
#include <SDL3/SDL_render.h>
|
||||
#include <SDL3/SDL_rwops.h>
|
||||
#include <SDL3/SDL_scancode.h>
|
||||
#include <SDL3/SDL_sensor.h>
|
||||
#include <SDL3/SDL_shape.h>
|
||||
#include <SDL3/SDL_surface.h>
|
||||
#include <SDL3/SDL_system.h>
|
||||
#include <SDL3/SDL_thread.h>
|
||||
@ -75,6 +76,7 @@
|
||||
#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_ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file SDL_assert.h
|
||||
*
|
||||
* \brief Header file for assertion SDL API functions
|
||||
* Header file for assertion SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef SDL_assert_h_
|
||||
@ -64,6 +64,8 @@ assert can have unique static variables associated with it.
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#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... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file SDL_atomic.h
|
||||
*
|
||||
* \brief Atomic operations.
|
||||
* Atomic operations.
|
||||
*
|
||||
* IMPORTANT:
|
||||
* If you are not an expert in concurrent lockless programming, you should
|
||||
@ -213,7 +213,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
@ -263,8 +263,9 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
|
||||
|
||||
/**
|
||||
* \brief A type representing an atomic integer value. It is a struct
|
||||
* so people don't accidentally use numeric operations on it.
|
||||
* A type representing an atomic integer value.
|
||||
*
|
||||
* It is a struct so people don't accidentally use numeric operations on it.
|
||||
*/
|
||||
typedef struct { int value; } SDL_AtomicInt;
|
||||
|
||||
@ -340,14 +341,14 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_AtomicInt *a);
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_AtomicInt *a, int v);
|
||||
|
||||
/**
|
||||
* \brief Increment an atomic variable used as a reference count.
|
||||
* Increment an atomic variable used as a reference count.
|
||||
*/
|
||||
#ifndef SDL_AtomicIncRef
|
||||
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Decrement an atomic variable used as a reference count.
|
||||
* Decrement an atomic variable used as a reference count.
|
||||
*
|
||||
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||
* SDL_FALSE otherwise
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -22,18 +22,19 @@
|
||||
/**
|
||||
* \file SDL_audio.h
|
||||
*
|
||||
* \brief Audio functionality for the SDL library.
|
||||
* Audio functionality for the SDL library.
|
||||
*/
|
||||
|
||||
#ifndef SDL_audio_h_
|
||||
#define SDL_audio_h_
|
||||
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_endian.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_mutex.h>
|
||||
#include <SDL3/SDL_thread.h>
|
||||
#include <SDL3/SDL_properties.h>
|
||||
#include <SDL3/SDL_rwops.h>
|
||||
#include <SDL3/SDL_thread.h>
|
||||
|
||||
#include <SDL3/SDL_begin_code.h>
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -53,7 +54,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Audio format flags.
|
||||
* Audio format flags.
|
||||
*
|
||||
* These are what the 16 bits in SDL_AudioFormat currently mean...
|
||||
* (Unspecified bits are always zero).
|
||||
@ -80,15 +81,16 @@ typedef Uint16 SDL_AudioFormat;
|
||||
/* @{ */
|
||||
|
||||
#define SDL_AUDIO_MASK_BITSIZE (0xFF)
|
||||
#define SDL_AUDIO_MASK_DATATYPE (1<<8)
|
||||
#define SDL_AUDIO_MASK_ENDIAN (1<<12)
|
||||
#define SDL_AUDIO_MASK_FLOAT (1<<8)
|
||||
#define SDL_AUDIO_MASK_BIG_ENDIAN (1<<12)
|
||||
#define SDL_AUDIO_MASK_SIGNED (1<<15)
|
||||
#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
|
||||
#define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
|
||||
#define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
|
||||
#define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
|
||||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
|
||||
#define SDL_AUDIO_BITSIZE(x) ((x) & SDL_AUDIO_MASK_BITSIZE)
|
||||
#define SDL_AUDIO_BYTESIZE(x) (SDL_AUDIO_BITSIZE(x) / 8)
|
||||
#define SDL_AUDIO_ISFLOAT(x) ((x) & SDL_AUDIO_MASK_FLOAT)
|
||||
#define SDL_AUDIO_ISBIGENDIAN(x) ((x) & SDL_AUDIO_MASK_BIG_ENDIAN)
|
||||
#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
|
||||
#define SDL_AUDIO_ISSIGNED(x) ((x) & SDL_AUDIO_MASK_SIGNED)
|
||||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
|
||||
#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
|
||||
|
||||
/**
|
||||
@ -99,27 +101,24 @@ typedef Uint16 SDL_AudioFormat;
|
||||
/* @{ */
|
||||
#define SDL_AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
|
||||
#define SDL_AUDIO_S8 0x8008 /**< Signed 8-bit samples */
|
||||
#define SDL_AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
|
||||
#define SDL_AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16LSB
|
||||
#define SDL_AUDIO_S16LE 0x8010 /**< Signed 16-bit samples */
|
||||
#define SDL_AUDIO_S16BE 0x9010 /**< As above, but big-endian byte order */
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name int32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
|
||||
#define SDL_AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32LSB
|
||||
#define SDL_AUDIO_S32LE 0x8020 /**< 32-bit integer samples */
|
||||
#define SDL_AUDIO_S32BE 0x9020 /**< As above, but big-endian byte order */
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name float32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
|
||||
#define SDL_AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32LSB
|
||||
#define SDL_AUDIO_F32LE 0x8120 /**< 32-bit floating point samples */
|
||||
#define SDL_AUDIO_F32BE 0x9120 /**< As above, but big-endian byte order */
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
@ -127,13 +126,13 @@ typedef Uint16 SDL_AudioFormat;
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_AUDIO_S16SYS SDL_AUDIO_S16LSB
|
||||
#define SDL_AUDIO_S32SYS SDL_AUDIO_S32LSB
|
||||
#define SDL_AUDIO_F32SYS SDL_AUDIO_F32LSB
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16LE
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32LE
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32LE
|
||||
#else
|
||||
#define SDL_AUDIO_S16SYS SDL_AUDIO_S16MSB
|
||||
#define SDL_AUDIO_S32SYS SDL_AUDIO_S32MSB
|
||||
#define SDL_AUDIO_F32SYS SDL_AUDIO_F32MSB
|
||||
#define SDL_AUDIO_S16 SDL_AUDIO_S16BE
|
||||
#define SDL_AUDIO_S32 SDL_AUDIO_S32BE
|
||||
#define SDL_AUDIO_F32 SDL_AUDIO_F32BE
|
||||
#endif
|
||||
/* @} */
|
||||
|
||||
@ -154,6 +153,9 @@ typedef struct SDL_AudioSpec
|
||||
int freq; /**< sample rate: sample frames per second */
|
||||
} SDL_AudioSpec;
|
||||
|
||||
/* Calculate the size of each audio frame (in bytes) */
|
||||
#define SDL_AUDIO_FRAMESIZE(x) (SDL_AUDIO_BYTESIZE((x).format) * (x).channels)
|
||||
|
||||
/* SDL_AudioStream is an audio conversion interface.
|
||||
- It can handle resampling data in chunks without generating
|
||||
artifacts, when it doesn't have the complete buffer available.
|
||||
@ -308,7 +310,8 @@ extern DECLSPEC SDL_AudioDeviceID *SDLCALL SDL_GetAudioCaptureDevices(int *count
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDevices
|
||||
* \sa SDL_GetAudioOutputDevices
|
||||
* \sa SDL_GetAudioCaptureDevices
|
||||
* \sa SDL_GetDefaultAudioInfo
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
||||
@ -325,8 +328,20 @@ extern DECLSPEC char *SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
||||
* reasonable recommendation before opening the system-recommended default
|
||||
* device.
|
||||
*
|
||||
* You can also use this to request the current device buffer size. This is
|
||||
* specified in sample frames and represents the amount of data SDL will feed
|
||||
* to the physical hardware in each chunk. This can be converted to
|
||||
* milliseconds of audio with the following equation:
|
||||
*
|
||||
* `ms = (int) ((((Sint64) frames) * 1000) / spec.freq);`
|
||||
*
|
||||
* Buffer size is only important if you need low-level control over the audio
|
||||
* playback timing. Most apps do not need this.
|
||||
*
|
||||
* \param devid the instance ID of the device to query.
|
||||
* \param spec On return, will be filled with device details.
|
||||
* \param sample_frames Pointer to store device buffer size, in sample frames.
|
||||
* Can be NULL.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
@ -334,7 +349,7 @@ extern DECLSPEC char *SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec);
|
||||
extern DECLSPEC int SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames);
|
||||
|
||||
|
||||
/**
|
||||
@ -348,9 +363,9 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SD
|
||||
* An opened audio device starts out with no audio streams bound. To start
|
||||
* audio playing, bind a stream and supply audio data to it. Unlike SDL2,
|
||||
* there is no audio callback; you only bind audio streams and make sure they
|
||||
* have data flowing into them (although, as an optional feature, each audio
|
||||
* stream may have its own callback, which can be used to simulate SDL2's
|
||||
* semantics).
|
||||
* have data flowing into them (however, you can simulate SDL2's semantics
|
||||
* fairly closely by using SDL_OpenAudioDeviceStream instead of this
|
||||
* function).
|
||||
*
|
||||
* If you don't care about opening a specific device, pass a `devid` of either
|
||||
* `SDL_AUDIO_DEVICE_DEFAULT_OUTPUT` or `SDL_AUDIO_DEVICE_DEFAULT_CAPTURE`. In
|
||||
@ -439,7 +454,7 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDeviceID
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
* \sa SDL_IsAudioDevicePaused
|
||||
* \sa SDL_AudioDevicePaused
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
@ -466,8 +481,8 @@ extern DECLSPEC int SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
* \sa SDL_IsAudioDevicePaused
|
||||
* \sa SDL_AudioDevicePaused
|
||||
* \sa SDL_PauseAudioDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
@ -490,9 +505,8 @@ extern DECLSPEC int SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||
*
|
||||
* \sa SDL_PauseAudioDevice
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
* \sa SDL_IsAudioDevicePaused
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsAudioDevicePaused(SDL_AudioDeviceID dev);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
|
||||
|
||||
/**
|
||||
* Close a previously-opened audio device.
|
||||
@ -549,7 +563,7 @@ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStreams
|
||||
* \sa SDL_UnbindAudioStream
|
||||
* \sa SDL_GetAudioStreamBinding
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream **streams, int num_streams);
|
||||
|
||||
@ -571,7 +585,7 @@ extern DECLSPEC int SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_Au
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStreams
|
||||
* \sa SDL_UnbindAudioStream
|
||||
* \sa SDL_GetAudioStreamBinding
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream *stream);
|
||||
|
||||
@ -595,7 +609,7 @@ extern DECLSPEC int SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_Aud
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_BindAudioStream
|
||||
* \sa SDL_UnbindAudioStream
|
||||
* \sa SDL_GetAudioStreamBinding
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream **streams, int num_streams);
|
||||
|
||||
@ -614,7 +628,7 @@ extern DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream **streams, i
|
||||
* \sa SDL_BindAudioStream
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStreams
|
||||
* \sa SDL_GetAudioStreamBinding
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
@ -638,7 +652,7 @@ extern DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
|
||||
* \sa SDL_UnbindAudioStream
|
||||
* \sa SDL_UnbindAudioStreams
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamBinding(SDL_AudioStream *stream);
|
||||
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
/**
|
||||
@ -646,7 +660,7 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamBinding(SDL_AudioStr
|
||||
*
|
||||
* \param src_spec The format details of the input audio
|
||||
* \param dst_spec The format details of the output audio
|
||||
* \returns 0 on success, or -1 on error.
|
||||
* \returns a new audio stream on success, or NULL on failure.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
@ -662,6 +676,19 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamBinding(SDL_AudioStr
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAudioStream(const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);
|
||||
|
||||
/**
|
||||
* Get the properties associated with an audio stream.
|
||||
*
|
||||
* \param stream the SDL_AudioStream to query
|
||||
* \returns a valid property ID on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Query the current format of an audio stream.
|
||||
@ -703,11 +730,54 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *stream,
|
||||
* \sa SDL_PutAudioStreamData
|
||||
* \sa SDL_GetAudioStreamData
|
||||
* \sa SDL_GetAudioStreamAvailable
|
||||
* \sa SDL_SetAudioStreamFrequencyRatio
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *stream,
|
||||
const SDL_AudioSpec *src_spec,
|
||||
const SDL_AudioSpec *dst_spec);
|
||||
|
||||
/**
|
||||
* Get the frequency ratio of an audio stream.
|
||||
*
|
||||
* \param stream the SDL_AudioStream to query.
|
||||
* \returns the frequency ratio of the stream, or 0.0 on error
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_SetAudioStreamFrequencyRatio
|
||||
*/
|
||||
extern DECLSPEC float SDLCALL SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Change the frequency ratio of an audio stream.
|
||||
*
|
||||
* The frequency ratio is used to adjust the rate at which input data is
|
||||
* consumed. Changing this effectively modifies the speed and pitch of the
|
||||
* audio. A value greater than 1.0 will play the audio faster, and at a higher
|
||||
* pitch. A value less than 1.0 will play the audio slower, and at a lower
|
||||
* pitch.
|
||||
*
|
||||
* This is applied during SDL_GetAudioStreamData, and can be continuously
|
||||
* changed to create various effects.
|
||||
*
|
||||
* \param stream The stream the frequency ratio is being changed
|
||||
* \param ratio The frequency ratio. 1.0 is normal speed. Must be between 0.01
|
||||
* and 100.
|
||||
* \returns 0 on success, or -1 on error.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread, as it holds
|
||||
* a stream-specific mutex while running.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStreamFrequencyRatio
|
||||
* \sa SDL_SetAudioStreamFormat
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *stream, float ratio);
|
||||
|
||||
/**
|
||||
* Add data to be converted/resampled to the stream.
|
||||
*
|
||||
@ -802,6 +872,40 @@ extern DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream, void
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of bytes currently queued.
|
||||
*
|
||||
* Note that audio streams can change their input format at any time, even if
|
||||
* there is still data queued in a different format, so the returned byte
|
||||
* count will not necessarily match the number of _sample frames_ available.
|
||||
* Users of this API should be aware of format changes they make when feeding
|
||||
* a stream and plan accordingly.
|
||||
*
|
||||
* Queued data is not converted until it is consumed by
|
||||
* SDL_GetAudioStreamData, so this value should be representative of the exact
|
||||
* data that was put into the stream.
|
||||
*
|
||||
* If the stream has so much data that it would overflow an int, the return
|
||||
* value is clamped to a maximum value, but no queued data is lost; if there
|
||||
* are gigabytes of data queued, the app might need to read some of it with
|
||||
* SDL_GetAudioStreamData before this function's return value is no longer
|
||||
* clamped.
|
||||
*
|
||||
* \param stream The audio stream to query
|
||||
* \returns the number of bytes queued.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \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);
|
||||
|
||||
|
||||
/**
|
||||
* Tell the stream that you're done sending data, and anything being buffered
|
||||
* should be converted/resampled and made available immediately.
|
||||
@ -909,13 +1013,22 @@ extern DECLSPEC int SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
|
||||
* before your callback is called, so your callback does not need to
|
||||
* manage the lock explicitly.
|
||||
*
|
||||
* Two values are offered here: one is the amount of additional data needed
|
||||
* to satisfy the immediate request (which might be zero if the stream
|
||||
* already has enough data queued) and the other is the total amount
|
||||
* being requested. In a Get call triggering a Put callback, these
|
||||
* values can be different. In a Put call triggering a Get callback,
|
||||
* these values are always the same.
|
||||
*
|
||||
* Byte counts might be slightly overestimated due to buffering or
|
||||
* resampling, and may change from call to call.
|
||||
*
|
||||
* \param stream The SDL audio stream associated with this callback.
|
||||
* \param approx_request The _approximate_ amout of data, in bytes, that is requested.
|
||||
* This might be slightly overestimated due to buffering or
|
||||
* resampling, and may change from call to call anyhow.
|
||||
* \param additional_amount The amount of data, in bytes, that is needed right now.
|
||||
* \param total_amount The total amount of data requested, in bytes, that is requested or available.
|
||||
* \param userdata An opaque pointer provided by the app for their personal use.
|
||||
*/
|
||||
typedef void (SDLCALL *SDL_AudioStreamRequestCallback)(SDL_AudioStream *stream, int approx_request, void *userdata);
|
||||
typedef void (SDLCALL *SDL_AudioStreamCallback)(void *userdata, SDL_AudioStream *stream, int additional_amount, int total_amount);
|
||||
|
||||
/**
|
||||
* Set a callback that runs when data is requested from an audio stream.
|
||||
@ -960,7 +1073,7 @@ typedef void (SDLCALL *SDL_AudioStreamRequestCallback)(SDL_AudioStream *stream,
|
||||
*
|
||||
* \sa SDL_SetAudioStreamPutCallback
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *stream, SDL_AudioStreamRequestCallback callback, void *userdata);
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);
|
||||
|
||||
/**
|
||||
* Set a callback that runs when data is added to an audio stream.
|
||||
@ -1008,7 +1121,7 @@ extern DECLSPEC int SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *strea
|
||||
*
|
||||
* \sa SDL_SetAudioStreamGetCallback
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream *stream, SDL_AudioStreamRequestCallback callback, void *userdata);
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);
|
||||
|
||||
|
||||
/**
|
||||
@ -1031,32 +1144,125 @@ extern DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
/**
|
||||
* Convenience function to create and bind an audio stream in one step.
|
||||
* Convenience function for straightforward audio init for the common case.
|
||||
*
|
||||
* This manages the creation of an audio stream, and setting its format
|
||||
* correctly to match both the app and the audio device's needs. This is
|
||||
* optional, but slightly less cumbersome to set up for a common use case.
|
||||
* If all your app intends to do is provide a single source of PCM audio, this
|
||||
* function allows you to do all your audio setup in a single call.
|
||||
*
|
||||
* This is intended to be a clean means to migrate apps from SDL2.
|
||||
*
|
||||
* This function will open an audio device, create a stream and bind it.
|
||||
* Unlike other methods of setup, the audio device will be closed when this
|
||||
* stream is destroyed, so the app can treat the returned SDL_AudioStream as
|
||||
* the only object needed to manage audio playback.
|
||||
*
|
||||
* Also unlike other functions, the audio device begins paused. This is to map
|
||||
* more closely to SDL2-style behavior, and since there is no extra step here
|
||||
* to bind a stream to begin audio flowing. The audio device should be resumed
|
||||
* with SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(stream));
|
||||
*
|
||||
* This function works with both playback and capture devices.
|
||||
*
|
||||
* The `spec` parameter represents the app's side of the audio stream. That
|
||||
* is, for recording audio, this will be the output format, and for playing
|
||||
* audio, this will be the input format. This function will set the other side
|
||||
* of the audio stream to the device's format.
|
||||
* audio, this will be the input format.
|
||||
*
|
||||
* \param devid an audio device to bind a stream to. This must be an opened
|
||||
* device, and can not be zero.
|
||||
* \param spec the audio stream's input format
|
||||
* \returns a bound audio stream on success, ready to use. NULL on error; call
|
||||
* SDL_GetError() for more information.
|
||||
* If you don't care about opening a specific audio device, you can (and
|
||||
* probably _should_), use SDL_AUDIO_DEVICE_DEFAULT_OUTPUT for playback and
|
||||
* SDL_AUDIO_DEVICE_DEFAULT_CAPTURE for recording.
|
||||
*
|
||||
* One can optionally provide a callback function; if NULL, the app is
|
||||
* expected to queue audio data for playback (or unqueue audio data if
|
||||
* capturing). Otherwise, the callback will begin to fire once the device is
|
||||
* unpaused.
|
||||
*
|
||||
* \param devid an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_OUTPUT or
|
||||
* SDL_AUDIO_DEVICE_DEFAULT_CAPTURE.
|
||||
* \param spec the audio stream's data format. Required.
|
||||
* \param callback A callback where the app will provide new data for
|
||||
* playback, or receive new data for capture. Can be NULL, in
|
||||
* which case the app will need to call SDL_PutAudioStreamData
|
||||
* or SDL_GetAudioStreamData as necessary.
|
||||
* \param userdata App-controlled pointer passed to callback. Can be NULL.
|
||||
* Ignored if callback is NULL.
|
||||
* \returns an audio stream on success, ready to use. NULL on error; call
|
||||
* SDL_GetError() for more information. When done with this stream,
|
||||
* call SDL_DestroyAudioStream to free resources and close the
|
||||
* device.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_BindAudioStreams
|
||||
* \sa SDL_UnbindAudioStreams
|
||||
* \sa SDL_UnbindAudioStream
|
||||
* \sa SDL_GetAudioStreamDevice
|
||||
* \sa SDL_ResumeAudioDevice
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAndBindAudioStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec);
|
||||
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec, SDL_AudioStreamCallback callback, void *userdata);
|
||||
|
||||
|
||||
/**
|
||||
* A callback that fires when data is about to be fed to an audio device.
|
||||
*
|
||||
* This is useful for accessing the final mix, perhaps for writing a
|
||||
* visualizer or applying a final effect to the audio data before playback.
|
||||
*
|
||||
* \sa SDL_SetAudioDevicePostmixCallback
|
||||
*/
|
||||
typedef void (SDLCALL *SDL_AudioPostmixCallback)(void *userdata, const SDL_AudioSpec *spec, float *buffer, int buflen);
|
||||
|
||||
/**
|
||||
* Set a callback that fires when data is about to be fed to an audio device.
|
||||
*
|
||||
* This is useful for accessing the final mix, perhaps for writing a
|
||||
* visualizer or applying a final effect to the audio data before playback.
|
||||
*
|
||||
* The buffer is the final mix of all bound audio streams on an opened device;
|
||||
* this callback will fire regularly for any device that is both opened and
|
||||
* unpaused. If there is no new data to mix, either because no streams are
|
||||
* bound to the device or all the streams are empty, this callback will still
|
||||
* fire with the entire buffer set to silence.
|
||||
*
|
||||
* This callback is allowed to make changes to the data; the contents of the
|
||||
* buffer after this call is what is ultimately passed along to the hardware.
|
||||
*
|
||||
* The callback is always provided the data in float format (values from -1.0f
|
||||
* to 1.0f), but the number of channels or sample rate may be different than
|
||||
* the format the app requested when opening the device; SDL might have had to
|
||||
* manage a conversion behind the scenes, or the playback might have jumped to
|
||||
* new physical hardware when a system default changed, etc. These details may
|
||||
* change between calls. Accordingly, the size of the buffer might change
|
||||
* between calls as well.
|
||||
*
|
||||
* This callback can run at any time, and from any thread; if you need to
|
||||
* serialize access to your app's data, you should provide and use a mutex or
|
||||
* other synchronization device.
|
||||
*
|
||||
* All of this to say: there are specific needs this callback can fulfill, but
|
||||
* it is not the simplest interface. Apps should generally provide audio in
|
||||
* their preferred format through an SDL_AudioStream and let SDL handle the
|
||||
* difference.
|
||||
*
|
||||
* This function is extremely time-sensitive; the callback should do the least
|
||||
* amount of work possible and return as quickly as it can. The longer the
|
||||
* callback runs, the higher the risk of audio dropouts or other problems.
|
||||
*
|
||||
* This function will block until the audio device is in between iterations,
|
||||
* so any existing callback that might be running will finish before this
|
||||
* function sets the new callback and returns.
|
||||
*
|
||||
* Setting a NULL callback function disables any previously-set callback.
|
||||
*
|
||||
* \param devid The ID of an opened audio device.
|
||||
* \param callback A callback function to be called. Can be NULL.
|
||||
* \param userdata App-controlled pointer passed to callback. Can be NULL.
|
||||
* \returns zero on success, -1 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.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata);
|
||||
|
||||
|
||||
/**
|
||||
@ -1075,8 +1281,7 @@ extern DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAndBindAudioStream(SDL_AudioD
|
||||
* audio data allocated by the function is written to `audio_buf` and its
|
||||
* length in bytes to `audio_len`. The SDL_AudioSpec members `freq`,
|
||||
* `channels`, and `format` are set to the values of the audio data in the
|
||||
* buffer. The `samples` member is set to a sane default and all others are
|
||||
* set to zero.
|
||||
* buffer.
|
||||
*
|
||||
* It's necessary to use SDL_free() to free the audio data returned in
|
||||
* `audio_buf` when it is no longer used.
|
||||
@ -1222,9 +1427,9 @@ extern DECLSPEC int SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec * spec,
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
|
||||
/**
|
||||
* Convert some audio data of one format to another format.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file SDL_bits.h
|
||||
*
|
||||
* \brief Functions for fiddling with bits and bitmasks.
|
||||
* Functions for fiddling with bits and bitmasks.
|
||||
*/
|
||||
|
||||
#ifndef SDL_bits_h_
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user