mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-22 08:41:08 +01:00
Compare commits
172 Commits
release-2.
...
SDL2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
738b1e4f47 | ||
|
|
e107aece34 | ||
|
|
e0307aa05e | ||
|
|
a7d4b1996f | ||
|
|
1e1e982ae7 | ||
|
|
e7e24a1ee5 | ||
|
|
3c28e8ecc0 | ||
|
|
650aceb609 | ||
|
|
22a6d76f22 | ||
|
|
99ecc409cf | ||
|
|
cf5dabd6ea | ||
|
|
c080cc8068 | ||
|
|
2956d55797 | ||
|
|
b1d95b9d20 | ||
|
|
649c36c576 | ||
|
|
99eca2ca0d | ||
|
|
07274fea58 | ||
|
|
0c7042477a | ||
|
|
f383330cfa | ||
|
|
de41387c4b | ||
|
|
01dff47fd7 | ||
|
|
cb0fb8c1a1 | ||
|
|
1dda484085 | ||
|
|
e14514f484 | ||
|
|
f432937f9c | ||
|
|
c795b08567 | ||
|
|
13db7f049a | ||
|
|
3eba0b6f8a | ||
|
|
bacfd3c252 | ||
|
|
47312cf0f3 | ||
|
|
d9836d15e7 | ||
|
|
3146374e4a | ||
|
|
1d852d1c28 | ||
|
|
6ad5a966ea | ||
|
|
a65111bd2d | ||
|
|
c44d37b5cf | ||
|
|
f36d683b61 | ||
|
|
5bdf7bc625 | ||
|
|
38e0094637 | ||
|
|
ba38fda752 | ||
|
|
14eebdab3c | ||
|
|
686c18026b | ||
|
|
6db23faa44 | ||
|
|
6570d9e23f | ||
|
|
2bb0eb4641 | ||
|
|
afeeef9cf5 | ||
|
|
398bacbac3 | ||
|
|
f9435eab16 | ||
|
|
66ac6f4ea7 | ||
|
|
4151df83fe | ||
|
|
00d4f1c2c4 | ||
|
|
1c19bee000 | ||
|
|
639c7a1e52 | ||
|
|
c9889fb013 | ||
|
|
1edb3283b0 | ||
|
|
3e1cebed3c | ||
|
|
66d87bf0e1 | ||
|
|
235e4870af | ||
|
|
8ef0a07a52 | ||
|
|
26d1eadda3 | ||
|
|
39a0fab4d7 | ||
|
|
67141e5079 | ||
|
|
641201a99a | ||
|
|
7b28fb29bd | ||
|
|
ecb72142fd | ||
|
|
9859c05178 | ||
|
|
07c3b3fb7c | ||
|
|
9343246616 | ||
|
|
b55059b487 | ||
|
|
55b599d693 | ||
|
|
2eb5bff91a | ||
|
|
be6ab7f9a6 | ||
|
|
eb974470ec | ||
|
|
f0e7000f92 | ||
|
|
d2ab01b8bb | ||
|
|
f5246d0181 | ||
|
|
b8c802632b | ||
|
|
1725d6b049 | ||
|
|
5ed21d1ccb | ||
|
|
7a34e14c8e | ||
|
|
1a8e667f3d | ||
|
|
d31d98d436 | ||
|
|
56d43ee296 | ||
|
|
1f21aae242 | ||
|
|
5e85a29e75 | ||
|
|
f201b64ffe | ||
|
|
4f9723ece7 | ||
|
|
53dbe1862e | ||
|
|
e7489a0931 | ||
|
|
4b2aa3f102 | ||
|
|
272b073323 | ||
|
|
d310b5679f | ||
|
|
afc1d9122b | ||
|
|
af2279b286 | ||
|
|
059af5265a | ||
|
|
e610529e84 | ||
|
|
74df61530f | ||
|
|
3c36718348 | ||
|
|
b36252b120 | ||
|
|
ead4a032d3 | ||
|
|
cf1eb95fb1 | ||
|
|
34691de22b | ||
|
|
874ca5a678 | ||
|
|
8d5984464e | ||
|
|
2a6baf50e9 | ||
|
|
6c9c2a9ac2 | ||
|
|
8605624158 | ||
|
|
b537380065 | ||
|
|
b2c3e6fade | ||
|
|
309d1481a4 | ||
|
|
2fb6abb9ad | ||
|
|
cd0cf8b855 | ||
|
|
2bc3ec44b1 | ||
|
|
e4475d1868 | ||
|
|
6a71328638 | ||
|
|
6701f938f7 | ||
|
|
1c09a7117a | ||
|
|
9eb50a906a | ||
|
|
027d46f03a | ||
|
|
3416296366 | ||
|
|
01c3ccd541 | ||
|
|
3c08172d06 | ||
|
|
d0c2d8bc40 | ||
|
|
33eb167da8 | ||
|
|
4b4f6b3e22 | ||
|
|
2163887f29 | ||
|
|
c0f78dee5e | ||
|
|
17e6208c1b | ||
|
|
157f894d5d | ||
|
|
a220e7c422 | ||
|
|
2442c85cb8 | ||
|
|
5b951141d2 | ||
|
|
15fd3fcdc2 | ||
|
|
45b01d16b1 | ||
|
|
433810c58d | ||
|
|
916ddb1ef8 | ||
|
|
1c75cb4f8a | ||
|
|
26e946ef08 | ||
|
|
035518d065 | ||
|
|
40b1eac541 | ||
|
|
bfab0a968f | ||
|
|
f0a8e09f7c | ||
|
|
2e4c12cd2c | ||
|
|
3e47181800 | ||
|
|
8436ce98b4 | ||
|
|
a8f0eb4c33 | ||
|
|
069eb012aa | ||
|
|
7d8a6f1603 | ||
|
|
d63b3376a4 | ||
|
|
52146cf067 | ||
|
|
46a51b4298 | ||
|
|
4f488b9be2 | ||
|
|
f48a96a976 | ||
|
|
39bb71c442 | ||
|
|
177fb9cb6c | ||
|
|
fc536dcb7e | ||
|
|
1caae3e9e4 | ||
|
|
22a87a22ca | ||
|
|
6be87ceb33 | ||
|
|
ab44451578 | ||
|
|
52ac07d327 | ||
|
|
0809be4ec5 | ||
|
|
24693ac285 | ||
|
|
92cadaf917 | ||
|
|
d2eb72fd14 | ||
|
|
b4d733619a | ||
|
|
ed2c004c8a | ||
|
|
6421f12d7f | ||
|
|
ee49025f80 | ||
|
|
5925c27efb | ||
|
|
aa00738a21 | ||
|
|
5330041ea9 |
57
.github/workflows/create-test-plan.py
vendored
57
.github/workflows/create-test-plan.py
vendored
@@ -20,7 +20,6 @@ class AppleArch(Enum):
|
||||
class MsvcArch(Enum):
|
||||
X86 = "x86"
|
||||
X64 = "x64"
|
||||
Arm32 = "arm"
|
||||
Arm64 = "arm64"
|
||||
|
||||
|
||||
@@ -28,7 +27,6 @@ class JobOs(Enum):
|
||||
WindowsLatest = "windows-latest"
|
||||
UbuntuLatest = "ubuntu-latest"
|
||||
MacosLatest = "macos-latest"
|
||||
Ubuntu20_04 = "ubuntu-20.04"
|
||||
Ubuntu22_04 = "ubuntu-22.04"
|
||||
Ubuntu24_04 = "ubuntu-24.04"
|
||||
Macos13 = "macos-13"
|
||||
@@ -51,19 +49,18 @@ class SdlPlatform(Enum):
|
||||
Riscos = "riscos"
|
||||
FreeBSD = "freebsd"
|
||||
NetBSD = "netbsd"
|
||||
OpenBSD = "openbsd"
|
||||
Watcom = "watcom"
|
||||
|
||||
|
||||
class Msys2Platform(Enum):
|
||||
Mingw32 = "mingw32"
|
||||
Mingw64 = "mingw64"
|
||||
Clang32 = "clang32"
|
||||
Clang64 = "clang64"
|
||||
Ucrt64 = "ucrt64"
|
||||
|
||||
|
||||
class IntelCompiler(Enum):
|
||||
Icc = "icc"
|
||||
Icx = "icx"
|
||||
|
||||
|
||||
@@ -99,7 +96,6 @@ class JobSpec:
|
||||
msvc_static_crt: bool = False
|
||||
clang_cl: bool = False
|
||||
gdk: bool = False
|
||||
uwp: bool = False
|
||||
vita_gles: Optional[VitaGLES] = None
|
||||
watcom_platform: Optional[WatcomPlatform] = None
|
||||
|
||||
@@ -107,7 +103,6 @@ class JobSpec:
|
||||
JOB_SPECS = {
|
||||
"msys2-mingw32": JobSpec(name="Windows (msys2, mingw32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32", msys2_platform=Msys2Platform.Mingw32, ),
|
||||
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
|
||||
"msys2-clang32": JobSpec(name="Windows (msys2, clang32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32-clang", msys2_platform=Msys2Platform.Clang32, ),
|
||||
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
|
||||
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
|
||||
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
|
||||
@@ -116,15 +111,11 @@ JOB_SPECS = {
|
||||
"msvc-static-x64": JobSpec(name="Windows (MSVC, static VCRT, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_static_crt=True, ),
|
||||
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
|
||||
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
|
||||
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
|
||||
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
|
||||
"msvc-uwp-x64": JobSpec(name="UWP (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-UWP", msvc_arch=MsvcArch.X64, msvc_project="VisualC-WinRT/SDL-UWP.sln", uwp=True, ),
|
||||
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
|
||||
"ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", autotools=True),
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", autotools=True),
|
||||
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 20.04 (Intel oneAPI)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 20.04 (Intel Compiler)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-icc", intel=IntelCompiler.Icc, ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"macos-gnu-arm64-x64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-x64-gnu",autotools=True, apple_archs={AppleArch.X86_64, AppleArch.ARM64, }, ),
|
||||
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
|
||||
"tvos": JobSpec(name="tvOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Tvos, artifact="SDL-tvos-arm64", xcode=True, ),
|
||||
@@ -139,6 +130,7 @@ JOB_SPECS = {
|
||||
"vita-pvr": JobSpec(name="Sony PlayStation Vita (GLES w/ PVR_PSP2)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pvr", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pvr, ),
|
||||
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
|
||||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", autotools=True, ),
|
||||
"openbsd": JobSpec(name="OpenBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.OpenBSD, artifact="SDL-openbsd-x64", autotools=True, ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", autotools=True, ),
|
||||
"watcom-win32": JobSpec(name="Watcom (Windows)", os=JobOs.WindowsLatest, platform=SdlPlatform.Watcom, artifact="SDL-watcom-win32", no_cmake=True, watcom_platform=WatcomPlatform.Windows ),
|
||||
"watcom-os2": JobSpec(name="Watcom (OS/2)", os=JobOs.WindowsLatest, platform=SdlPlatform.Watcom, artifact="SDL-watcom-win32", no_cmake=True, watcom_platform=WatcomPlatform.OS2 ),
|
||||
@@ -181,6 +173,7 @@ class JobDetails:
|
||||
brew_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_toolchain_file: str = ""
|
||||
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_generator: str = "Ninja"
|
||||
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
cppflags: list[str] = dataclasses.field(default_factory=list)
|
||||
cc: str = ""
|
||||
@@ -226,6 +219,7 @@ class JobDetails:
|
||||
setup_vita_gles_type: str = ""
|
||||
check_sources: bool = False
|
||||
watcom_makefile: str = ""
|
||||
binutils_strings: str = "strings"
|
||||
|
||||
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
||||
data = {
|
||||
@@ -259,6 +253,7 @@ class JobDetails:
|
||||
"cflags": my_shlex_join(self.cppflags + self.cflags),
|
||||
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
|
||||
"ldflags": my_shlex_join(self.ldflags),
|
||||
"cmake-generator": self.cmake_generator,
|
||||
"cmake-toolchain-file": self.cmake_toolchain_file,
|
||||
"cmake-arguments": my_shlex_join(self.cmake_arguments),
|
||||
"cmake-build-arguments": my_shlex_join(self.cmake_build_arguments),
|
||||
@@ -291,6 +286,7 @@ class JobDetails:
|
||||
"setup-gdk-folder": self.setup_gdk_folder,
|
||||
"check-sources": self.check_sources,
|
||||
"watcom-makefile": self.watcom_makefile,
|
||||
"binutils-strings": self.binutils_strings,
|
||||
}
|
||||
return {k: v for k, v in data.items() if v != ""}
|
||||
|
||||
@@ -344,10 +340,6 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
case IntelCompiler.Icx:
|
||||
job.cc = "icx"
|
||||
job.cxx = "icpx"
|
||||
case IntelCompiler.Icc:
|
||||
job.cc = "icc"
|
||||
job.cxx = "icpc"
|
||||
job.cppflags.append("-diag-disable=10441")
|
||||
case _:
|
||||
raise ValueError(f"Invalid intel={spec.intel}")
|
||||
job.source_cmd = f"source /opt/intel/oneapi/setvars.sh;"
|
||||
@@ -371,10 +363,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=-DEBUG",
|
||||
))
|
||||
if spec.uwp:
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL'")
|
||||
else:
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
|
||||
|
||||
if spec.clang_cl:
|
||||
job.cmake_arguments.extend((
|
||||
@@ -406,21 +395,10 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.msvc_vcvars_arch = "x64_x86"
|
||||
case MsvcArch.X64:
|
||||
job.msvc_vcvars_arch = "x64"
|
||||
case MsvcArch.Arm32:
|
||||
job.msvc_vcvars_arch = "x64_arm"
|
||||
job.msvc_vcvars_sdk = "10.0.22621.0" # 10.0.26100.0 dropped ARM32 um and ucrt libraries
|
||||
job.run_tests = False
|
||||
case MsvcArch.Arm64:
|
||||
job.msvc_vcvars_arch = "x64_arm64"
|
||||
job.run_tests = False
|
||||
if spec.uwp:
|
||||
job.build_tests = False
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_SYSTEM_NAME=WindowsStore",
|
||||
"-DCMAKE_SYSTEM_VERSION=10.0",
|
||||
))
|
||||
job.msvc_project_flags.append("-p:WindowsTargetPlatformVersion=10.0.17763.0")
|
||||
elif spec.gdk:
|
||||
if spec.gdk:
|
||||
job.setup_gdk_folder = "VisualC-GDK"
|
||||
else:
|
||||
match spec.msvc_arch:
|
||||
@@ -610,11 +588,14 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.N3ds:
|
||||
job.cmake_generator = "Unix Makefiles"
|
||||
job.cmake_build_arguments.append("-j$(nproc)")
|
||||
job.shared = False
|
||||
job.apt_packages = ["ninja-build", "binutils"]
|
||||
job.apt_packages = []
|
||||
job.run_tests = False
|
||||
job.cc_from_cmake = True
|
||||
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
|
||||
job.binutils_strings = "/opt/devkitpro/devkitARM/bin/arm-none-eabi-strings"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Msys2:
|
||||
job.shell = "msys2 {0}"
|
||||
@@ -627,7 +608,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
"clang64": "mingw-w64-clang-x86_64",
|
||||
"ucrt64": "mingw-w64-ucrt-x86_64",
|
||||
}[spec.msys2_platform.value]
|
||||
job.msys2_no_perl = spec.msys2_platform in (Msys2Platform.Mingw32, Msys2Platform.Clang32)
|
||||
job.msys2_no_perl = spec.msys2_platform in (Msys2Platform.Mingw32, )
|
||||
job.shared_lib = SharedLibType.WIN32
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Riscos:
|
||||
@@ -646,7 +627,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
))
|
||||
job.cmake_toolchain_file = "/home/riscos/env/toolchain-riscos.cmake"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.FreeBSD | SdlPlatform.NetBSD:
|
||||
case SdlPlatform.FreeBSD | SdlPlatform.NetBSD | SdlPlatform.OpenBSD:
|
||||
job.build_autotools_tests = False
|
||||
job.cpactions = True
|
||||
job.no_cmake = True
|
||||
@@ -657,7 +638,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
match spec.platform:
|
||||
case SdlPlatform.FreeBSD:
|
||||
job.cpactions_os = "freebsd"
|
||||
job.cpactions_version = "14.2"
|
||||
job.cpactions_version = "14.3"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "sudo pkg update"
|
||||
job.cpactions_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"
|
||||
@@ -671,6 +652,12 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_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"
|
||||
job.cpactions_install_cmd = "sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1"
|
||||
case SdlPlatform.OpenBSD:
|
||||
job.cpactions_os = "openbsd"
|
||||
job.cpactions_version = "7.7"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "sudo pkg_add -u"
|
||||
job.cpactions_install_cmd = "sudo pkg_add cmake ninja pkgconf wayland wayland-protocols libxkbcommon libinotify pulseaudio dbus ibus"
|
||||
case SdlPlatform.Watcom:
|
||||
match spec.watcom_platform:
|
||||
case WatcomPlatform.OS2:
|
||||
|
||||
8
.github/workflows/generic.yml
vendored
8
.github/workflows/generic.yml
vendored
@@ -177,7 +177,7 @@ jobs:
|
||||
#shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -GNinja \
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -G "${{ matrix.platform.cmake-generator }}" \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
@@ -207,9 +207,9 @@ jobs:
|
||||
run: |
|
||||
echo "This should show us the SDL_REVISION"
|
||||
echo "Shared library:"
|
||||
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
||||
${{ (matrix.platform.shared-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
||||
echo "Static library:"
|
||||
${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
||||
${{ (matrix.platform.static-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
||||
- name: 'Run build-time tests (CMake)'
|
||||
id: cmake-tests
|
||||
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
|
||||
@@ -264,7 +264,7 @@ jobs:
|
||||
- name: 'Build (cross-platform-actions, BSD)'
|
||||
id: cpactions
|
||||
if: ${{ matrix.platform.cpactions }}
|
||||
uses: cross-platform-actions/action@v0.27.0
|
||||
uses: cross-platform-actions/action@v0.29.0
|
||||
with:
|
||||
operating_system: '${{ matrix.platform.cpactions-os }}'
|
||||
architecture: '${{ matrix.platform.cpactions-arch }}'
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -181,7 +181,7 @@ jobs:
|
||||
|
||||
msvc:
|
||||
needs: [src]
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
outputs:
|
||||
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
|
||||
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
|
||||
|
||||
@@ -23,7 +23,8 @@ manpageheaderfiletext = Defined in %fname%
|
||||
# A handful of others we fix up in the header itself with /* WIKI CATEGORY: x */ comments.
|
||||
headercategoryeval = s/\ASDL_config_.*?\.h\Z//; s/\ASDL_test_.*?\.h\Z//; s/\ASDL_?(.*?)\.h\Z/$1/; ucfirst();
|
||||
|
||||
quickrefenabled = 0 # !!! FIXME: maybe later, but there are probably documentation gaps to fix first.
|
||||
# !!! FIXME: maybe later, but there are probably documentation gaps to fix first.
|
||||
quickrefenabled = 0
|
||||
quickrefcategoryorder = Init,Hints,Error,Version,Properties,Log,Video,Events,Keyboard,Mouse,Touch,Gesture,GameController,Joystick,Haptic,Audio,Timer,Render,LoadSO,Thread,Mutex,Atomic,Filesystem,RWOPS,Pixels,Surface,Blendmode,Rect,Clipboard,Messagebox,Vulkan,Metal,Platform,Power,Sensor,Bits,Endian,Assert,CPUInfo,Locale,System,Misc,GUID,Main,Stdinc
|
||||
quickreftitle = SDL2 API Quick Reference
|
||||
quickrefurl = https://libsdl.org/
|
||||
|
||||
@@ -60,6 +60,7 @@ endif()
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLanguage)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCSourceCompiles)
|
||||
@@ -88,7 +89,7 @@ endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 32)
|
||||
set(SDL_MINOR_VERSION 33)
|
||||
set(SDL_MICRO_VERSION 0)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
@@ -241,7 +242,7 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
endif()
|
||||
|
||||
# Default option knobs
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS OR SDL_CPU_ARM64EC)
|
||||
if(UNIX OR MINGW OR MSYS OR OS2 OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS OR SDL_CPU_ARM64EC)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
if(WINDOWS OR MACOS OR IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
@@ -755,6 +756,11 @@ if(MSVC)
|
||||
if(MSVC_VERSION GREATER 1926 AND CMAKE_GENERATOR_PLATFORM MATCHES "Win32|x64")
|
||||
list(APPEND EXTRA_LDFLAGS_BUILD "-CETCOMPAT")
|
||||
endif()
|
||||
|
||||
# for VS >= 17.14 targeting ARM64: inline the Interlocked funcs
|
||||
if(MSVC_VERSION GREATER 1943 AND SDL_CPU_ARM64 AND NOT SDL_LIBC)
|
||||
list(APPEND EXTRA_CFLAGS /forceInterlockedFunctions-)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
@@ -931,7 +937,17 @@ if(SDL_ASSEMBLY)
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(CPU_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
|
||||
list(APPEND EXTRA_CFLAGS "-mlsx")
|
||||
set_property(SOURCE
|
||||
"${SDL2_SOURCE_DIR}/src/video/yuv2rgb/yuv_rgb_lsx.c"
|
||||
"${SDL2_SOURCE_DIR}/src/video/SDL_blit_A.c"
|
||||
"${SDL2_SOURCE_DIR}/src/video/SDL_fillrect.c"
|
||||
APPEND PROPERTY COMPILE_OPTIONS "-mlsx")
|
||||
|
||||
set_property(SOURCE
|
||||
"${SDL2_SOURCE_DIR}/src/video/yuv2rgb/yuv_rgb_lsx.c"
|
||||
"${SDL2_SOURCE_DIR}/src/video/SDL_blit_A.c"
|
||||
"${SDL2_SOURCE_DIR}/src/video/SDL_fillrect.c"
|
||||
PROPERTY SKIP_PRECOMPILE_HEADERS 1)
|
||||
set(HAVE_LSX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1094,6 +1110,7 @@ if(SDL_LIBC)
|
||||
endforeach()
|
||||
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
check_symbol_exists(sigtimedwait "signal.h" HAVE_SIGTIMEDWAIT)
|
||||
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
||||
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP)
|
||||
check_symbol_exists(sysconf "unistd.h" HAVE_SYSCONF)
|
||||
@@ -1465,10 +1482,14 @@ elseif(EMSCRIPTEN)
|
||||
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(SDL_AUDIO)
|
||||
if(SYSV5 OR SOLARIS OR HPUX)
|
||||
set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
|
||||
file(GLOB SUN_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sun/*.c)
|
||||
list(APPEND SOURCE_FILES ${SUN_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
# Newer Solaris-based systems, like OpenIndiana, don't have this interface anymore. Check for the header first.
|
||||
check_include_file(sys/audioio.h HAVE_SYS_AUDIOIO_H)
|
||||
if(HAVE_SYS_AUDIOIO_H)
|
||||
set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
|
||||
file(GLOB SUN_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sun/*.c)
|
||||
list(APPEND SOURCE_FILES ${SUN_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
elseif(NETBSD)
|
||||
set(SDL_AUDIO_DRIVER_NETBSD 1)
|
||||
file(GLOB NETBSD_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/netbsd/*.c)
|
||||
@@ -1829,8 +1850,10 @@ elseif(WINDOWS)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
target_link_directories(sdl-build-options INTERFACE "$$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}")
|
||||
target_include_directories(sdl-build-options INTERFACE "$ENV{DXSDK_DIR}\\Include")
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}" SDL2_TMP_DXSDK_LIB_DIR)
|
||||
target_link_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_LIB_DIR}")
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\Include" SDL2_TMP_DXSDK_INCLUDE_DIR)
|
||||
target_include_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_INCLUDE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 32
|
||||
MINOR_VERSION = 33
|
||||
MICRO_VERSION = 0
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
@@ -94,7 +94,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c SDL_steam_virtual_gamepad.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_8bitdo.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c SDL_steam_virtual_gamepad.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 32
|
||||
MINOR_VERSION = 33
|
||||
MICRO_VERSION = 0
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
|
||||
@@ -73,7 +73,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_8bitdo.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
|
||||
@@ -621,6 +621,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
|
||||
|
||||
@@ -1054,6 +1054,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c">
|
||||
<Filter>joystick\dummy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
|
||||
@@ -371,6 +371,7 @@
|
||||
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.0.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -391,7 +392,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
@@ -603,4 +604,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -473,6 +473,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
|
||||
|
||||
@@ -1045,6 +1045,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c">
|
||||
<Filter>joystick\dummy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -456,7 +456,10 @@ main(int argc, char *argv[])
|
||||
while (!done) {
|
||||
SDL_Event event;
|
||||
double deltaTime = updateDeltaTime();
|
||||
SDL_bool hasEvents = SDL_FALSE;
|
||||
|
||||
while (SDL_PollEvent(&event)) {
|
||||
hasEvents = SDL_TRUE;
|
||||
if (event.type == SDL_QUIT) {
|
||||
done = 1;
|
||||
}
|
||||
@@ -466,10 +469,17 @@ main(int argc, char *argv[])
|
||||
spawnEmitterParticle(x, y);
|
||||
}
|
||||
}
|
||||
stepParticles(deltaTime);
|
||||
drawParticles();
|
||||
SDL_GL_SwapWindow(window);
|
||||
SDL_Delay(1);
|
||||
|
||||
/* Only update and render if we have active particles or just received events */
|
||||
if (num_active_particles > 0 || hasEvents) {
|
||||
stepParticles(deltaTime);
|
||||
drawParticles();
|
||||
SDL_GL_SwapWindow(window);
|
||||
SDL_Delay(16); // Target 60 FPS when active
|
||||
} else {
|
||||
/* Idle state - wait for events with longer delay to save CPU */
|
||||
SDL_Delay(100); // Much longer delay when idle
|
||||
}
|
||||
}
|
||||
|
||||
/* delete textures */
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.32.0</string>
|
||||
<string>2.33.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.32.0</string>
|
||||
<string>2.33.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -75,6 +75,15 @@
|
||||
56C5237F1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
|
||||
56C523811D8F498C001F2F30 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; };
|
||||
5C2EF7011FC9EF10003F5197 /* SDL_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */; };
|
||||
6313CD422F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD432F8EF7AE00D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD442F8EF7B000D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD452F8EF7B100D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD462F8EF7B200D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD472F8EF7B300D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD482F8EF7B400D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD492F8EF7B400D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
6313CD4A2F8EF7B500D1AF35 /* SDL_hidapi_8bitdo.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */; };
|
||||
75E0915A241EA924004729E1 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75E09158241EA924004729E1 /* SDL_virtualjoystick.c */; };
|
||||
75E0915B241EA924004729E1 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75E09158241EA924004729E1 /* SDL_virtualjoystick.c */; };
|
||||
75E0915C241EA924004729E1 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75E09158241EA924004729E1 /* SDL_virtualjoystick.c */; };
|
||||
@@ -3785,6 +3794,7 @@
|
||||
566E26CE246274CC00718109 /* SDL_syslocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syslocale.h; path = locale/SDL_syslocale.h; sourceTree = "<group>"; };
|
||||
567E2F2017C44C35005F1892 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; };
|
||||
5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_egl.h; sourceTree = "<group>"; };
|
||||
6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_8bitdo.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>"; };
|
||||
@@ -5099,6 +5109,7 @@
|
||||
A7D8A7BE23E2513E00DCD162 /* hidapi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6313CD412F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c */,
|
||||
F32305FE28939F6400E66D30 /* SDL_hidapi_combined.c */,
|
||||
A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */,
|
||||
F3F07D59269640160074468B /* SDL_hidapi_luna.c */,
|
||||
@@ -8082,6 +8093,7 @@
|
||||
A75FCEA223E25AB700529352 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A75FCEA323E25AB700529352 /* SDL_offscreenwindow.c in Sources */,
|
||||
F316ABB92B5A02C3002EF551 /* yuv_rgb_lsx.c in Sources */,
|
||||
6313CD492F8EF7B400D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -8282,6 +8294,7 @@
|
||||
A75FD05B23E25AC700529352 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A75FD05C23E25AC700529352 /* SDL_offscreenwindow.c in Sources */,
|
||||
F316ABBA2B5A02C3002EF551 /* yuv_rgb_lsx.c in Sources */,
|
||||
6313CD4A2F8EF7B500D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -8483,6 +8496,7 @@
|
||||
A769B22C23E259AE00872273 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A1626A432617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
A769B22D23E259AE00872273 /* SDL_offscreenwindow.c in Sources */,
|
||||
6313CD472F8EF7B300D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -8683,6 +8697,7 @@
|
||||
A7D8AC6423E2514100DCD162 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A7D8AB6223E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
F316ABB32B5A02C3002EF551 /* yuv_rgb_lsx.c in Sources */,
|
||||
6313CD432F8EF7AE00D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -8883,6 +8898,7 @@
|
||||
A7D8AC6523E2514100DCD162 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A7D8AB6323E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
F316ABB42B5A02C3002EF551 /* yuv_rgb_lsx.c in Sources */,
|
||||
6313CD442F8EF7B000D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -9084,6 +9100,7 @@
|
||||
A7D8AC6723E2514100DCD162 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A1626A422617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
A7D8AB6523E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
6313CD462F8EF7B200D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -9283,6 +9300,7 @@
|
||||
A7D8AEA023E2514100DCD162 /* SDL_cocoavulkan.m in Sources */,
|
||||
A7D8AB6123E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
566E26D8246274CC00718109 /* SDL_locale.c in Sources */,
|
||||
6313CD422F8EF77E00D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -9482,6 +9500,7 @@
|
||||
A7D8BBF823E2574800DCD162 /* SDL_uikitmodes.m in Sources */,
|
||||
A7D8AEA323E2514100DCD162 /* SDL_cocoavulkan.m in Sources */,
|
||||
A7D8AB6423E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
6313CD452F8EF7B100D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -9681,6 +9700,7 @@
|
||||
A7D8AEA523E2514100DCD162 /* SDL_cocoavulkan.m in Sources */,
|
||||
A7D8AC6823E2514100DCD162 /* SDL_uikitappdelegate.m in Sources */,
|
||||
A7D8AB6623E2514100DCD162 /* SDL_offscreenwindow.c in Sources */,
|
||||
6313CD482F8EF7B400D1AF35 /* SDL_hidapi_8bitdo.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -9728,8 +9748,8 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3201.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3301.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3301.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -9770,7 +9790,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.32.0;
|
||||
MARKETING_VERSION = 2.33.0;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Release;
|
||||
@@ -9813,8 +9833,8 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3201.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3301.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3301.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -9856,7 +9876,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.32.0;
|
||||
MARKETING_VERSION = 2.33.0;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -10062,8 +10082,8 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 3201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3201.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3301.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3301.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
@@ -10114,8 +10134,8 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 3201.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3201.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3301.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3301.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Title SDL 2.32.0
|
||||
Title SDL 2.33.0
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
acinclude/libtool.m4
vendored
53
acinclude/libtool.m4
vendored
@@ -1,3 +1,5 @@
|
||||
# Based on libtool-2.4.6 with additional patches, customized for SDL
|
||||
#
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
|
||||
@@ -5161,17 +5163,17 @@ _LT_EOF
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
shrext_cmds=.dll
|
||||
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -5180,7 +5182,6 @@ _LT_EOF
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
@@ -5867,17 +5868,17 @@ _LT_EOF
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
shrext_cmds=.dll
|
||||
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -5886,7 +5887,6 @@ _LT_EOF
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
@@ -6737,17 +6737,17 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
shrext_cmds=.dll
|
||||
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -6756,7 +6756,6 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
@@ -11,15 +11,15 @@ android {
|
||||
if (buildAsApplication) {
|
||||
namespace "org.libsdl.app"
|
||||
}
|
||||
compileSdkVersion 34
|
||||
compileSdkVersion 35
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 34
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-19"
|
||||
arguments "APP_PLATFORM=android-21"
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
// cmake {
|
||||
|
||||
@@ -60,7 +60,7 @@ import java.util.Locale;
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 32;
|
||||
private static final int SDL_MINOR_VERSION = 33;
|
||||
private static final int SDL_MICRO_VERSION = 0;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
@@ -2008,17 +2008,15 @@ class SDLInputConnection extends BaseInputConnection {
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
// 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;
|
||||
|
||||
@@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||
classpath 'com.android.tools.build:gradle:8.6.0'
|
||||
|
||||
// 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-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -37,6 +37,8 @@ logger = logging.getLogger(__name__)
|
||||
GIT_HASH_FILENAME = ".git-hash"
|
||||
REVISION_TXT = "REVISION.txt"
|
||||
|
||||
RE_ILLEGAL_MINGW_LIBRARIES = re.compile(r"(?:lib)?(?:gcc|(?:std)?c[+][+]|(?:win)?pthread).*", flags=re.I)
|
||||
|
||||
|
||||
def safe_isotime_to_datetime(str_isotime: str) -> datetime.datetime:
|
||||
try:
|
||||
@@ -339,6 +341,12 @@ class ArchiveFileTree:
|
||||
def add_file(self, file: NodeInArchive):
|
||||
self._tree[file.arcpath] = file
|
||||
|
||||
def __iter__(self) -> typing.Iterable[NodeInArchive]:
|
||||
yield from self._tree.values()
|
||||
|
||||
def __contains__(self, value: str) -> bool:
|
||||
return value in self._tree
|
||||
|
||||
def get_latest_mod_time(self) -> datetime.datetime:
|
||||
return max(item.time for item in self._tree.values() if item.time)
|
||||
|
||||
@@ -526,6 +534,16 @@ class SourceCollector:
|
||||
return path_times
|
||||
|
||||
|
||||
class AndroidApiVersion:
|
||||
def __init__(self, name: str, ints: tuple[int, ...]):
|
||||
self.name = name
|
||||
self.ints = ints
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<{self.name} ({'.'.join(str(v) for v in self.ints)})>"
|
||||
|
||||
ANDROID_ABI_EXTRA_LINK_OPTIONS = {}
|
||||
|
||||
class Releaser:
|
||||
def __init__(self, release_info: dict, commit: str, revision: str, root: Path, dist_path: Path, section_printer: SectionPrinter, executer: Executer, cmake_generator: str, deps_path: Path, overwrite: bool, github: bool, fast: bool):
|
||||
self.release_info = release_info
|
||||
@@ -586,12 +604,22 @@ class Releaser:
|
||||
def create_source_archives(self) -> None:
|
||||
source_collector = SourceCollector(root=self.root, commit=self.commit, executer=self.executer, filter=self._path_filter)
|
||||
print(f"Collecting sources of {self.project}...")
|
||||
archive_tree = source_collector.get_archive_file_tree()
|
||||
archive_tree: ArchiveFileTree = source_collector.get_archive_file_tree()
|
||||
latest_mod_time = archive_tree.get_latest_mod_time()
|
||||
archive_tree.add_file(NodeInArchive.from_text(arcpath=REVISION_TXT, text=f"{self.revision}\n", time=latest_mod_time))
|
||||
archive_tree.add_file(NodeInArchive.from_text(arcpath=f"{GIT_HASH_FILENAME}", text=f"{self.commit}\n", time=latest_mod_time))
|
||||
archive_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["source"].get("files", {}), file_mapping_root=self.root, context=self.get_context(), time=latest_mod_time)
|
||||
|
||||
if "Makefile.am" in archive_tree:
|
||||
patched_time = latest_mod_time + datetime.timedelta(minutes=1)
|
||||
print(f"Makefile.am detected -> touching aclocal.m4, */Makefile.in, configure")
|
||||
for node_data in archive_tree:
|
||||
arc_name = os.path.basename(node_data.arcpath)
|
||||
arc_name_we, arc_name_ext = os.path.splitext(arc_name)
|
||||
if arc_name in ("aclocal.m4", "configure", "Makefile.in"):
|
||||
print(f"Bumping time of {node_data.arcpath}")
|
||||
node_data.time = patched_time
|
||||
|
||||
archive_base = f"{self.project}-{self.version}"
|
||||
zip_path = self.dist_path / f"{archive_base}.zip"
|
||||
tgz_path = self.dist_path / f"{archive_base}.tar.gz"
|
||||
@@ -668,6 +696,15 @@ class Releaser:
|
||||
def git_hash_data(self) -> bytes:
|
||||
return f"{self.commit}\n".encode()
|
||||
|
||||
def verify_mingw_library(self, triplet: str, path: Path):
|
||||
objdump_output = self.executer.check_output([f"{triplet}-objdump", "-p", str(path)])
|
||||
libraries = re.findall(r"DLL Name: ([^\n]+)", objdump_output)
|
||||
logger.info("%s (%s) libraries: %r", path, triplet, libraries)
|
||||
illegal_libraries = list(filter(RE_ILLEGAL_MINGW_LIBRARIES.match, libraries))
|
||||
logger.error("Detected 'illegal' libraries: %r", illegal_libraries)
|
||||
if illegal_libraries:
|
||||
raise Exception(f"{path} links to illegal libraries: {illegal_libraries}")
|
||||
|
||||
def create_mingw_archives(self) -> None:
|
||||
build_type = "Release"
|
||||
build_parent_dir = self.root / "build-mingw"
|
||||
@@ -764,7 +801,6 @@ class Releaser:
|
||||
f"--includedir=${{prefix}}/include",
|
||||
f"--libdir=${{prefix}}/lib",
|
||||
f"--bindir=${{prefix}}/bin",
|
||||
f"--exec-prefix=${{prefix}}/bin",
|
||||
f"--host={triplet}",
|
||||
f"--build=x86_64-none-linux-gnu",
|
||||
"CFLAGS=-O2",
|
||||
@@ -772,9 +808,10 @@ class Releaser:
|
||||
"LDFLAGS=-Wl,-s",
|
||||
] + extra_args, cwd=build_path, env=new_env)
|
||||
with self.section_printer.group(f"Build MinGW {triplet} (autotools)"):
|
||||
self.executer.run(["make", "V=1", f"-j{self.cpu_count}"], cwd=build_path, env=new_env)
|
||||
self.executer.run(["make", f"-j{self.cpu_count}"], cwd=build_path, env=new_env)
|
||||
with self.section_printer.group(f"Install MinGW {triplet} (autotools)"):
|
||||
self.executer.run(["make", "install"], cwd=build_path, env=new_env)
|
||||
self.verify_mingw_library(triplet=ARCH_TO_TRIPLET[arch], path=install_path / "bin" / f"{self.project}.dll")
|
||||
archive_file_tree.add_directory_tree(arc_dir=arc_join(arc_root, triplet), path=install_path, time=self.arc_time)
|
||||
|
||||
print("Recording arch-dependent extra files for MinGW development archive ...")
|
||||
@@ -830,6 +867,7 @@ class Releaser:
|
||||
self.executer.run(["cmake", "--build", str(build_path), "--verbose", "--config", build_type], cwd=build_path, env=new_env)
|
||||
with self.section_printer.group(f"Install MinGW {triplet} (CMake)"):
|
||||
self.executer.run(["cmake", "--install", str(build_path)], cwd=build_path, env=new_env)
|
||||
self.verify_mingw_library(triplet=ARCH_TO_TRIPLET[arch], path=install_path / "bin" / f"{self.project}.dll")
|
||||
archive_file_tree.add_directory_tree(arc_dir=arc_join(arc_root, triplet), path=install_path, time=self.arc_time)
|
||||
|
||||
print("Recording arch-dependent extra files for MinGW development archive ...")
|
||||
@@ -857,22 +895,25 @@ class Releaser:
|
||||
self.artifacts["mingw-devel-tar-gz"] = tgz_path
|
||||
self.artifacts["mingw-devel-tar-xz"] = txz_path
|
||||
|
||||
def _detect_android_api(self, android_home: str) -> typing.Optional[int]:
|
||||
def _detect_android_api(self, android_home: str) -> typing.Optional[AndroidApiVersion]:
|
||||
platform_dirs = list(Path(p) for p in glob.glob(f"{android_home}/platforms/android-*"))
|
||||
re_platform = re.compile("android-([0-9]+)")
|
||||
platform_versions = []
|
||||
re_platform = re.compile("^android-([0-9]+)(?:-ext([0-9]+))?$")
|
||||
platform_versions: list[AndroidApiVersion] = []
|
||||
for platform_dir in platform_dirs:
|
||||
logger.debug("Found Android Platform SDK: %s", platform_dir)
|
||||
if not (platform_dir / "android.jar").is_file():
|
||||
logger.debug("Skipping SDK, missing android.jar")
|
||||
continue
|
||||
if m:= re_platform.match(platform_dir.name):
|
||||
platform_versions.append(int(m.group(1)))
|
||||
platform_versions.sort()
|
||||
platform_versions.append(AndroidApiVersion(name=platform_dir.name, ints=(int(m.group(1)), int(m.group(2) or 0))))
|
||||
platform_versions.sort(key=lambda v: v.ints)
|
||||
logger.info("Available platform versions: %s", platform_versions)
|
||||
platform_versions = list(filter(lambda v: v >= self._android_api_minimum, platform_versions))
|
||||
logger.info("Valid platform versions (>=%d): %s", self._android_api_minimum, platform_versions)
|
||||
platform_versions = list(filter(lambda v: v.ints >= self._android_api_minimum.ints, platform_versions))
|
||||
logger.info("Valid platform versions (>=%s): %s", self._android_api_minimum.ints, platform_versions)
|
||||
if not platform_versions:
|
||||
return None
|
||||
android_api = platform_versions[0]
|
||||
logger.info("Selected API version %d", android_api)
|
||||
logger.info("Selected API version %s", android_api)
|
||||
return android_api
|
||||
|
||||
def _get_prefab_json_text(self) -> str:
|
||||
@@ -896,8 +937,19 @@ class Releaser:
|
||||
return json.dumps(module_json_dict, indent=4)
|
||||
|
||||
@property
|
||||
def _android_api_minimum(self):
|
||||
return self.release_info["android"]["api-minimum"]
|
||||
def _android_api_minimum(self) -> AndroidApiVersion:
|
||||
value = self.release_info["android"]["api-minimum"]
|
||||
if isinstance(value, int):
|
||||
ints = (value, )
|
||||
elif isinstance(value, str):
|
||||
ints = tuple(split("."))
|
||||
else:
|
||||
raise ValueError("Invalid android.api-minimum: must be X or X.Y")
|
||||
match len(ints):
|
||||
case 1: name = f"android-{ints[0]}"
|
||||
case 2: name = f"android-{ints[0]}-ext-{ints[1]}"
|
||||
case _: raise ValueError("Invalid android.api-minimum: must be X or X.Y")
|
||||
return AndroidApiVersion(name=name, ints=ints)
|
||||
|
||||
@property
|
||||
def _android_api_target(self):
|
||||
@@ -910,7 +962,7 @@ class Releaser:
|
||||
def _get_prefab_abi_json_text(self, abi: str, cpp: bool, shared: bool) -> str:
|
||||
abi_json_dict = {
|
||||
"abi": abi,
|
||||
"api": self._android_api_minimum,
|
||||
"api": self._android_api_minimum.ints[0],
|
||||
"ndk": self._android_ndk_minimum,
|
||||
"stl": "c++_shared" if cpp else "none",
|
||||
"static": not shared,
|
||||
@@ -923,7 +975,7 @@ class Releaser:
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.libsdl.android.{self.project}" android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="{self._android_api_minimum}"
|
||||
<uses-sdk android:minSdkVersion="{self._android_api_minimum.ints[0]}"
|
||||
android:targetSdkVersion="{self._android_api_target}" />
|
||||
</manifest>
|
||||
""")
|
||||
@@ -933,7 +985,8 @@ class Releaser:
|
||||
if not cmake_toolchain_file.exists():
|
||||
logger.error("CMake toolchain file does not exist (%s)", cmake_toolchain_file)
|
||||
raise SystemExit(1)
|
||||
aar_path = self.dist_path / f"{self.project}-{self.version}.aar"
|
||||
aar_path = self.root / "build-android" / f"{self.project}-{self.version}.aar"
|
||||
android_dist_path = self.dist_path / f"{self.project}-devel-{self.version}-android.zip"
|
||||
android_abis = self.release_info["android"]["abis"]
|
||||
java_jars_added = False
|
||||
module_data_added = False
|
||||
@@ -941,16 +994,27 @@ class Releaser:
|
||||
shutil.rmtree(android_deps_path, ignore_errors=True)
|
||||
|
||||
for dep, depinfo in self.release_info["android"].get("dependencies", {}).items():
|
||||
android_aar = self.deps_path / glob.glob(depinfo["artifact"], root_dir=self.deps_path)[0]
|
||||
with self.section_printer.group(f"Extracting Android dependency {dep} ({android_aar.name})"):
|
||||
self.executer.run([sys.executable, str(android_aar), "-o", str(android_deps_path)])
|
||||
dep_devel_zip = self.deps_path / glob.glob(depinfo["artifact"], root_dir=self.deps_path)[0]
|
||||
|
||||
dep_extract_path = self.deps_path / f"extract/android/{dep}"
|
||||
shutil.rmtree(dep_extract_path, ignore_errors=True)
|
||||
dep_extract_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with self.section_printer.group(f"Extracting Android dependency {dep} ({dep_devel_zip})"):
|
||||
with zipfile.ZipFile(dep_devel_zip, "r") as zf:
|
||||
zf.extractall(dep_extract_path)
|
||||
|
||||
dep_devel_aar = dep_extract_path / glob.glob("*.aar", root_dir=dep_extract_path)[0]
|
||||
self.executer.run([sys.executable, str(dep_devel_aar), "-o", str(android_deps_path)])
|
||||
|
||||
for module_name, module_info in self.release_info["android"]["modules"].items():
|
||||
assert "type" in module_info and module_info["type"] in ("interface", "library"), f"module {module_name} must have a valid type"
|
||||
|
||||
archive_file_tree = ArchiveFileTree()
|
||||
aar_file_tree = ArchiveFileTree()
|
||||
android_devel_file_tree = ArchiveFileTree()
|
||||
|
||||
for android_abi in android_abis:
|
||||
extra_link_options = ANDROID_ABI_EXTRA_LINK_OPTIONS.get(android_abi, "")
|
||||
with self.section_printer.group(f"Building for Android {android_api} {android_abi}"):
|
||||
build_dir = self.root / "build-android" / f"{android_abi}-build"
|
||||
install_dir = self.root / "install-android" / f"{android_abi}-install"
|
||||
@@ -961,8 +1025,11 @@ class Releaser:
|
||||
"cmake",
|
||||
"-S", str(self.root),
|
||||
"-B", str(build_dir),
|
||||
f'''-DCMAKE_C_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||
f'''-DCMAKE_CXX_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||
# NDK 21e does not support -ffile-prefix-map
|
||||
# f'''-DCMAKE_C_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||
# f'''-DCMAKE_CXX_FLAGS="-ffile-prefix-map={self.root}=/src/{self.project}"''',
|
||||
f"-DCMAKE_EXE_LINKER_FLAGS={extra_link_options}",
|
||||
f"-DCMAKE_SHARED_LINKER_FLAGS={extra_link_options}",
|
||||
f"-DCMAKE_TOOLCHAIN_FILE={cmake_toolchain_file}",
|
||||
f"-DCMAKE_PREFIX_PATH={str(android_deps_path)}",
|
||||
f"-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH",
|
||||
@@ -999,20 +1066,20 @@ class Releaser:
|
||||
assert library.suffix in (".so", ".a")
|
||||
assert library.is_file(), f"CMake should have built library '{library}' for module {module_name}"
|
||||
arcdir_prefab_libs = f"{arcdir_prefab_module}/libs/android.{android_abi}"
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath=f"{arcdir_prefab_libs}/{library.name}", path=library, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=f"{arcdir_prefab_libs}/abi.json", text=self._get_prefab_abi_json_text(abi=android_abi, cpp=False, shared=library.suffix == ".so"), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath=f"{arcdir_prefab_libs}/{library.name}", path=library, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=f"{arcdir_prefab_libs}/abi.json", text=self._get_prefab_abi_json_text(abi=android_abi, cpp=False, shared=library.suffix == ".so"), time=self.arc_time))
|
||||
|
||||
if not module_data_added:
|
||||
library_name = None
|
||||
if module_info["type"] == "library":
|
||||
library_name = Path(module_info["library"]).stem.removeprefix("lib")
|
||||
export_libraries = module_info.get("export-libraries", [])
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_module, "module.json"), text=self._get_prefab_module_json_text(library_name=library_name, export_libraries=export_libraries), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_module, "module.json"), text=self._get_prefab_module_json_text(library_name=library_name, export_libraries=export_libraries), time=self.arc_time))
|
||||
arcdir_prefab_include = f"prefab/modules/{module_name}/include"
|
||||
if "includes" in module_info:
|
||||
archive_file_tree.add_file_mapping(arc_dir=arcdir_prefab_include, file_mapping=module_info["includes"], file_mapping_root=install_dir, context=self.get_context(), time=self.arc_time)
|
||||
aar_file_tree.add_file_mapping(arc_dir=arcdir_prefab_include, file_mapping=module_info["includes"], file_mapping_root=install_dir, context=self.get_context(), time=self.arc_time)
|
||||
else:
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_include, ".keep"), text="\n", time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath=arc_join(arcdir_prefab_include, ".keep"), text="\n", time=self.arc_time))
|
||||
module_data_added = True
|
||||
|
||||
if not java_jars_added:
|
||||
@@ -1025,21 +1092,28 @@ class Releaser:
|
||||
assert sources_jar_path.is_file(), f"CMake should have archived the java sources into a JAR ({sources_jar_path})"
|
||||
assert doc_jar_path.is_file(), f"CMake should have archived javadoc into a JAR ({doc_jar_path})"
|
||||
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes.jar", path=classes_jar_path, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-sources.jar", path=sources_jar_path, time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-doc.jar", path=doc_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes.jar", path=classes_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-sources.jar", path=sources_jar_path, time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_fs(arcpath="classes-doc.jar", path=doc_jar_path, time=self.arc_time))
|
||||
|
||||
assert ("jars" in self.release_info["android"] and java_jars_added) or "jars" not in self.release_info["android"], "Must have archived java JAR archives"
|
||||
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"].get("files", {}), file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
aar_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"]["aar-files"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath="prefab/prefab.json", text=self._get_prefab_json_text(), time=self.arc_time))
|
||||
archive_file_tree.add_file(NodeInArchive.from_text(arcpath="AndroidManifest.xml", text=self._get_android_manifest_text(), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath="prefab/prefab.json", text=self._get_prefab_json_text(), time=self.arc_time))
|
||||
aar_file_tree.add_file(NodeInArchive.from_text(arcpath="AndroidManifest.xml", text=self._get_android_manifest_text(), time=self.arc_time))
|
||||
|
||||
with Archiver(zip_path=aar_path) as archiver:
|
||||
archive_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
aar_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
archiver.add_git_hash(arcdir="", commit=self.commit, time=self.arc_time)
|
||||
self.artifacts[f"android-aar"] = aar_path
|
||||
|
||||
android_devel_file_tree.add_file(NodeInArchive.from_fs(arcpath=aar_path.name, path=aar_path))
|
||||
android_devel_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["android"]["files"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
with Archiver(zip_path=android_dist_path) as archiver:
|
||||
android_devel_file_tree.add_to_archiver(archive_base="", archiver=archiver)
|
||||
archiver.add_git_hash(arcdir="", commit=self.commit, time=self.arc_time)
|
||||
|
||||
self.artifacts[f"android-aar"] = android_dist_path
|
||||
|
||||
def download_dependencies(self):
|
||||
shutil.rmtree(self.deps_path, ignore_errors=True)
|
||||
@@ -1076,7 +1150,7 @@ class Releaser:
|
||||
assert len(msvc_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {msvc_matches}"
|
||||
if "android" in self.release_info:
|
||||
android_matches = glob.glob(self.release_info["android"]["dependencies"][dep]["artifact"], root_dir=self.deps_path)
|
||||
assert len(android_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {msvc_matches}"
|
||||
assert len(android_matches) == 1, f"Exactly one archive matches msvc {dep} dependency: {android_matches}"
|
||||
|
||||
@staticmethod
|
||||
def _arch_to_vs_platform(arch: str, configuration: str="Release") -> VsArchPlatformConfig:
|
||||
@@ -1202,6 +1276,10 @@ class Releaser:
|
||||
platform_context = self.get_context(extra_context=arch_platform.extra_context())
|
||||
|
||||
build_type = "Release"
|
||||
extra_context = {
|
||||
"ARCH": arch_platform.arch,
|
||||
"PLATFORM": arch_platform.platform,
|
||||
}
|
||||
|
||||
built_paths = set(install_path / configure_text(f, context=platform_context) for file_mapping in (self.release_info["msvc"]["cmake"]["files-lib"], self.release_info["msvc"]["cmake"]["files-devel"]) for files_list in file_mapping.values() for f in files_list)
|
||||
logger.info("CMake builds these files, to be included in the package: %s", built_paths)
|
||||
@@ -1252,7 +1330,7 @@ class Releaser:
|
||||
logger.info("Collecting files...")
|
||||
archive_file_tree = ArchiveFileTree()
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["cmake"]["files-lib"], file_mapping_root=install_path, context=platform_context, time=self.arc_time)
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["files-lib"], file_mapping_root=self.root, context=self.get_context(), time=self.arc_time)
|
||||
archive_file_tree.add_file_mapping(arc_dir="", file_mapping=self.release_info["msvc"]["files-lib"], file_mapping_root=self.root, context=self.get_context(extra_context=extra_context), time=self.arc_time)
|
||||
|
||||
logger.info("Creating %s", zip_path)
|
||||
with Archiver(zip_path=zip_path) as archiver:
|
||||
@@ -1316,7 +1394,7 @@ def main(argv=None) -> int:
|
||||
parser.add_argument("--actions", choices=["download", "source", "android", "mingw", "msvc", "dmg"], required=True, nargs="+", dest="actions", help="What to do?")
|
||||
parser.set_defaults(loglevel=logging.INFO)
|
||||
parser.add_argument('--vs-year', dest="vs_year", help="Visual Studio year")
|
||||
parser.add_argument('--android-api', type=int, dest="android_api", help="Android API version")
|
||||
parser.add_argument('--android-api', dest="android_api", help="Android API version")
|
||||
parser.add_argument('--android-home', dest="android_home", default=os.environ.get("ANDROID_HOME"), help="Android Home folder")
|
||||
parser.add_argument('--android-ndk-home', dest="android_ndk_home", default=os.environ.get("ANDROID_NDK_HOME"), help="Android NDK Home folder")
|
||||
parser.add_argument('--cmake-generator', dest="cmake_generator", default="Ninja", help="CMake Generator")
|
||||
@@ -1443,14 +1521,27 @@ def main(argv=None) -> int:
|
||||
if args.android_api is None:
|
||||
with section_printer.group("Detect Android APIS"):
|
||||
args.android_api = releaser._detect_android_api(android_home=args.android_home)
|
||||
if args.android_api is None or not (Path(args.android_home) / f"platforms/android-{args.android_api}").is_dir():
|
||||
else:
|
||||
try:
|
||||
android_api_ints = tuple(int(v) for v in args.android_api.split("."))
|
||||
match len(android_api_ints):
|
||||
case 1: android_api_name = f"android-{android_api_ints[0]}"
|
||||
case 2: android_api_name = f"android-{android_api_ints[0]}-ext-{android_api_ints[1]}"
|
||||
case _: raise ValueError
|
||||
except ValueError:
|
||||
logger.error("Invalid --android-api, must be a 'X' or 'X.Y' version")
|
||||
args.android_api = AndroidApiVersion(ints=android_api_ints, name=android_api_name)
|
||||
if args.android_api is None:
|
||||
parser.error("Invalid --android-api, and/or could not be detected")
|
||||
android_api_path = Path(args.android_home) / f"platforms/{args.android_api.name}"
|
||||
if not android_api_path.is_dir():
|
||||
logger.warning(f"Android API directory does not exist ({android_api_path})")
|
||||
with section_printer.group("Android arguments"):
|
||||
print(f"android_home = {args.android_home}")
|
||||
print(f"android_ndk_home = {args.android_ndk_home}")
|
||||
print(f"android_api = {args.android_api}")
|
||||
releaser.create_android_archives(
|
||||
android_api=args.android_api,
|
||||
android_api=args.android_api.ints[0],
|
||||
android_home=args.android_home,
|
||||
android_ndk_home=args.android_ndk_home,
|
||||
)
|
||||
|
||||
17
build-scripts/config.guess
vendored
17
build-scripts/config.guess
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2025 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2024-07-27'
|
||||
timestamp='2025-07-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -60,7 +60,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
Copyright 1992-2025 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -1597,8 +1597,11 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
|
||||
;;
|
||||
*:[Ii]ronclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1808,8 +1811,8 @@ fi
|
||||
exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-format: "%Y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
||||
28
build-scripts/config.sub
vendored
28
build-scripts/config.sub
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2025 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
|
||||
|
||||
timestamp='2024-05-27'
|
||||
timestamp='2025-07-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
Copyright 1992-2025 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -145,6 +145,7 @@ case $1 in
|
||||
| kfreebsd*-gnu* \
|
||||
| knetbsd*-gnu* \
|
||||
| kopensolaris*-gnu* \
|
||||
| ironclad-* \
|
||||
| linux-* \
|
||||
| managarm-* \
|
||||
| netbsd*-eabi* \
|
||||
@@ -242,7 +243,6 @@ case $1 in
|
||||
| rombug \
|
||||
| semi \
|
||||
| sequent* \
|
||||
| siemens \
|
||||
| sgi* \
|
||||
| siemens \
|
||||
| sim \
|
||||
@@ -261,7 +261,7 @@ case $1 in
|
||||
basic_machine=$field1-$field2
|
||||
basic_os=
|
||||
;;
|
||||
zephyr*)
|
||||
tock* | zephyr*)
|
||||
basic_machine=$field1-unknown
|
||||
basic_os=$field2
|
||||
;;
|
||||
@@ -1194,7 +1194,7 @@ case $cpu-$vendor in
|
||||
xscale-* | xscalee[bl]-*)
|
||||
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
arm64-* | aarch64le-*)
|
||||
arm64-* | aarch64le-* | arm64_32-*)
|
||||
cpu=aarch64
|
||||
;;
|
||||
|
||||
@@ -1321,6 +1321,7 @@ case $cpu-$vendor in
|
||||
| i960 \
|
||||
| ia16 \
|
||||
| ia64 \
|
||||
| intelgt \
|
||||
| ip2k \
|
||||
| iq2000 \
|
||||
| javascript \
|
||||
@@ -1522,6 +1523,10 @@ EOF
|
||||
kernel=nto
|
||||
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
|
||||
;;
|
||||
ironclad*)
|
||||
kernel=ironclad
|
||||
os=`echo "$basic_os" | sed -e 's|ironclad|mlibc|'`
|
||||
;;
|
||||
linux*)
|
||||
kernel=linux
|
||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||
@@ -1976,6 +1981,7 @@ case $os in
|
||||
| atheos* \
|
||||
| auroraux* \
|
||||
| aux* \
|
||||
| banan_os* \
|
||||
| beos* \
|
||||
| bitrig* \
|
||||
| bme* \
|
||||
@@ -2022,7 +2028,6 @@ case $os in
|
||||
| ios* \
|
||||
| iris* \
|
||||
| irix* \
|
||||
| ironclad* \
|
||||
| isc* \
|
||||
| its* \
|
||||
| l4re* \
|
||||
@@ -2118,6 +2123,7 @@ case $os in
|
||||
| sysv* \
|
||||
| tenex* \
|
||||
| tirtos* \
|
||||
| tock* \
|
||||
| toppers* \
|
||||
| tops10* \
|
||||
| tops20* \
|
||||
@@ -2214,6 +2220,8 @@ case $kernel-$os-$obj in
|
||||
;;
|
||||
uclinux-uclibc*- | uclinux-gnu*- )
|
||||
;;
|
||||
ironclad-mlibc*-)
|
||||
;;
|
||||
managarm-mlibc*- | managarm-kernel*- )
|
||||
;;
|
||||
windows*-msvc*-)
|
||||
@@ -2249,6 +2257,8 @@ case $kernel-$os-$obj in
|
||||
;;
|
||||
*-eabi*- | *-gnueabi*-)
|
||||
;;
|
||||
ios*-simulator- | tvos*-simulator- | watchos*-simulator- )
|
||||
;;
|
||||
none--*)
|
||||
# None (no kernel, i.e. freestanding / bare metal),
|
||||
# can be paired with an machine code file format
|
||||
@@ -2347,8 +2357,8 @@ echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-format: "%Y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -395,7 +395,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2026 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"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -113,7 +113,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2026 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"
|
||||
|
||||
@@ -966,7 +966,7 @@ macro(CheckPTHREAD)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
set(PTHREAD_LDFLAGS "-mt -lpthread")
|
||||
else()
|
||||
set(PTHREAD_LDFLAGS "-pthread -lposix4")
|
||||
set(PTHREAD_LDFLAGS "-pthread")
|
||||
endif()
|
||||
elseif(SYSV5)
|
||||
set(PTHREAD_CFLAGS "-D_REENTRANT -Kthread")
|
||||
@@ -1089,22 +1089,22 @@ endmacro()
|
||||
macro(CheckUSBHID)
|
||||
check_library_exists(usbhid hid_init "" LIBUSBHID)
|
||||
if(LIBUSBHID)
|
||||
check_include_file(usbhid.h HAVE_USBHID_H)
|
||||
check_include_files("stdint.h;usbhid.h" HAVE_USBHID_H)
|
||||
if(HAVE_USBHID_H)
|
||||
set(USB_CFLAGS "-DHAVE_USBHID_H")
|
||||
endif()
|
||||
|
||||
check_include_file(libusbhid.h HAVE_LIBUSBHID_H)
|
||||
check_include_files("stdint.h;libusbhid.h" HAVE_LIBUSBHID_H)
|
||||
if(HAVE_LIBUSBHID_H)
|
||||
set(USB_CFLAGS "${USB_CFLAGS} -DHAVE_LIBUSBHID_H")
|
||||
endif()
|
||||
set(USB_LIBS ${USB_LIBS} usbhid)
|
||||
else()
|
||||
check_include_file(usb.h HAVE_USB_H)
|
||||
check_include_files("stdint.h;usb.h" HAVE_USB_H)
|
||||
if(HAVE_USB_H)
|
||||
set(USB_CFLAGS "-DHAVE_USB_H")
|
||||
endif()
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H)
|
||||
check_include_files("stdint.h;libusb.h" HAVE_LIBUSB_H)
|
||||
if(HAVE_LIBUSB_H)
|
||||
set(USB_CFLAGS "${USB_CFLAGS} -DHAVE_LIBUSB_H")
|
||||
endif()
|
||||
|
||||
98
configure
vendored
98
configure
vendored
@@ -3515,7 +3515,7 @@ orig_CFLAGS="$CFLAGS"
|
||||
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=32
|
||||
SDL_MINOR_VERSION=33
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
@@ -10023,17 +10023,17 @@ _LT_EOF
|
||||
hardcode_minus_L=yes
|
||||
allow_undefined_flag=unsupported
|
||||
shrext_cmds=.dll
|
||||
archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_expsym_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -10042,7 +10042,6 @@ _LT_EOF
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
enable_shared_with_static_runtimes=yes
|
||||
file_list_spec='@'
|
||||
;;
|
||||
@@ -10885,17 +10884,17 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
|
||||
hardcode_minus_L=yes
|
||||
allow_undefined_flag=unsupported
|
||||
shrext_cmds=.dll
|
||||
archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_expsym_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -10904,7 +10903,6 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
enable_shared_with_static_runtimes=yes
|
||||
file_list_spec='@'
|
||||
;;
|
||||
@@ -14246,11 +14244,11 @@ if test x$ac_prog_cxx_stdcxx = xno
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
|
||||
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
|
||||
if test ${ac_cv_prog_cxx_11+y}
|
||||
if test ${ac_cv_prog_cxx_cxx11+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_cv_prog_cxx_11=no
|
||||
ac_cv_prog_cxx_cxx11=no
|
||||
ac_save_CXX=$CXX
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
@@ -14292,11 +14290,11 @@ if test x$ac_prog_cxx_stdcxx = xno
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
|
||||
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
|
||||
if test ${ac_cv_prog_cxx_98+y}
|
||||
if test ${ac_cv_prog_cxx_cxx98+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_cv_prog_cxx_98=no
|
||||
ac_cv_prog_cxx_cxx98=no
|
||||
ac_save_CXX=$CXX
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
@@ -15164,17 +15162,17 @@ fi
|
||||
hardcode_minus_L_CXX=yes
|
||||
allow_undefined_flag_CXX=unsupported
|
||||
shrext_cmds=.dll
|
||||
archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_cmds_CXX='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
$ECHO EXPORTS >> $output_objdir/$libname.def~
|
||||
archive_expsym_cmds_CXX='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
|
||||
echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
|
||||
echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
|
||||
echo EXPORTS >> $output_objdir/$libname.def~
|
||||
prefix_cmds="$SED"~
|
||||
if test EXPORTS = "`$SED 1q $export_symbols`"; then
|
||||
prefix_cmds="$prefix_cmds -e 1d";
|
||||
@@ -15183,7 +15181,6 @@ fi
|
||||
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
|
||||
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
old_archive_from_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
enable_shared_with_static_runtimes_CXX=yes
|
||||
file_list_spec_CXX='@'
|
||||
;;
|
||||
@@ -19260,13 +19257,15 @@ then :
|
||||
ac_cv_func_alloca_works=yes
|
||||
else $as_nop
|
||||
ac_cv_func_alloca_works=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
|
||||
printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_alloca_works = yes; then
|
||||
|
||||
@@ -19755,6 +19754,12 @@ if test "x$ac_cv_func_sigaction" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
|
||||
if test "x$ac_cv_func_sigtimedwait" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "setjmp" "ac_cv_func_setjmp"
|
||||
if test "x$ac_cv_func_setjmp" = xyes
|
||||
@@ -22422,7 +22427,6 @@ printf %s "checking for NAS audio support... " >&6; }
|
||||
have_nas=yes
|
||||
NAS_CFLAGS="-I/usr/X11R6/include/"
|
||||
NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
|
||||
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_nas" >&5
|
||||
@@ -28088,7 +28092,7 @@ printf %s "checking for usbhid... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -28134,7 +28138,7 @@ printf %s "checking for ucr_data member of usb_ctl_report... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -28181,7 +28185,7 @@ printf %s "checking for new usbhid API... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -28394,7 +28398,8 @@ fi
|
||||
|
||||
if test x$hidapi_support = xyes; then
|
||||
if test x$have_libusb_h = xyes; then
|
||||
printf "%s\n" "#define HAVE_LIBUSB 1" >>confdefs.h
|
||||
|
||||
printf "%s\n" "#define HAVE_LIBUSB 1" >>confdefs.h
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
if test x$require_hidapi_libusb = xyes; then
|
||||
@@ -28741,12 +28746,23 @@ printf "%s\n" "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
|
||||
if test x$enable_audio = xyes; then
|
||||
case $ARCH in
|
||||
sysv5|solaris|hpux)
|
||||
# Newer Solaris-based systems, like OpenIndiana, don't have this interface anymore. Check for the header first.
|
||||
ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_sys_audioio_h" = xyes
|
||||
then :
|
||||
have_sys_audioio_h=yes
|
||||
else $as_nop
|
||||
have_sys_audioio_h=no
|
||||
fi
|
||||
|
||||
if test x$have_sys_audioio_h = xyes; then
|
||||
|
||||
printf "%s\n" "#define SDL_AUDIO_DRIVER_SUNAUDIO 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} sun"
|
||||
have_audio=yes
|
||||
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} sun"
|
||||
have_audio=yes
|
||||
fi
|
||||
;;
|
||||
netbsd) # Don't use this on OpenBSD, it's busted.
|
||||
|
||||
|
||||
25
configure.ac
25
configure.ac
@@ -12,7 +12,7 @@ orig_CFLAGS="$CFLAGS"
|
||||
dnl Set various version strings - taken gratefully from the GTk sources
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=32
|
||||
SDL_MINOR_VERSION=33
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
@@ -359,7 +359,7 @@ dnl Checks for library functions.
|
||||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||
],[]),
|
||||
)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _Exit)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction sigtimedwait setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _Exit)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
@@ -1247,7 +1247,6 @@ CheckNAS()
|
||||
have_nas=yes
|
||||
NAS_CFLAGS="-I/usr/X11R6/include/"
|
||||
NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
|
||||
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($have_nas)
|
||||
@@ -3485,7 +3484,7 @@ CheckUSBHID()
|
||||
AC_MSG_CHECKING(for usbhid)
|
||||
have_usbhid=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -3514,7 +3513,7 @@ CheckUSBHID()
|
||||
AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
|
||||
have_usbhid_ucr_data=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -3544,7 +3543,7 @@ CheckUSBHID()
|
||||
AC_MSG_CHECKING(for new usbhid API)
|
||||
have_usbhid_new=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#if defined(HAVE_USB_H)
|
||||
#include <usb.h>
|
||||
#endif
|
||||
@@ -3636,7 +3635,7 @@ CheckHIDAPI()
|
||||
|
||||
if test x$hidapi_support = xyes; then
|
||||
if test x$have_libusb_h = xyes; then
|
||||
AC_DEFINE(HAVE_LIBUSB)
|
||||
AC_DEFINE(HAVE_LIBUSB, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
if test x$require_hidapi_libusb = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
@@ -3869,10 +3868,14 @@ case "$host" in
|
||||
if test x$enable_audio = xyes; then
|
||||
case $ARCH in
|
||||
sysv5|solaris|hpux)
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} sun"
|
||||
have_audio=yes
|
||||
# Newer Solaris-based systems, like OpenIndiana, don't have this interface anymore. Check for the header first.
|
||||
AC_CHECK_HEADER(sys/audioio.h, have_sys_audioio_h=yes, have_sys_audioio_h=no)
|
||||
if test x$have_sys_audioio_h = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} sun"
|
||||
have_audio=yes
|
||||
fi
|
||||
;;
|
||||
netbsd) # Don't use this on OpenBSD, it's busted.
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_NETBSD, 1, [ ])
|
||||
|
||||
@@ -4,5 +4,4 @@ Platforms
|
||||
We maintain the list of supported platforms on our wiki now, and how to
|
||||
build and install SDL for those platforms:
|
||||
|
||||
https://wiki.libsdl.org/Installation
|
||||
|
||||
https://wiki.libsdl.org/SDL2/Installation
|
||||
|
||||
@@ -11,7 +11,7 @@ Credit to
|
||||
## Building
|
||||
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/share/ps2dev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
@@ -19,6 +19,10 @@ cmake --install build
|
||||
## Hints
|
||||
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
|
||||
If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
|
||||
- `SDL_HINT_PS2_GS_WIDTH`: Width of the framebuffer. Defaults to 640.
|
||||
- `SDL_HINT_PS2_GS_HEIGHT`: Height of the framebuffer. Defaults to 448.
|
||||
- `SDL_HINT_PS2_GS_PROGRESSIVE`: Whether to use progressive, instead of interlaced. Defaults to 0.
|
||||
- `SDL_HINT_PS2_GS_MODE`: Regional standard of the signal. "NTSC" (60hz), "PAL" (50hz) or "" (the console's region, default).
|
||||
|
||||
## Notes
|
||||
If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
|
||||
|
||||
@@ -29,7 +29,7 @@ cmake --install build
|
||||
|
||||
|
||||
## Compiling a HelloWorld
|
||||
[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
|
||||
[PSP Hello World](https://pspdev.github.io/basic_programs.html#hello-world)
|
||||
|
||||
## To Do
|
||||
- PSP Screen Keyboard
|
||||
|
||||
@@ -14,7 +14,6 @@ Works out of box.
|
||||
Windows:
|
||||
Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com
|
||||
|
||||
===========================================================================
|
||||
Events
|
||||
===========================================================================
|
||||
SDL_FINGERDOWN:
|
||||
@@ -39,7 +38,6 @@ Fields:
|
||||
Same as SDL_FINGERDOWN.
|
||||
|
||||
|
||||
===========================================================================
|
||||
Functions
|
||||
===========================================================================
|
||||
SDL provides the ability to access the underlying SDL_Finger structures.
|
||||
@@ -76,7 +74,6 @@ A SDL_Finger has the following fields:
|
||||
The pressure of the touch.
|
||||
|
||||
|
||||
===========================================================================
|
||||
Notes
|
||||
===========================================================================
|
||||
For a complete example see test/testgesture.c
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -153,7 +153,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
|
||||
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, NULL, 0, NULL, NULL }; \
|
||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -648,7 +648,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
|
||||
* \param obtained an SDL_AudioSpec structure filled in with the actual output
|
||||
* format; see SDL_OpenAudio() for more information.
|
||||
* \param allowed_changes 0, or one or more flags OR'd together.
|
||||
* \returns a valid device ID that is > 0 on success or 0 on failure; call
|
||||
* \returns a valid device ID > 0 on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* For compatibility with SDL 1.2, this will never return 1, since
|
||||
@@ -1059,6 +1059,9 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *bu
|
||||
* resample correctly, so this number might be lower than what you expect, or
|
||||
* even be zero. Add more data or flush the stream if you need the data now.
|
||||
*
|
||||
* \param stream the audio stream to query.
|
||||
* \returns the number of bytes available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
@@ -1078,6 +1081,9 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
|
||||
* audio gaps in the output. Generally this is intended to signal the end of
|
||||
* input, so the complete output becomes available.
|
||||
*
|
||||
* \param stream the audio stream to flush.
|
||||
* \returns 0 on success, otherwise -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
@@ -1092,6 +1098,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
|
||||
/**
|
||||
* Clear any pending data in the stream without converting it
|
||||
*
|
||||
* \param stream the audio stream to clear.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
@@ -1106,6 +1114,8 @@ extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
||||
/**
|
||||
* Free an audio stream
|
||||
*
|
||||
* \param stream the audio stream to free.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -193,6 +193,7 @@
|
||||
#cmakedefine HAVE_MEMFD_CREATE 1
|
||||
#cmakedefine HAVE_POSIX_FALLOCATE 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SIGTIMEDWAIT 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
#cmakedefine HAVE_NANOSLEEP 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -195,6 +195,7 @@
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
#undef HAVE_SIGACTION
|
||||
#undef HAVE_SIGTIMEDWAIT
|
||||
#undef HAVE_SA_SIGACTION
|
||||
#undef HAVE_SETJMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
@@ -216,6 +217,7 @@
|
||||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -39,21 +39,19 @@
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#if defined(__clang__) && !_SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#ifndef __MMX__
|
||||
@@ -115,7 +113,8 @@ _m_prefetch(void *__P)
|
||||
#include <lasxintrin.h>
|
||||
#define __LASX__
|
||||
#endif
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) && \
|
||||
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86))
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -33,7 +33,7 @@
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
#ifdef __clang__
|
||||
#if defined(__clang__) && !_SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -226,6 +226,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
|
||||
/**
|
||||
* Get the mapping at a particular index.
|
||||
*
|
||||
* \param mapping_index mapping index.
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* the index is out of range.
|
||||
*
|
||||
@@ -850,6 +851,9 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga
|
||||
/**
|
||||
* Get the number of touchpads on a game controller.
|
||||
*
|
||||
* \param gamecontroller a controller.
|
||||
* \returns number of touchpads.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
|
||||
@@ -858,6 +862,10 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController
|
||||
* Get the number of supported simultaneous fingers on a touchpad on a game
|
||||
* controller.
|
||||
*
|
||||
* \param gamecontroller a controller.
|
||||
* \param touchpad a touchpad.
|
||||
* \returns number of supported simultaneous fingers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
|
||||
@@ -865,6 +873,15 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameCont
|
||||
/**
|
||||
* Get the current state of a finger on a touchpad on a game controller.
|
||||
*
|
||||
* \param gamecontroller a controller.
|
||||
* \param touchpad a touchpad.
|
||||
* \param finger a finger.
|
||||
* \param state a pointer filled with the finger state.
|
||||
* \param x a pointer filled with the x position.
|
||||
* \param y a pointer filled with the y position.
|
||||
* \param pressure a pointer filled with pressure value.
|
||||
* \returns 0 on success or negative on failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -227,6 +227,7 @@ extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id,
|
||||
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||
*
|
||||
* \param path The path name of the device to open.
|
||||
* \param bExclusive boolean exclusive.
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -827,6 +827,19 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for 8BitDo controllers
|
||||
* should be used.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": HIDAPI driver is not used.
|
||||
* - "1": HIDAPI driver is used.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO "SDL_JOYSTICK_HIDAPI_8BITDO"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for Nintendo GameCube
|
||||
* controllers should be used.
|
||||
@@ -1262,8 +1275,8 @@ extern "C" {
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* - "0": RAWINPUT drivers are not used
|
||||
* - "1": RAWINPUT drivers are used (the default)
|
||||
* - "0": RAWINPUT drivers are not used (the default)
|
||||
* - "1": RAWINPUT drivers are used
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
|
||||
|
||||
@@ -1423,6 +1436,27 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
|
||||
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices and their desired number of haptic
|
||||
* (force feedback) enabled axis.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs in
|
||||
* hexadecimal form plus the number of desired axes, e.g.
|
||||
*
|
||||
* `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
|
||||
*
|
||||
* This hint supports a "wildcard" device that will set the number of haptic
|
||||
* axes on all initialized haptic devices which were not defined explicitly in
|
||||
* this hint.
|
||||
*
|
||||
* `0xFFFF/0xFFFF/1`
|
||||
*
|
||||
* This hint should be set before a controller is opened. The number of haptic
|
||||
* axes won't exceed the number of real axes found on the device.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
|
||||
|
||||
/**
|
||||
* A variable controlling whether joysticks on Linux will always treat 'hat'
|
||||
* axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
|
||||
@@ -2003,6 +2037,37 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
|
||||
|
||||
/**
|
||||
* Variable controlling the width of the PS2's framebuffer in pixels
|
||||
*
|
||||
* By default, this variable is "640"
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH"
|
||||
|
||||
/**
|
||||
* Variable controlling the height of the PS2's framebuffer in pixels
|
||||
*
|
||||
* By default, this variable is "448"
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT"
|
||||
|
||||
/**
|
||||
* Variable controlling whether the signal is interlaced or progressive
|
||||
*
|
||||
* - "0": Image is interlaced. (default)
|
||||
* - "1": Image is progressive
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE"
|
||||
|
||||
/**
|
||||
* Variable controlling the video mode of the console
|
||||
*
|
||||
* - "": Console-native. (default)
|
||||
* - "NTSC": 60hz region
|
||||
* - "PAL": 50hz region
|
||||
*/
|
||||
#define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE"
|
||||
|
||||
/**
|
||||
* A variable controlling if VSYNC is automatically disable if doesn't reach
|
||||
* the enough FPS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -214,6 +214,9 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickPathForIndex(int device_index);
|
||||
* Get the player index of a joystick, or -1 if it's not available This can be
|
||||
* called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index device index.
|
||||
* \returns player index, or -1 if not available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
@@ -356,6 +359,10 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_ind
|
||||
/**
|
||||
* Attach a new virtual joystick.
|
||||
*
|
||||
* \param type joystick type.
|
||||
* \param naxes number of axes.
|
||||
* \param nbuttons number of buttons.
|
||||
* \param nhats number of hats.
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
@@ -409,6 +416,7 @@ typedef struct SDL_VirtualJoystickDesc
|
||||
/**
|
||||
* Attach a new virtual joystick with extended properties.
|
||||
*
|
||||
* \param desc joystick description.
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -49,7 +49,7 @@ typedef struct SDL_Keysym
|
||||
{
|
||||
SDL_Scancode scancode; /**< SDL physical key code - see SDL_Scancode for details */
|
||||
SDL_Keycode sym; /**< SDL virtual key code - see SDL_Keycode for details */
|
||||
Uint16 mod; /**< current key modifiers */
|
||||
Uint16 mod; /**< current key modifiers - see SDL_Keymod for details */
|
||||
Uint32 unused;
|
||||
} SDL_Keysym;
|
||||
|
||||
@@ -255,7 +255,7 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
|
||||
* On some platforms using this function activates the screen keyboard.
|
||||
*
|
||||
* On desktop platforms, SDL_StartTextInput() is implicitly called on SDL
|
||||
* window creation which will cause events SDL_TextInputEvent and
|
||||
* video subsystem initialization which will cause SDL_TextInputEvent and
|
||||
* SDL_TextEditingEvent to begin emitting.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
@@ -298,6 +298,9 @@ extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
|
||||
/**
|
||||
* Returns if an IME Composite or Candidate window is currently shown.
|
||||
*
|
||||
* \returns SDL_TRUE if an IME Composite or Candidate window is currently
|
||||
* shown else SDL_FALSE.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -41,12 +41,18 @@
|
||||
*
|
||||
* A special exception is the number keys at the top of the keyboard which map
|
||||
* to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||
*
|
||||
* The actual values that might be set for this type are listed in the
|
||||
* SDL_KeyCode (capital C) enumeration.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
/**
|
||||
* The possible values for keycodes.
|
||||
*/
|
||||
typedef enum SDL_KeyCode
|
||||
{
|
||||
SDLK_UNKNOWN = 0,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -163,8 +163,7 @@ extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
|
||||
/**
|
||||
* Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
|
||||
*
|
||||
* = * \param fmt a printf() style message format string
|
||||
*
|
||||
* \param fmt a printf() style message format string.
|
||||
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||
* any.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -187,8 +187,8 @@ extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
||||
* \param name the window class name, in UTF-8 encoding. If NULL, SDL
|
||||
* currently uses "SDL_app" but this isn't guaranteed.
|
||||
* \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
|
||||
* currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
|
||||
* what is specified here.
|
||||
* currently uses `(CS_BYTEALIGNCLIENT \| CS_OWNDC)` regardless
|
||||
* of what is specified here.
|
||||
* \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
|
||||
* will use `GetModuleHandle(NULL)` instead.
|
||||
* \returns 0 on success, -1 on error. SDL_GetError() may have details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -59,6 +59,9 @@ typedef void *SDL_MetalView;
|
||||
* The returned handle can be casted directly to a NSView or UIView. To access
|
||||
* the backing CAMetalLayer, call SDL_Metal_GetLayer().
|
||||
*
|
||||
* \param window the window.
|
||||
* \returns handle NSView or UIView.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_Metal_DestroyView
|
||||
@@ -72,6 +75,8 @@ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
||||
* This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
|
||||
* called after SDL_CreateWindow.
|
||||
*
|
||||
* \param view the SDL_MetalView object.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_Metal_CreateView
|
||||
@@ -81,6 +86,9 @@ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||
/**
|
||||
* Get a pointer to the backing CAMetalLayer for the given view.
|
||||
*
|
||||
* \param view the SDL_MetalView object.
|
||||
* \returns a pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_Metal_CreateView
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -106,6 +106,10 @@ typedef struct SDL_FRect
|
||||
|
||||
/**
|
||||
* Returns true if point resides inside a rectangle.
|
||||
*
|
||||
* \param p the point to test.
|
||||
* \param r the rectangle to test.
|
||||
* \returns SDL_TRUE if `p` is contained by `r`, SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
|
||||
{
|
||||
@@ -115,6 +119,9 @@ SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
|
||||
|
||||
/**
|
||||
* Returns true if the rectangle has no area.
|
||||
*
|
||||
* \param r the rectangle to test.
|
||||
* \returns SDL_TRUE if the rectangle is "empty", SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
|
||||
{
|
||||
@@ -123,6 +130,10 @@ SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
|
||||
|
||||
/**
|
||||
* Returns true if the two rectangles are equal.
|
||||
*
|
||||
* \param a the first rectangle to test.
|
||||
* \param b the second rectangle to test.
|
||||
* \returns SDL_TRUE if the rectangles are equal, SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
|
||||
{
|
||||
@@ -229,6 +240,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
||||
|
||||
/**
|
||||
* Returns true if point resides inside a rectangle.
|
||||
*
|
||||
* \param p the point to test.
|
||||
* \param r the rectangle to test.
|
||||
* \returns SDL_TRUE if `p` is contained by `r`, SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
|
||||
{
|
||||
@@ -238,6 +253,9 @@ SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect
|
||||
|
||||
/**
|
||||
* Returns true if the rectangle has no area.
|
||||
*
|
||||
* \param r the rectangle to test.
|
||||
* \returns SDL_TRUE if the rectangle is "empty", SDL_FALSE otherwise.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
|
||||
{
|
||||
@@ -247,6 +265,11 @@ SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
|
||||
/**
|
||||
* Returns true if the two rectangles are equal, within some given epsilon.
|
||||
*
|
||||
* \param a the first rectangle to test.
|
||||
* \param b the second rectangle to test.
|
||||
* \param epsilon the epsilon value for comparison.
|
||||
* \returns SDL_TRUE if the rectangles are equal, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
|
||||
@@ -262,6 +285,10 @@ SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_F
|
||||
/**
|
||||
* Returns true if the two rectangles are equal, using a default epsilon.
|
||||
*
|
||||
* \param a the first rectangle to test.
|
||||
* \param b the second rectangle to test.
|
||||
* \returns SDL_TRUE if the rectangles are equal, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -30,6 +30,7 @@
|
||||
* - single pixel lines
|
||||
* - filled rectangles
|
||||
* - texture images
|
||||
* - 2D polygons
|
||||
*
|
||||
* The primitives may be drawn in opaque, blended, or additive modes.
|
||||
*
|
||||
@@ -38,7 +39,7 @@
|
||||
* may also be stretched with linear interpolation.
|
||||
*
|
||||
* This API is designed to accelerate simple 2D operations. You may want more
|
||||
* functionality such as polygons and particle effects and in that case you
|
||||
* functionality such as 3D polygons and particle effects and in that case you
|
||||
* should use SDL's OpenGL/Direct3D support or one of the many good 3D
|
||||
* engines.
|
||||
*
|
||||
@@ -244,7 +245,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_CreateRenderer
|
||||
* \sa SDL_CreateWindowRenderer
|
||||
* \sa SDL_CreateWindowAndRenderer
|
||||
* \sa SDL_DestroyRenderer
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
|
||||
@@ -787,7 +788,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
|
||||
* Get the current render target.
|
||||
*
|
||||
* The default render target is the window for which the renderer was created,
|
||||
* and is reported a NULL here.
|
||||
* and is reported as NULL here.
|
||||
*
|
||||
* \param renderer the rendering context.
|
||||
* \returns the current render target or NULL for the default render target.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -467,6 +467,11 @@ typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
/**
|
||||
* Get the original set of SDL memory functions
|
||||
*
|
||||
* \param malloc_func filled with malloc function.
|
||||
* \param calloc_func filled with calloc function.
|
||||
* \param realloc_func filled with realloc function.
|
||||
* \param free_func filled with free function.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
@@ -477,6 +482,11 @@ extern DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func *mal
|
||||
/**
|
||||
* Get the current set of SDL memory functions
|
||||
*
|
||||
* \param malloc_func filled with malloc function.
|
||||
* \param calloc_func filled with calloc function.
|
||||
* \param realloc_func filled with realloc function.
|
||||
* \param free_func filled with free function.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
@@ -487,6 +497,13 @@ extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func
|
||||
/**
|
||||
* Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \param malloc_func custom malloc function.
|
||||
* \param calloc_func custom calloc function.
|
||||
* \param realloc_func custom realloc function.
|
||||
* \param free_func custom free function.
|
||||
* \returns 0 on success or -1 on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
@@ -497,6 +514,8 @@ extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
/**
|
||||
* Get the number of outstanding (unfreed) allocations
|
||||
*
|
||||
* \returns number of unfreed allocations.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
@@ -565,6 +584,7 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
return;
|
||||
}
|
||||
switch (dwords % 4) {
|
||||
default:
|
||||
case 0: do { *_p++ = _val; SDL_FALLTHROUGH;
|
||||
case 3: *_p++ = _val; SDL_FALLTHROUGH;
|
||||
case 2: *_p++ = _val; SDL_FALLTHROUGH;
|
||||
@@ -715,6 +735,12 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
||||
* This function converts a buffer or string between encodings in one pass,
|
||||
* returning a string that must be freed with SDL_free() or NULL on error.
|
||||
*
|
||||
* \param tocode the character encoding of the output string.
|
||||
* \param fromcode the character encoding of data in `inbuf`.
|
||||
* \param inbuf the string to convert to a different encoding.
|
||||
* \param inbytesleft the size of the input string _in bytes_.
|
||||
* \returns a new string, converted to the new encoding, or NULL on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
||||
@@ -750,8 +776,12 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
|
||||
size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
|
||||
/* not for windows: might conflict with string.h where strdup may have
|
||||
* dllimport attribute: https://github.com/libsdl-org/SDL/issues/12948 */
|
||||
char *strdup(const char *str);
|
||||
#endif
|
||||
|
||||
/* Starting LLVM 16, the analyser errors out if these functions do not have
|
||||
their prototype defined (clang-diagnostic-implicit-function-declaration) */
|
||||
@@ -802,6 +832,11 @@ SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_B
|
||||
*
|
||||
* Otherwise store a * b via ret and return 0.
|
||||
*
|
||||
* \param a the multiplicand.
|
||||
* \param b the multiplier.
|
||||
* \param ret on non-overflow output, stores the multiplication result.
|
||||
* \returns -1 on overflow, 0 if result is multiplied without overflow.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int SDL_size_mul_overflow (size_t a,
|
||||
@@ -833,6 +868,11 @@ SDL_FORCE_INLINE int _SDL_size_mul_overflow_builtin (size_t a,
|
||||
*
|
||||
* Otherwise store a + b via ret and return 0.
|
||||
*
|
||||
* \param a the first addend.
|
||||
* \param b the second addend.
|
||||
* \param ret on non-overflow output, stores the addition result.
|
||||
* \returns false on overflow, true if result is added without overflow.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int SDL_size_add_overflow (size_t a,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -801,15 +801,14 @@ extern DECLSPEC int SDLCALL SDL_FillRect
|
||||
extern DECLSPEC int SDLCALL SDL_FillRects
|
||||
(SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
|
||||
|
||||
/* !!! FIXME: merge this documentation with the wiki */
|
||||
|
||||
/**
|
||||
* Performs a fast blit from the source surface to the destination surface.
|
||||
*
|
||||
* This assumes that the source and destination rectangles are the same size.
|
||||
* If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or
|
||||
* `dst`) is copied. The final blit rectangles are saved in `srcrect` and
|
||||
* `dstrect` after all clipping is performed.
|
||||
* `dstrect`'s width and height are ignored, only its position is used. If
|
||||
* either `srcrect` or `dstrect` are NULL, the entire surface (`src` or `dst`)
|
||||
* is copied. The final blit rectangle is saved in `dstrect` after all
|
||||
* clipping is performed.
|
||||
*
|
||||
* The blit function should not be called on a locked surface.
|
||||
*
|
||||
@@ -859,7 +858,17 @@ extern DECLSPEC int SDLCALL SDL_FillRects
|
||||
* You should call SDL_BlitSurface() unless you know exactly how SDL blitting
|
||||
* works internally and how to use the other blit functions.
|
||||
*
|
||||
* \returns 0 if the blit is successful, otherwise it returns -1.
|
||||
* \param src the SDL_Surface structure to be copied from.
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
* copied, or NULL to copy the entire surface.
|
||||
* \param dst the SDL_Surface structure that is the blit target.
|
||||
* \param dstrect the SDL_Rect structure representing the x and y position in
|
||||
* the destination surface, or NULL for (0,0). The width and
|
||||
* height are ignored, and are copied from `srcrect`. If you
|
||||
* want a specific width and height, you should use
|
||||
* SDL_BlitScaled().
|
||||
* \returns 0 if the blit is successful or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*/
|
||||
#define SDL_BlitSurface SDL_UpperBlit
|
||||
|
||||
@@ -869,6 +878,18 @@ extern DECLSPEC int SDLCALL SDL_FillRects
|
||||
* SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
|
||||
* macro for this function with a less confusing name.
|
||||
*
|
||||
* \param src the SDL_Surface structure to be copied from.
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
* copied, or NULL to copy the entire surface.
|
||||
* \param dst the SDL_Surface structure that is the blit target.
|
||||
* \param dstrect the SDL_Rect structure representing the x and y position in
|
||||
* the destination surface, or NULL for (0,0). The width and
|
||||
* height are ignored, and are copied from `srcrect`. If you
|
||||
* want a specific width and height, you should use
|
||||
* SDL_BlitScaled().
|
||||
* \returns 0 if the blit is successful or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
@@ -910,6 +931,13 @@ extern DECLSPEC int SDLCALL SDL_LowerBlit
|
||||
*
|
||||
* Please use SDL_BlitScaled() instead.
|
||||
*
|
||||
* \param src the surface to be copied from.
|
||||
* \param srcrect the rectangle to be copied.
|
||||
* \param dst the surface that is the blit target.
|
||||
* \param dstrect the rectangle that is copied into.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
|
||||
@@ -920,6 +948,13 @@ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
|
||||
/**
|
||||
* Perform bilinear scaling between two surfaces of the same format, 32BPP.
|
||||
*
|
||||
* \param src the surface to be copied from.
|
||||
* \param srcrect the rectangle to be copied.
|
||||
* \param dst the surface that is the blit target.
|
||||
* \param dstrect the rectangle that is copied into.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
|
||||
@@ -934,6 +969,15 @@ extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
|
||||
* SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
|
||||
* merely a macro for this function with a less confusing name.
|
||||
*
|
||||
* \param src the SDL_Surface structure to be copied from.
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
* copied, or NULL to copy the entire surface.
|
||||
* \param dst the SDL_Surface structure that is the blit target.
|
||||
* \param dstrect the SDL_Rect structure representing the rectangle that is
|
||||
* copied into, or NULL to copy into the entire surface.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_BlitScaled
|
||||
@@ -971,6 +1015,8 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
||||
/**
|
||||
* Set the YUV conversion mode
|
||||
*
|
||||
* \param mode the YUV conversion mode.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.8.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
|
||||
@@ -978,6 +1024,8 @@ extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mo
|
||||
/**
|
||||
* Get the YUV conversion mode
|
||||
*
|
||||
* \returns YUV conversion mode.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.8.
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||
@@ -986,6 +1034,10 @@ extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||
* Get the YUV conversion mode, returning the correct mode for the resolution
|
||||
* when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||
*
|
||||
* \param width the resolution width.
|
||||
* \param height the resolution height.
|
||||
* \returns YUV conversion mode.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.8.
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 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
|
||||
@@ -463,6 +463,7 @@ extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int durati
|
||||
*
|
||||
* \param command user command that must be greater or equal to 0x8000.
|
||||
* \param param user parameter.
|
||||
* \returns 0 on success, otherwise -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
@@ -571,6 +572,26 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT
|
||||
*/
|
||||
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
|
||||
|
||||
/**
|
||||
* Get the protocol activation URI if the app was launched via protocol
|
||||
* activation.
|
||||
*
|
||||
* When a UWP/WinRT app is launched via a custom URI scheme (e.g.,
|
||||
* myapp://action?param=value), this function retrieves the full activation
|
||||
* URI string.
|
||||
*
|
||||
* The URI is only available once per activation - after the first successful
|
||||
* call, subsequent calls will return NULL. This ensures the URI is processed
|
||||
* only once.
|
||||
*
|
||||
* \returns the protocol activation URI as a UTF-8 string that must be freed
|
||||
* with SDL_free(), or NULL if the app was not activated via protocol
|
||||
* or the URI was already retrieved.
|
||||
*
|
||||
* \since This function is available since SDL 2.33.0.
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_WinRTGetProtocolActivationURI(void);
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user