Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Thirdparty: Sync docs and patches with actual vendored state

Rémi Verschelde58dd22b7aa04
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 97edad6b062..e06a6484ae1 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,8 +5,7 @@ exclude: |
(?x)^(
.*thirdparty/.*|
.*-(dll|dylib|so)_wrap\.[ch]|
- platform/android/java/editor/src/main/java/com/android/.*|
- platform/android/java/lib/src/main/java/com/google/.*
+ platform/android/java/editor/src/main/java/com/android/.*
)$
repos:
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index b18c237d4b2..7e34a6e94c2 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -124,12 +124,8 @@ Copyright: 2020, Manuel Prandini
License: Expat
Files: platform/android/java/editor/src/main/java/com/android/*
- platform/android/java/lib/src/main/aidl/com/android/*
- platform/android/java/lib/src/main/res/layout/status_bar_ongoing_event_progress_bar.xml
- platform/android/java/lib/src/main/java/com/google/android/*
Comment: The Android Open Source Project
-Copyright: 2008-2016, The Android Open Source Project
- 2002, Google, Inc.
+Copyright: 2016-2020, The Android Open Source Project
License: Apache-2.0
Files: platform/android/java/lib/src/main/java/org/godotengine/godot/utils/ProcessPhoenix.java
@@ -245,7 +241,7 @@ License: Expat
Files: thirdparty/d3d12ma/*
Comment: D3D12 Memory Allocator
-Copyright: 2019-2022 Advanced Micro Devices, Inc.
+Copyright: 2019-2026, Advanced Micro Devices, Inc.
License: Expat
Files: thirdparty/directx_headers/*
@@ -310,7 +306,7 @@ License: OFL-1.1
Files: thirdparty/freetype/*
Comment: The FreeType Project
-Copyright: 1996-2025, David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright: 1996-2026, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL
Files: thirdparty/gamepadmotionhelpers/*
@@ -327,8 +323,8 @@ License: CC0-1.0 and Apache-2.0
Files: thirdparty/glslang/*
Comment: glslang
Copyright: 2015-2020, Google, Inc.
- 2014-2020, The Khronos Group Inc
- 2002, NVIDIA Corporation.
+ 2014-2020, The Khronos Group Inc
+ 2002, NVIDIA Corporation.
License: glslang
Files: thirdparty/graphite/*
@@ -365,7 +361,7 @@ License: HarfBuzz
Files: thirdparty/icu4c/*
Comment: International Components for Unicode
-Copyright: 2016-2024, Unicode, Inc.
+Copyright: 1991-2026, Unicode, Inc.
License: Unicode
Files: thirdparty/jolt_physics/*
@@ -412,7 +408,7 @@ License: BSD-3-clause
Files: thirdparty/libvorbis/*
Comment: OggVorbis
-Copyright: 2002-2015, Xiph.org Foundation
+Copyright: 2002-2020, Xiph.org Foundation
License: BSD-3-clause
Files: thirdparty/libwebp/*
@@ -460,7 +456,7 @@ License: Zlib
Files: thirdparty/misc/bcdec.h
Comment: bcdec
Copyright: 2022, Sergii Kudlai
-License: Expat
+License: Unlicense or Expat
Files: thirdparty/misc/cubemap_coeffs.h
Comment: Fast Filtering of Reflection Probes
@@ -557,15 +553,21 @@ License: Expat
Files: thirdparty/openxr/*
Comment: OpenXR Loader
-Copyright: 2020-2025, The Khronos Group Inc.
+Copyright: 2020-2026, The Khronos Group Inc.
License: Apache-2.0
Files: thirdparty/pcre2/*
Comment: PCRE2
-Copyright: 1997-2024, University of Cambridge
+Copyright: 1997-2007, University of Cambridge
+ 2007-2024, Philip Hazel
2009-2024, Zoltan Herczeg
License: BSD-3-clause
+Files: thirdparty/re-spirv/*
+Comment: re-spirv
+Copyright: 2024, renderbag and contributors
+License: Expat
+
Files: thirdparty/recastnavigation/*
Comment: Recast
Copyright: 2009, Mikko Mononen
@@ -578,7 +580,7 @@ License: Apache-2.0
Files: thirdparty/sdl/*
Comment: SDL
-Copyright: 1997-2025, Sam Lantinga
+Copyright: 1997-2026, Sam Lantinga
License: Zlib
Files: thirdparty/sdl/hidapi/*
@@ -614,7 +616,7 @@ License: Expat
Files: thirdparty/tinyexr/*
Comment: TinyEXR
Copyright: 2014-2021, Syoyo Fujita
- 2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
+ 2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
License: BSD-3-clause
Files: thirdparty/ufbx/*
@@ -625,7 +627,7 @@ License: Expat
Files: thirdparty/vhacd/*
Comment: V-HACD
Copyright: 2011, Khaled Mamou
- 2003-2009, Erwin Coumans
+ 2003-2009, Erwin Coumans
License: BSD-3-clause
Files: thirdparty/volk/*
@@ -636,8 +638,8 @@ License: Expat
Files: thirdparty/vulkan/*
Comment: Vulkan Headers
Copyright: 2015-2025, The Khronos Group Inc.
- 2015-2025, Valve Corporation
- 2015-2025, LunarG, Inc.
+ 2015-2025, Valve Corporation
+ 2015-2025, LunarG, Inc.
License: Apache-2.0
Files: thirdparty/vulkan/vk_mem_alloc.h
@@ -648,27 +650,27 @@ License: Expat
Files: thirdparty/wayland/*
Comment: Wayland core protocol
Copyright: 2008-2012, Kristian Høgsberg
- 2010-2012, Intel Corporation
- 2011, Benjamin Franzke
- 2012, Collabora, Ltd.
+ 2010-2012, Intel Corporation
+ 2011, Benjamin Franzke
+ 2012, Collabora, Ltd.
License: Expat
Files: thirdparty/wayland-protocols/*
Comment: Wayland protocols
Copyright: 2008-2013, Kristian Høgsberg
- 2010-2013, Intel Corporation
- 2013, Rafael Antognolli
- 2013, Jasper St. Pierre
- 2014, Jonas Ådahl
- 2014, Jason Ekstrand
- 2014-2015, Collabora, Ltd.
- 2015, Red Hat Inc.
+ 2010-2013, Intel Corporation
+ 2013, Rafael Antognolli
+ 2013, Jasper St. Pierre
+ 2014, Jonas Ådahl
+ 2014, Jason Ekstrand
+ 2014-2015, Collabora, Ltd.
+ 2015, Red Hat Inc.
License: Expat
Files: thirdparty/wayland-protocols/mesa/wayland-drm.xml
Comment: Mesa Wayland protocols
Copyright: 2008-2011, Kristian Høgsberg
- 2010-2011, Intel Corporation
+ 2010-2011, Intel Corporation
License: X11
Files: thirdparty/wslay/*
@@ -679,8 +681,8 @@ License: Expat
Files: thirdparty/xatlas/*
Comment: xatlas
Copyright: 2018-2020, Jonathan Young
- 2013, Thekla, Inc
- 2006, NVIDIA Corporation, Ignacio Castano
+ 2013, Thekla, Inc
+ 2006, NVIDIA Corporation, Ignacio Castano
License: Expat
Files: thirdparty/zlib/*
@@ -2280,39 +2282,45 @@ License: OFL-1.1
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE.
License: Unicode
- COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
- .
- Copyright (C) 1991-2020 Unicode, Inc. All rights reserved.
- Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
- .
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of the Unicode data files and any associated documentation
- (the "Data Files") or Unicode software and any associated documentation
- (the "Software") to deal in the Data Files or Software
- without restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, and/or sell copies of
- the Data Files or Software, and to permit persons to whom the Data Files
- or Software are furnished to do so, provided that either
- (a) this copyright and permission notice appear with all copies
- of the Data Files or Software, or
- (b) this copyright and permission notice appear in associated
- Documentation.
- .
- THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT OF THIRD PARTY RIGHTS.
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
- NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
- DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THE DATA FILES OR SOFTWARE.
- .
- Except as contained in this notice, the name of a copyright holder
- shall not be used in advertising or otherwise to promote the sale,
- use or other dealings in these Data Files or Software without prior
- written authorization of the copyright holder.
+ UNICODE LICENSE V3
+ .
+ COPYRIGHT AND PERMISSION NOTICE
+ .
+ Copyright © 1991-2026 Unicode, Inc.
+ .
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of data files and any associated documentation (the "Data Files") or
+ software and any associated documentation (the "Software") to deal in the
+ Data Files or Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
+ copies of the Data Files or Software, and to permit persons to whom the
+ Data Files or Software are furnished to do so, provided that either (a)
+ this copyright and permission notice appear with all copies of the Data
+ Files or Software, or (b) this copyright and permission notice appear in
+ associated Documentation.
+ .
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ THIRD PARTY RIGHTS.
+ .
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+ FILES OR SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall
+ not be used in advertising or otherwise to promote the sale, use or other
+ dealings in these Data Files or Software without prior written
+ authorization of the copyright holder.
License: Unlicense
This is free and unencumbered software released into the public domain.
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 54d7228e0b8..3ce5f61d967 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -13,7 +13,7 @@ readability.
Files extracted from upstream source:
-- `accesskit.h`
+- `include/accesskit.h`
- `LICENSE-MIT`
@@ -45,6 +45,9 @@ Patches:
- `0001-build-fixes.patch` ([GH-81197](https://github.com/godotengine/godot/pull/81197))
- `0002-godot-fsr2-options.patch` ([GH-81197](https://github.com/godotengine/godot/pull/81197))
+- `0003-storage-format-fix.patch` ([GH-119342](https://github.com/godotengine/godot/pull/119342))
+- `0004-remove-unused-srv-binding.patch` ([GH-84976](https://github.com/godotengine/godot/pull/84976))
+- `0005-missing-force16-includes.patch` ([GH-125150](https://github.com/godotengine/godot/pull/125150))
## angle
@@ -55,15 +58,14 @@ Patches:
Files extracted from upstream source:
-- `include/EGL/*`
-- `include/KHR/*`
+- `include/EGL/` and `include/KHR/`
- `LICENSE`
## astcenc
- Upstream: https://github.com/ARM-software/astc-encoder
-- Version: 5.3.0 (bf32abd05eccaf3042170b2a85cebdf0bfee5873, 2025)
+- Version: 5.3.0 (30aabb3f42406df45a910d8496f9bee17eeba9bb, 2025)
- License: Apache 2.0
Files extracted from upstream source:
@@ -91,7 +93,7 @@ Patches:
- `0003-remove-tinydds-qoi.patch` ([GH-97582](https://github.com/godotengine/godot/pull/97582))
- `0004-clang-warning-exclude.patch` ([GH-111346](https://github.com/godotengine/godot/pull/111346))
- `0005-unused-typedef.patch` ([GH-111445](https://github.com/godotengine/godot/pull/111445))
-- `0006-explicit-includes.patch` ([GH-111557](https://github.com/godotengine/godot/pull/111557))
+- `0006-explicit-includes.patch` ([GH-111767](https://github.com/godotengine/godot/pull/111767))
## brotli
@@ -109,7 +111,7 @@ Files extracted from upstream source:
## certs
-- Upstream: Mozilla, via https://github.com/bagder/ca-bundle
+- Upstream: https://github.com/bagder/ca-bundle
- Version: git (c4d4f0b9ed23c6ef1d19ad2565598cf0c2b24112, 2026)
- License: MPL 2.0
@@ -126,13 +128,13 @@ Files extracted from upstream source:
Files extracted from upstream source:
-- `CPP/Clipper2Lib/` folder (in root)
+- `CPP/Clipper2Lib/` folder
- `LICENSE`
Patches:
- `0001-disable-exceptions.patch` ([GH-80796](https://github.com/godotengine/godot/pull/80796))
-- `0002-llvm-21-header.patch` ([GH-113850](https://github.com/godotengine/godot/pull/113850))
+- `0002-llvm-21-header.patch` ([GH-113857](https://github.com/godotengine/godot/pull/113857))
## cvtt
@@ -171,7 +173,7 @@ Patches:
## directx_headers
- Upstream: https://github.com/microsoft/DirectX-Headers
-- Version: main (25411c74bb9cc7c416b2ff01b3ad8a306811dfdd, 2025)
+- Version: git (25411c74bb9cc7c416b2ff01b3ad8a306811dfdd, 2025)
- License: MIT
Files extracted from upstream source:
@@ -193,7 +195,7 @@ Patches:
Files extracted from upstream source:
-- `doctest/doctest.h` as `doctest.h`
+- `doctest/doctest.h`
- `LICENSE.txt`
@@ -231,7 +233,7 @@ Patches:
- `0003-emscripten-nthreads.patch` ([GH-69799](https://github.com/godotengine/godot/pull/69799))
- `0004-mingw-no-cpuidex.patch` ([GH-92488](https://github.com/godotengine/godot/pull/92488))
- `0005-mingw-llvm-arm64.patch` ([GH-93364](https://github.com/godotengine/godot/pull/93364))
-- `0006-explicit-includes.patch` ([GH-111557](https://github.com/godotengine/godot/pull/111557))
+- `0006-explicit-includes.patch` ([GH-111767](https://github.com/godotengine/godot/pull/111767))
The `modules/raycast/godot_update_embree.py` script can be used to pull the
relevant files from the latest Embree release and apply patches automatically.
@@ -246,7 +248,7 @@ relevant files from the latest Embree release and apply patches automatically.
Files extracted from upstream source:
- All `.c` files in the main directory (except `unix.c` and `win32.c`)
-- The `include/enet/` folder as `enet/` (except `unix.h` and `win32.h`)
+- The `include/enet/` folder (except `unix.h` and `win32.h`)
- `LICENSE` file
- Added 3 files `enet_godot.cpp`, `enet/enet_godot.h`, and `enet/enet_godot_ext.h`,
providing ENet socket implementation using Godot classes, allowing IPv6 and DTLS.
@@ -272,7 +274,7 @@ Files extracted from upstream source:
Dither.{cpp,hpp} ForceInline.hpp Math.hpp ProcessCommon.hpp ProcessRGB.{cpp,hpp}
ProcessDxtc.{cpp,hpp} Tables.{cpp,hpp} Vector.hpp
```
-- The files `DecodeRGB.{cpp.hpp}` are based on the code from the original repository.
+- The files `DecodeRGB.{cpp,hpp}` are based on the code from the original repository.
- `AUTHORS.txt` and `LICENSE.txt`
Patches:
@@ -282,9 +284,13 @@ Patches:
## fonts
-- `DroidSans*.woff2`:
+- `DroidSansFallback.woff2`:
* Upstream: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/
- * Version: ? (pre-2014 commit when DroidSansJapanese.ttf was obsoleted)
+ * Version: 2.31 (97be1549ce65e01584483aec6b0b40537605db4d, 2010)
+ * License: Apache 2.0
+- `DroidSansJapanese.woff2`:
+ * Upstream: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/
+ * Version: 1.20 (3a084af2e90849aaa8beb3a610189e3399c63ea0, 2012)
* License: Apache 2.0
- `Inter*.woff2`:
* Upstream: https://github.com/rsms/inter
@@ -308,7 +314,7 @@ Patches:
* License: OFL-1.1
- `NotoSansHebrew*.woff2`:
* Upstream: https://github.com/notofonts/hebrew
- * Version: 3.001 (caa7ab0614fb5b37cc003d9bf3d7d3e765331110, 2024)
+ * Version: 3.001 (036f3206f67caac235cf8546a7751d3440771a7e, 2024)
* License: OFL-1.1
- `NotoSansMalayalam*.woff2`:
* Upstream: https://github.com/notofonts/malayalam
@@ -368,18 +374,19 @@ Files extracted from upstream source:
## gamepadmotionhelpers
- Upstream: https://github.com/JibbSmart/GamepadMotionHelpers
-- Version: 39b578aacf34c3a1c584d8f7f194adc776f88055, 2023
+- Version: git (39b578aacf34c3a1c584d8f7f194adc776f88055, 2023)
- License: MIT
Files extracted from upstream source:
- `GamepadMotion.hpp`
-- `LICENSE.TXT`
+- `LICENSE`
Patches:
- `0001-fix-warnings.patch` ([GH-111679](https://github.com/godotengine/godot/pull/111679))
+
## glad
- Upstream: https://github.com/Dav1dde/glad
@@ -432,7 +439,7 @@ Files extracted from upstream source:
Patches:
- `0001-apple-disable-absolute-paths.patch` ([GH-92010](https://github.com/godotengine/godot/pull/92010))
-- `0002-apple-m1-msaa-fix.patch` ([GH-115893](https://github.com/godotengine/godot/issues/115893))
+- `0002-apple-m1-msaa-fix.patch` ([GH-116225](https://github.com/godotengine/godot/pull/116225))
- `0003-preprocessor-token-name-memcpy.patch` ([GH-123319](https://github.com/godotengine/godot/pull/123319))
@@ -459,6 +466,8 @@ Files extracted from upstream source:
- The `src/to_chars.cpp` file renamed to `grisu2.h` and slightly modified.
+`LICENSE` and `README.md` are Godot files and should be preserved on updates.
+
Patches:
- `0001-godot-changes.patch` ([GH-98750](https://github.com/godotengine/godot/pull/98750))
@@ -486,7 +495,8 @@ Files extracted from upstream source:
Files extracted from upstream source:
-- The `common` folder
+- The `common` folder, except `BUILD.bazel`, `Makefile.in`, `common.rc`,
+ `common*.vcxproj*`, `rbbicst.pl`, `rbbirpt.txt` and `sources.txt`
- `scriptset.*`, `ucln_in.*`, `uspoof.cpp` and `uspoof_impl.*` from the `i18n` folder
- `uspoof.h` from the `i18n/unicode` folder
- `LICENSE`
@@ -524,7 +534,7 @@ Files extracted from upstream source:
Patches:
-- `0001-backport-upstream-commit-63f2f57.patch` (GH-121974)
+- `0001-backport-upstream-commit-63f2f57.patch` ([GH-121974](https://github.com/godotengine/godot/pull/121974))
## libbacktrace
@@ -540,6 +550,11 @@ Files extracted from upstream source:
* `elf.c`, `macho.c`, `mmap.c`, `mmapio.c`, `nounwind.c`, `unknown.c`, `xcoff.c`
- `LICENSE`
+Files generated from upstream source:
+
+- `backtrace-supported.h` and `config.h`, generated by running `configure`
+ for a MinGW (Windows) target
+
Patches:
- `0001-big-files-support.patch` ([GH-100281](https://github.com/godotengine/godot/pull/100281))
@@ -576,8 +591,8 @@ Files extracted from upstream source:
- `LICENSE.md`
- `include/` minus `.clang-format`
-- `external/dfdutils/LICENSE.adoc` as `LICENSE.dfdutils.adoc` (in root)
-- `external/dfdutils/LICENSES/Apache-2.0.txt` as `Apache-2.0.txt` (in root)
+- `external/dfdutils/LICENSE.adoc` as `LICENSE.dfdutils.adoc`
+- `external/dfdutils/LICENSES/Apache-2.0.txt`
- `external/dfdutils/{KHR/,dfd.h,colourspaces.c,createdfd.c,interpretdfd.c,printdfd.c,queries.c,dfd2vk.inl,vk2dfd.*}`
- `lib/{basis_sgd.h,formatsize.h,gl_format.h,ktxint.h,uthash.h,vk_format.h,vkformat_enum.h,checkheader.c,swap.c,hashlist.c,vkformat_check*.c,vkformat_typesize.c,basis_transcode.cpp,miniz_wrapper.cpp,filestream.*,memstream.*,texture*}`
- `other_include/KHR/`
@@ -592,7 +607,7 @@ Patches:
## libogg
-- Upstream: https://www.xiph.org/ogg
+- Upstream: https://github.com/xiph/ogg
- Version: 1.3.6 (be05b13e98b048f0b5a0f5fa8ce514d56db5f822, 2025)
- License: BSD-3-Clause
@@ -605,7 +620,7 @@ Files extracted from upstream source:
## libpng
-- Upstream: http://libpng.org/pub/png/libpng.html
+- Upstream: https://github.com/pnggroup/libpng
- Version: 1.6.59 (cd952f49f95bb27154ae77dbb103032d95f6e580, 2026)
- License: libpng/zlib
@@ -619,27 +634,27 @@ Files extracted from upstream source:
## libtheora
-- Upstream: https://www.theora.org
+- Upstream: https://github.com/xiph/theora
- Version: 1.2.0 (8e4808736e9c181b971306cc3f05df9e61354004, 2025)
- License: BSD-3-Clause
Files extracted from upstream source:
- All `.c` and `.h` files in `lib/`, except `arm/` and `c64x/` folders
-- All `.h` files in `include/theora/` as `theora/`
+- `include/theora/` minus `Makefile.am`
- `COPYING` and `LICENSE`
## libvorbis
-- Upstream: https://www.xiph.org/vorbis
+- Upstream: https://github.com/xiph/vorbis
- Version: 1.3.7 (0657aee69dec8508a0011f47f3b69d7538e9d262, 2020)
- License: BSD-3-Clause
Files extracted from upstream source:
-- `lib/*` except from: `lookups.pl`, `Makefile.*`
-- `include/vorbis/*.h` as `vorbis/`
+- `lib/*` except from: `CMakeLists.txt`, `lookups.pl`, `Makefile.*`, `misc.c`
+- `include/vorbis/` minus `Makefile.am`
- `COPYING`
@@ -701,7 +716,7 @@ File extracted from upstream release tarball:
- Relevant headers and library files via the script in `thirdparty/mbedtls/extract_mbedtls_sources.py`
- `LICENSE` (edited to keep only the Apache 2.0 variant)
-- Added 2 headers `godot_mbedtls_config.h` and `godot_psa_config.h` in `thirdparty/mbedtls/godot` for build configuration
+- Added 3 headers `godot_mbedtls_config.h`, `godot_psa_config.h` and `threading_alt.h` in `thirdparty/mbedtls/godot` for build configuration
- Added `thirdparty/mbedtls/godot/godot_mbedtls_platform.cpp` to implement some mbedTLS platform functions using Godot-native APIs
Patches:
@@ -709,32 +724,40 @@ Patches:
- `0001-fix-msvc-light.patch` ([GH-124014](https://github.com/godotengine/godot/pull/124014))
+## meshoptimizer
+
+- Upstream: https://github.com/zeux/meshoptimizer
+- Version: 1.3 (9e1f07b159d3cb777f1c67ed31fc11fd117986f4, 2026)
+- License: MIT
+
+Files extracted from upstream repository:
+
+- All files in `src/`
+- `LICENSE.md`
+
+
## metal-cpp
-- Upstream: https://developer.apple.com/metal/cpp/
-- Version: 26.0 (2025)
+- Upstream: https://developer.apple.com/metal/cpp/ (mirrored at https://github.com/apple/metal-cpp)
+- Version: 26.0 (f567ed836e4cbb85788c42115a2682bbe68097ee, 2025)
- License: Apache 2.0
Update instructions:
-- Download latest metal-cpp ZIP from https://developer.apple.com/metal/cpp/:
+- Download latest metal-cpp ZIP from https://developer.apple.com/metal/cpp/
- Run `update-metal-cpp.sh <path to the downloaded zip>` to extract the relevant files and apply patches.
-Patches:
-
-* 0002-sharedptr-nil-safe-retain-release.patch ([GH-123439](https://github.com/godotengine/godot/pull/123439))
-
+Files extracted from upstream source:
-## meshoptimizer
+- `Foundation/`, `Metal/`, `MetalFX/` and `QuartzCore/` folders
+- `LICENSE.txt`
-- Upstream: https://github.com/zeux/meshoptimizer
-- Version: 1.3 (9e1f07b159d3cb777f1c67ed31fc11fd117986f4, 2026)
-- License: MIT
+`metal_cpp.cpp` is a Godot file and should be preserved on updates.
-Files extracted from upstream repository:
+Patches:
-- All files in `src/`
-- `LICENSE.md`
+- `0001-add-missing-apis.patch` ([GH-114484](https://github.com/godotengine/godot/pull/114484))
+- `0002-sharedptr-nil-safe-retain-release.patch` ([GH-123439](https://github.com/godotengine/godot/pull/123439))
## mingw-std-threads
@@ -756,7 +779,7 @@ Patches:
- `0001-disable-exceptions.patch` ([GH-85039](https://github.com/godotengine/godot/pull/85039))
- `0002-clang-std-replacements-leak.patch` ([GH-85208](https://github.com/godotengine/godot/pull/85208))
-- `0003-explicit-includes.patch` ([GH-111557](https://github.com/godotengine/godot/pull/111557))
+- `0003-explicit-includes.patch` ([GH-111767](https://github.com/godotengine/godot/pull/111767))
## miniupnpc
@@ -767,7 +790,7 @@ Patches:
Files extracted from upstream source:
-- `miniupnpc/src/` as `src/`
+- `miniupnpc/src/`
- `miniupnpc/include/` as `include/miniupnpc/`
- Remove the following test or sample files:
`listdevices.c,minihttptestserver.c,miniupnpcmodule.c,upnpc.c,upnperrors.*,test*`
@@ -806,10 +829,13 @@ Collection of single-file libraries used in Godot components.
- `bcdec.h`
* Upstream: https://github.com/iOrange/bcdec
* Version: git (3b29f8f44466c7d59852670f82f53905cf627d48, 2024)
- * License: MIT
+ * License: MIT or Unlicense
- `cubemap_coeffs.h`
* Upstream: https://research.activision.com/publications/archives/fast-filtering-of-reflection-probes
- File coeffs_const_8.txt (retrieved April 2020)
+ Files https://www.activision.com/cdn/research/coeffs_const_8.txt (`low_quality_coeffs`)
+ and https://www.activision.com/cdn/research/coeffs_quad_32.txt (`high_quality_coeffs`)
+ (retrieved February 2020)
+ * Modifications: HLSL `float4` arrays converted to C++ `float` arrays.
* License: MIT
- `fastlz.{c,h}`
* Upstream: https://github.com/ariya/FastLZ
@@ -817,40 +843,47 @@ Collection of single-file libraries used in Godot components.
* License: MIT
- `FastNoiseLite.h`
* Upstream: https://github.com/Auburn/FastNoiseLite
- * Version: 1.1.0 (f7af54b56518aa659e1cf9fb103c0b6e36a833d9, 2023)
+ * Version: 1.1.0 (ee2f4eaeaffeaa599342544b22e62cb2f9cea570, 2023)
* License: MIT
* Patches:
- `FastNoiseLite-0001-namespace-warnings.patch` ([GH-88526](https://github.com/godotengine/godot/pull/88526))
- `gamemode_client.h`
* Upstream: https://github.com/FeralInteractive/gamemode (`lib/gamemode_client.h`)
- * Version: 1.8.2
+ * Version: 1.8.2 (c54d6d4243b0dd0afcb49f2c9836d432da171a2b, 2024)
* License: BSD-3-Clause
- `ifaddrs-android.{cc,h}`
* Upstream: https://chromium.googlesource.com/external/webrtc/stable/talk/+/master/base/ifaddrs-android.h
- * Version: git (5976650443d68ccfadf1dea24999ee459dd2819d, 2013)
+ * Version: git (fbb1efa61417540336cf52976d4ff4394bfa795b, 2013)
* License: BSD-3-Clause
* Patches:
- - `ifaddrs-android-0001-complete-struct.patch` ([GH-34101](https://github.com/godotengine/godot/pull/34101))
+ - `ifaddrs-android-0001-godot-changes.patch` ([GH-24499](https://github.com/godotengine/godot/pull/24499))
+ - `ifaddrs-android-0002-complete-struct.patch` ([GH-34101](https://github.com/godotengine/godot/pull/34101))
- `nvapi_minimal.h`
- * Upstream: http://download.nvidia.com/XFree86/nvapi-open-source-sdk
+ * Upstream: https://download.nvidia.com/XFree86/nvapi-open-source-sdk (`R525-OpenSource.tar`),
+ newer releases at https://github.com/NVIDIA/nvapi
* Version: R525
* License: MIT
* Modifications: Created from upstream `nvapi.h` by removing unnecessary code.
- `ok_color.h`
* Upstream: https://github.com/bottosson/bottosson.github.io/blob/master/misc/ok_color.h
- * Version: git (d69831edb90ffdcd08b7e64da3c5405acd48ad2c, 2022)
+ * Version: git (7561fbab5c8b982020ed212aebb0b8620c44b228, 2025)
* License: MIT
- * Modifications: License included in header.
+ * Patches:
+ - `ok_color-0001-godot-changes.patch` ([GH-59786](https://github.com/godotengine/godot/pull/59786), [GH-77036](https://github.com/godotengine/godot/pull/77036))
+ - `ok_color-0002-srgb_to_okhsl_precision.patch` ([GH-104112](https://github.com/godotengine/godot/pull/104112))
- `ok_color_shader.h`
* https://www.shadertoy.com/view/7sK3D1
* Version: 2021-09-13
* License: MIT
- `pcg.{cpp,h}`
- * Upstream: http://www.pcg-random.org
- * Version: minimal C implementation, http://www.pcg-random.org/download.html
+ * Upstream: https://www.pcg-random.org/download.html (minimal C implementation)
+ and https://github.com/imneme/pcg-c-basic
+ * Version: git (bc39cd76ac3d541e618606bcc6e1e5ba5e5e6aa3, 2014)
* License: Apache 2.0
+ * Modifications: `pcg32_random_r` from the minimal C implementation, `pcg32_srandom_r`
+ and `pcg32_boundedrand_r` from `pcg_basic.c`, Godot-specific header guard and includes.
- `polypartition.{cpp,h}`
- * Upstream: https://github.com/ivanfratric/polypartition (`src/polypartition.{cpp,h}`)
+ * Upstream: https://github.com/ivanfratric/polypartition
* Version: git (7bdffb428b2b19ad1c43aa44c714dcc104177e84, 2021)
* License: MIT
* Patches:
@@ -861,10 +894,11 @@ Collection of single-file libraries used in Godot components.
* Version: git (1bf9bc04673df55dc554021b768006836f69d53a, 2026)
* License: MIT
* Modifications: Added implementation through `qoa.c`.
-- `r128.h`
+- `r128.{c,h}`
* Upstream: https://github.com/fahickman/r128
* Version: 1.6.2 (69ba68f1ea666c9136cf56e0105b0cbbe9cd1534, 2026)
* License: Public Domain or Unlicense
+ * Modifications: Added implementation through `r128.c`.
- `smaz.{c,h}`
* Upstream: https://github.com/antirez/smaz
* Version: git (2f625846a775501fb69456567409a8b12f10ea25, 2012)
@@ -879,12 +913,14 @@ Collection of single-file libraries used in Godot components.
* License: Public Domain or MIT
- `stb_rect_pack.h`
* Upstream: https://github.com/nothings/stb
- * Version: 1.01 (af1a5bc352164740c1cc1354942b1c6b72eacb8a, 2021)
+ * Version: 1.01 (d14d46f6b44456eb88beac58cba833a4135d4c89, 2026)
* License: Public Domain or Unlicense or MIT
- `yuv2rgb.h`
- * Upstream: http://wss.co.uk/pinknoise/yuv2rgb/ (to check)
- * Version: ?
+ * Upstream: http://wss.co.uk/pinknoise/yuv2rgb/ (`yuv2rgb003.zip`)
+ * Version: 003 (2011)
* License: BSD
+ * Modifications: Table from `yuv2rgb16tab.c` and C implementations from
+ `yuv4*rgb8888c.c` combined in a single header, with byte-wise pixel stores.
## msdfgen
@@ -901,13 +937,13 @@ Files extracted from the upstream source:
Patches:
-- `0001-remove-unused-save-features.patch` ([GH-113965](https://github.com/godotengine/godot/issues/113965))
+- `0001-remove-unused-save-features.patch` ([GH-113965](https://github.com/godotengine/godot/pull/113965))
## offset_allocator
- Upstream: https://github.com/sebbbi/OffsetAllocator
-- Version: git (3610a7377088b1e8c8f1525f458c96038a4e6fc0, 2026)
+- Version: git (3610a7377088b1e8c8f1525f458c96038a4e6fc0, 2023)
- License: MIT
Files extracted from upstream source:
@@ -915,6 +951,16 @@ Files extracted from upstream source:
- `offsetAllocator.cpp`, `offsetAllocator.hpp`
- `LICENSE`
+`apply-patches.sh` is a Godot file to apply the patches below, and should be
+preserved on updates.
+
+Patches:
+
+- `0001-fix-allocation-count-tracking.patch` ([GH-121392](https://github.com/godotengine/godot/pull/121392))
+- `0002-fix-16-bit-node-indices.patch` ([GH-121392](https://github.com/godotengine/godot/pull/121392))
+- `0003-fix-maximum-allocation-size.patch` ([GH-121392](https://github.com/godotengine/godot/pull/121392))
+- `0004-add-header-guard.patch` ([GH-121392](https://github.com/godotengine/godot/pull/121392))
+
## openxr
@@ -950,11 +996,12 @@ Patches:
- `0001-remove-try-catch.patch` ([GH-123123](https://github.com/godotengine/godot/pull/123123))
+
## pcre2
-- Upstream: https://pcre2project.github.io/pcre2/
+- Upstream: https://github.com/PCRE2Project/pcre2
- Version: 10.49 (6f9d7c1373262c541324a16a358785b33ef116cf, 2026)
-- License: BSD-3-Clause
+- License: BSD-3-Clause WITH PCRE2-exception
Files extracted from upstream source:
@@ -1017,18 +1064,6 @@ and solve conflicts and also enrich the feature set originally
proposed by these libraries and better integrate them with Godot.
-## smaa
-
-- Upstream: https://github.com/iryoku/smaa
-- Version: git (71c806a838bdd7d517df19192a20f0c61b3ca29d, 2013)
-- License: MIT
-
-Files extracted from upstream source:
-
-- `LICENSE`
-- Textures generated using the Python scripts in the `Scripts` folder
-
-
## sdl
- Upstream: https://github.com/libsdl-org/SDL
@@ -1051,10 +1086,22 @@ Patches:
- `0007-fix-linux-getenv-unsafe.patch` ([GH-124017](https://github.com/godotengine/godot/pull/124017))
+## smaa
+
+- Upstream: https://github.com/iryoku/smaa
+- Version: git (71c806a838bdd7d517df19192a20f0c61b3ca29d, 2013)
+- License: MIT
+
+Files extracted from upstream source:
+
+- `LICENSE.txt`
+- Textures generated using the Python scripts in the `Scripts` folder
+
+
## spirv-cross
- Upstream: https://github.com/KhronosGroup/SPIRV-Cross
-- Version: git (fb0c1a307cca4b4a9d891837bf4c44d17fe2d324, 2025)
+- Version: vulkan-sdk-1.4.335.0 (fb0c1a307cca4b4a9d891837bf4c44d17fe2d324, 2025)
- License: Apache 2.0
Files extracted from upstream source:
@@ -1097,6 +1144,7 @@ Patches:
- `0001-zero-size-for-sc-sized-arrays.patch` ([GH-94985](https://github.com/godotengine/godot/pull/94985))
- `0002-spirv-headers.patch` ([GH-111452](https://github.com/godotengine/godot/pull/111452))
+- `0003-findnode-id-lookup-table.patch` ([GH-121835](https://github.com/godotengine/godot/pull/121835))
## swappy-frame-pacing
@@ -1176,8 +1224,7 @@ Patches:
- `0002-fpermissive-fix.patch` ([GH-27929](https://github.com/godotengine/godot/pull/27929))
- `0003-fix-musl-build.patch` ([GH-34250](https://github.com/godotengine/godot/pull/34250))
- `0004-fix-msvc-arm-build.patch` ([GH-34331](https://github.com/godotengine/godot/pull/34331))
-- `0005-fix-scale-calculation.patch` ([GH-38506](https://github.com/godotengine/godot/pull/38506))
-- `0006-gcc13-include-fix.patch` ([GH-77949](https://github.com/godotengine/godot/pull/77949))
+- `0005-gcc13-include-fix.patch` ([GH-61310](https://github.com/godotengine/godot/pull/61310), [GH-77949](https://github.com/godotengine/godot/pull/77949))
## volk
@@ -1207,7 +1254,7 @@ to tagged SDK releases. All Vulkan libraries and headers should be kept in sync
- Update Vulkan SDK components to the matching tag (see "vulkan")
- Update volk (see "volk")
- Update glslang (see "glslang")
-- Update spirv-headers (see "spriv-headers")
+- Update spirv-headers (see "spirv-headers")
- Update spirv-cross (see "spirv-cross")
- Update spirv-reflect (see "spirv-reflect")
@@ -1243,7 +1290,7 @@ Files extracted from upstream source:
- `COPYING`
-# wayland-protocols
+## wayland-protocols
- Upstream: https://gitlab.freedesktop.org/wayland/wayland-protocols
- Version: 1.47 (88223018d1b578d0d8869866da66d9608e05f928, 2025)
@@ -1251,23 +1298,41 @@ Files extracted from upstream source:
Files extracted from upstream source:
+- `stable/linux-dmabuf/README`
+- `stable/linux-dmabuf/feedback.rst`
+- `stable/linux-dmabuf/linux-dmabuf-v1.xml`
- `stable/tablet/README`
-- `stable/tablet/tablet-unstable-v2.xml`
+- `stable/tablet/tablet-v2.xml`
- `stable/viewporter/README`
- `stable/viewporter/viewporter.xml`
- `stable/xdg-shell/README`
- `stable/xdg-shell/xdg-shell.xml`
-- `staging/color-management/README.md`
+- `staging/color-management/README`
- `staging/color-management/color-management-v1.xml`
+- `staging/commit-timing/README`
+- `staging/commit-timing/commit-timing-v1.xml`
+- `staging/cursor-shape/README`
+- `staging/cursor-shape/cursor-shape-v1.xml`
+- `staging/fifo/README`
+- `staging/fifo/fifo-v1.xml`
- `staging/fractional-scale/README`
- `staging/fractional-scale/fractional-scale-v1.xml`
+- `staging/linux-drm-syncobj/README`
+- `staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml`
+- `staging/pointer-warp/README`
+- `staging/pointer-warp/pointer-warp-v1.xml`
+- `staging/tearing-control/README`
+- `staging/tearing-control/tearing-control-v1.xml`
- `staging/xdg-activation/README`
- `staging/xdg-activation/xdg-activation-v1.xml`
+- `staging/xdg-system-bell/README`
- `staging/xdg-system-bell/xdg-system-bell-v1.xml`
-- `staging/pointer-warp/pointer-warp-v1.xml`
-- `staging/pointer-warp/README`
+- `staging/xdg-toplevel-icon/README`
+- `staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml`
- `unstable/idle-inhibit/README`
- `unstable/idle-inhibit/idle-inhibit-unstable-v1.xml`
+- `unstable/linux-explicit-synchronization/README`
+- `unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml`
- `unstable/pointer-constraints/README`
- `unstable/pointer-constraints/pointer-constraints-unstable-v1.xml`
- `unstable/pointer-gestures/README`
@@ -1282,6 +1347,7 @@ Files extracted from upstream source:
- `unstable/xdg-decoration/xdg-decoration-unstable-v1.xml`
- `unstable/xdg-foreign/README`
- `unstable/xdg-foreign/xdg-foreign-unstable-v1.xml`
+- `unstable/xdg-foreign/xdg-foreign-unstable-v2.xml`
- `COPYING`
The following files are extracted from thirdparty sources:
@@ -1292,15 +1358,15 @@ The following files are extracted from thirdparty sources:
## wslay
- Upstream: https://github.com/tatsuhiro-t/wslay
-- Version: 1.1.1+git (0e7d106ff89ad6638090fd811a9b2e4c5dda8d40, 2022)
+- Version: git (0e7d106ff89ad6638090fd811a9b2e4c5dda8d40, 2022)
- License: MIT
-File extracted from upstream release tarball:
+Files extracted from upstream source:
- Run `cmake .` to generate `config.h` and `wslayver.h`
Contents might need tweaking for Godot, review diff
- All `.c` and `.h` files from `lib/`
-- All `.h` in `lib/includes/wslay/` as `wslay/`
+- `lib/includes/wslay/wslay.h` as `wslay/wslay.h`
- `COPYING`
Patches:
diff --git a/thirdparty/amd-fsr2/patches/0004-remove-unused-srv-binding.patch b/thirdparty/amd-fsr2/patches/0004-remove-unused-srv-binding.patch
new file mode 100644
index 00000000000..2e2e1e1389d
--- /dev/null
+++ b/thirdparty/amd-fsr2/patches/0004-remove-unused-srv-binding.patch
@@ -0,0 +1,12 @@
+diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip_pass.glsl b/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip_pass.glsl
+index 402e35da30..45ec5bdb86 100644
+--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip_pass.glsl
++++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip_pass.glsl
+@@ -29,7 +29,6 @@
+ #define FSR2_BIND_SRV_DILATED_DEPTH 2
+ #define FSR2_BIND_SRV_REACTIVE_MASK 3
+ #define FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK 4
+-#define FSR2_BIND_SRV_PREPARED_INPUT_COLOR 5
+ #define FSR2_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS 6
+ #define FSR2_BIND_SRV_INPUT_MOTION_VECTORS 7
+ #define FSR2_BIND_SRV_INPUT_COLOR 8
diff --git a/thirdparty/amd-fsr2/patches/0005-missing-force16-includes.patch b/thirdparty/amd-fsr2/patches/0005-missing-force16-includes.patch
new file mode 100644
index 00000000000..6d61d8ce6c6
--- /dev/null
+++ b/thirdparty/amd-fsr2/patches/0005-missing-force16-includes.patch
@@ -0,0 +1,34 @@
+diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
+index abdb8888a9..58a19d23f0 100644
+--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
++++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
+@@ -85,18 +85,11 @@ FfxFloat32 ComputeMaxKernelWeight() {
+ FfxFloat32x4 ComputeUpsampledColorAndWeight(const AccumulationPassCommonParams params,
+ FFX_PARAMETER_INOUT RectificationBox clippingBox, FfxFloat32 fReactiveFactor)
+ {
+- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
+- #include "ffx_fsr2_force16_begin.h"
+- #endif
+ // We compute a sliced lanczos filter with 2 lobes (other slices are accumulated temporaly)
+ FfxFloat32x2 fDstOutputPos = FfxFloat32x2(params.iPxHrPos) + FFX_BROADCAST_FLOAT32X2(0.5f); // Destination resolution output pixel center position
+ FfxFloat32x2 fSrcOutputPos = fDstOutputPos * DownscaleFactor(); // Source resolution output pixel center position
+ FfxInt32x2 iSrcInputPos = FfxInt32x2(floor(fSrcOutputPos)); // TODO: what about weird upscale factors...
+
+- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
+- #include "ffx_fsr2_force16_end.h"
+- #endif
+-
+ FfxFloat32x3 fSamples[iLanczos2SampleCount];
+
+ FfxFloat32x2 fSrcUnjitteredPos = (FfxFloat32x2(iSrcInputPos) + FfxFloat32x2(0.5f, 0.5f)) - Jitter(); // This is the un-jittered position of the sample at offset 0,0
+@@ -184,10 +177,6 @@ FfxFloat32x4 ComputeUpsampledColorAndWeight(const AccumulationPassCommonParams p
+ Deringing(clippingBox, fColorAndWeight.xyz);
+ }
+
+- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
+- #include "ffx_fsr2_force16_end.h"
+- #endif
+-
+ return fColorAndWeight;
+ }
+
diff --git a/thirdparty/amd-fsr2/shaders/ffx_core.h b/thirdparty/amd-fsr2/shaders/ffx_core.h
index 4e687d6e3d6..91771eccff5 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_core.h
+++ b/thirdparty/amd-fsr2/shaders/ffx_core.h
@@ -49,4 +49,4 @@
#include "ffx_core_gpu_common_half.h"
#include "ffx_core_portability.h"
#endif // #if defined(FFX_GPU)
-#endif // #if !defined(FFX_CORE_H)
\ No newline at end of file
+#endif // #if !defined(FFX_CORE_H)
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_accumulate_pass.glsl b/thirdparty/amd-fsr2/shaders/ffx_fsr2_accumulate_pass.glsl
index 6b67691ec7c..2e98c8a6c52 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_accumulate_pass.glsl
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_accumulate_pass.glsl
@@ -88,4 +88,4 @@ void main()
uvec2 uDispatchThreadId = uGroupId * uvec2(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT) + gl_LocalInvocationID.xy;
Accumulate(ivec2(uDispatchThreadId));
-}
\ No newline at end of file
+}
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid.h
index c63f1820e08..cb093259e3b 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid.h
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid.h
@@ -186,4 +186,4 @@ void ComputeAutoExposure(FfxUInt32x3 WorkGroupId, FfxUInt32 LocalThreadIndex)
FfxUInt32(WorkGroupId.z),
FfxUInt32x2(WorkGroupOffset()));
#endif
-}
\ No newline at end of file
+}
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid_pass.glsl b/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid_pass.glsl
index 40232155c32..8439c4e9d48 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid_pass.glsl
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_compute_luminance_pyramid_pass.glsl
@@ -131,4 +131,4 @@ FFX_FSR2_NUM_THREADS
void main()
{
ComputeAutoExposure(gl_WorkGroupID.xyz, gl_LocalInvocationIndex);
-}
\ No newline at end of file
+}
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip.h
index fa4c975a23f..ab68c180185 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip.h
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_depth_clip.h
@@ -255,4 +255,4 @@ void DepthClip(FfxInt32x2 iPxPos)
PreProcessReactiveMasks(iPxPos, ffxMax(fTemporalMotionDifference, fMotionDivergence));
}
-#endif //!defined( FFX_FSR2_DEPTH_CLIPH )
\ No newline at end of file
+#endif //!defined( FFX_FSR2_DEPTH_CLIPH )
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_begin.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_begin.h
deleted file mode 100644
index 3bd4d5d9129..00000000000
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_begin.h
+++ /dev/null
@@ -1 +0,0 @@
-// This file doesn't exist in this version of FSR.
\ No newline at end of file
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_end.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_end.h
deleted file mode 100644
index 3bd4d5d9129..00000000000
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_force16_end.h
+++ /dev/null
@@ -1 +0,0 @@
-// This file doesn't exist in this version of FSR.
\ No newline at end of file
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_rcas_pass.glsl b/thirdparty/amd-fsr2/shaders/ffx_fsr2_rcas_pass.glsl
index 668279be511..8b4ebc6afc5 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_rcas_pass.glsl
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_rcas_pass.glsl
@@ -77,4 +77,4 @@ FFX_FSR2_NUM_THREADS
void main()
{
RCAS(gl_LocalInvocationID.xyz, gl_WorkGroupID.xyz, gl_GlobalInvocationID.xyz);
-}
\ No newline at end of file
+}
diff --git a/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h b/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
index abdb8888a9a..58a19d23f0e 100644
--- a/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
+++ b/thirdparty/amd-fsr2/shaders/ffx_fsr2_upsample.h
@@ -85,18 +85,11 @@ FfxFloat32 ComputeMaxKernelWeight() {
FfxFloat32x4 ComputeUpsampledColorAndWeight(const AccumulationPassCommonParams params,
FFX_PARAMETER_INOUT RectificationBox clippingBox, FfxFloat32 fReactiveFactor)
{
- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
- #include "ffx_fsr2_force16_begin.h"
- #endif
// We compute a sliced lanczos filter with 2 lobes (other slices are accumulated temporaly)
FfxFloat32x2 fDstOutputPos = FfxFloat32x2(params.iPxHrPos) + FFX_BROADCAST_FLOAT32X2(0.5f); // Destination resolution output pixel center position
FfxFloat32x2 fSrcOutputPos = fDstOutputPos * DownscaleFactor(); // Source resolution output pixel center position
FfxInt32x2 iSrcInputPos = FfxInt32x2(floor(fSrcOutputPos)); // TODO: what about weird upscale factors...
- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
- #include "ffx_fsr2_force16_end.h"
- #endif
-
FfxFloat32x3 fSamples[iLanczos2SampleCount];
FfxFloat32x2 fSrcUnjitteredPos = (FfxFloat32x2(iSrcInputPos) + FfxFloat32x2(0.5f, 0.5f)) - Jitter(); // This is the un-jittered position of the sample at offset 0,0
@@ -184,10 +177,6 @@ FfxFloat32x4 ComputeUpsampledColorAndWeight(const AccumulationPassCommonParams p
Deringing(clippingBox, fColorAndWeight.xyz);
}
- #if FFX_FSR2_OPTION_UPSAMPLE_SAMPLERS_USE_DATA_HALF && FFX_HALF
- #include "ffx_fsr2_force16_end.h"
- #endif
-
return fColorAndWeight;
}
diff --git a/thirdparty/basis_universal/patches/0006-explicit-includes.patch b/thirdparty/basis_universal/patches/0006-explicit-includes.patch
index 3d7c860c847..67bf85edf58 100644
--- a/thirdparty/basis_universal/patches/0006-explicit-includes.patch
+++ b/thirdparty/basis_universal/patches/0006-explicit-includes.patch
@@ -1,14 +1,12 @@
diff --git a/thirdparty/basis_universal/transcoder/basisu_containers_impl.h b/thirdparty/basis_universal/transcoder/basisu_containers_impl.h
-index 3d7aaddcad..db3a567450 100644
+index 3d7aaddcad..6d570133d1 100644
--- a/thirdparty/basis_universal/transcoder/basisu_containers_impl.h
+++ b/thirdparty/basis_universal/transcoder/basisu_containers_impl.h
-@@ -1,6 +1,9 @@
- // basisu_containers_impl.h
+@@ -2,6 +2,7 @@
// Do not include directly
-+#include <ctype.h>
+ #include <ctype.h>
+#include <exception>
-+
+
#ifdef _MSC_VER
#pragma warning (disable:4127) // warning C4127: conditional expression is constant
- #endif
diff --git a/thirdparty/cvtt/LICENSE.txt b/thirdparty/cvtt/LICENSE.txt
index d79aec44e3b..4d12228b054 100644
--- a/thirdparty/cvtt/LICENSE.txt
+++ b/thirdparty/cvtt/LICENSE.txt
@@ -42,4 +42,4 @@ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
-OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/thirdparty/d3d12ma/D3D12MemAlloc.natvis b/thirdparty/d3d12ma/D3D12MemAlloc.natvis
index 957edc929dd..182826ec85d 100644
--- a/thirdparty/d3d12ma/D3D12MemAlloc.natvis
+++ b/thirdparty/d3d12ma/D3D12MemAlloc.natvis
@@ -55,4 +55,4 @@
</LinkedListItems>
</Expand>
</Type>
-</AutoVisualizer>
\ No newline at end of file
+</AutoVisualizer>
diff --git a/thirdparty/d3d12ma/README.md b/thirdparty/d3d12ma/README.md
deleted file mode 100644
index d13081bf943..00000000000
--- a/thirdparty/d3d12ma/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Upstream:
-https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator
-
-commit 0fa62ed3a0a69b73230a8ec1faa752d4061c8dc8
-Author: jlacroixAMD <[email protected]>
-Date: Tue Feb 24 11:41:07 2026 +0900
-
- Merge pull request #87 from sawickiap/master
-
- New updates to D3D12 Memory Allocator (v3.1.0)
diff --git a/thirdparty/directx_headers/LICENSE b/thirdparty/directx_headers/LICENSE
index 63447fd8bbb..b2f52a2bad4 100644
--- a/thirdparty/directx_headers/LICENSE
+++ b/thirdparty/directx_headers/LICENSE
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/thirdparty/directx_headers/include/directx/d3dx12_property_format_table.h b/thirdparty/directx_headers/include/directx/d3dx12_property_format_table.h
index 66c7600f55d..e2bc023e7fd 100644
--- a/thirdparty/directx_headers/include/directx/d3dx12_property_format_table.h
+++ b/thirdparty/directx_headers/include/directx/d3dx12_property_format_table.h
@@ -125,4 +125,4 @@ private:
};
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/embree/common/math/vec3fa_sycl.h b/thirdparty/embree/common/math/vec3fa_sycl.h
index 642a63052a2..e1877bcb661 100644
--- a/thirdparty/embree/common/math/vec3fa_sycl.h
+++ b/thirdparty/embree/common/math/vec3fa_sycl.h
@@ -622,4 +622,4 @@ namespace sycl {
template<> struct is_device_copyable<embree::Vec3fa> : std::true_type {};
template<> struct is_device_copyable<const embree::Vec3fa> : std::true_type {};
}
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/embree/common/tasking/taskschedulertbb.h b/thirdparty/embree/common/tasking/taskschedulertbb.h
index e1f647eb067..0db221b41da 100644
--- a/thirdparty/embree/common/tasking/taskschedulertbb.h
+++ b/thirdparty/embree/common/tasking/taskschedulertbb.h
@@ -86,4 +86,4 @@ namespace embree
#if defined(__INTEL_LLVM_COMPILER)
#pragma clang diagnostic pop
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/embree/kernels/bvh/bvh_builder_twolevel_internal.h b/thirdparty/embree/kernels/bvh/bvh_builder_twolevel_internal.h
index b28afffae91..500f5170926 100644
--- a/thirdparty/embree/kernels/bvh/bvh_builder_twolevel_internal.h
+++ b/thirdparty/embree/kernels/bvh/bvh_builder_twolevel_internal.h
@@ -301,4 +301,4 @@ namespace embree
};
}
}
-}
\ No newline at end of file
+}
diff --git a/thirdparty/embree/kernels/common/scene_verify.cpp b/thirdparty/embree/kernels/common/scene_verify.cpp
index 1db7844f4fe..beeb5d686f4 100644
--- a/thirdparty/embree/kernels/common/scene_verify.cpp
+++ b/thirdparty/embree/kernels/common/scene_verify.cpp
@@ -21,4 +21,4 @@ void Scene::checkIfModifiedAndSet ()
}
}
-}
\ No newline at end of file
+}
diff --git a/thirdparty/gamepadmotionhelpers/LICENSE.txt b/thirdparty/gamepadmotionhelpers/LICENSE
similarity index 100%
rename from thirdparty/gamepadmotionhelpers/LICENSE.txt
rename to thirdparty/gamepadmotionhelpers/LICENSE
diff --git a/thirdparty/glad/patches/0001-enable-both-gl-and-gles.patch b/thirdparty/glad/patches/0001-enable-both-gl-and-gles.patch
index 1704d8c73c4..ffec265b041 100644
--- a/thirdparty/glad/patches/0001-enable-both-gl-and-gles.patch
+++ b/thirdparty/glad/patches/0001-enable-both-gl-and-gles.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/glad/gl.c b/thirdparty/glad/gl.c
-index e8cc5ff1d9..ee0cc188fc 100644
+index e87b11d21e..d78c606dbd 100644
--- a/thirdparty/glad/gl.c
+++ b/thirdparty/glad/gl.c
-@@ -2475,7 +2475,7 @@ static GLADapiproc glad_gl_get_proc(void *vuserptr, const char *name) {
+@@ -2462,7 +2462,7 @@ static GLADapiproc glad_gl_get_proc(void *vuserptr, const char *name) {
return result;
}
@@ -11,7 +11,7 @@ index e8cc5ff1d9..ee0cc188fc 100644
static void* glad_gl_dlopen_handle(void) {
#if GLAD_PLATFORM_APPLE
-@@ -2497,11 +2497,11 @@ static void* glad_gl_dlopen_handle(void) {
+@@ -2484,11 +2484,11 @@ static void* glad_gl_dlopen_handle(void) {
};
#endif
@@ -26,7 +26,7 @@ index e8cc5ff1d9..ee0cc188fc 100644
}
static struct _glad_gl_userptr glad_gl_build_userptr(void *handle) {
-@@ -2527,7 +2527,7 @@ int gladLoaderLoadGL(void) {
+@@ -2514,7 +2514,7 @@ int gladLoaderLoadGL(void) {
int did_load = 0;
struct _glad_gl_userptr userptr;
@@ -35,7 +35,7 @@ index e8cc5ff1d9..ee0cc188fc 100644
handle = glad_gl_dlopen_handle();
if (handle) {
userptr = glad_gl_build_userptr(handle);
-@@ -2545,9 +2545,9 @@ int gladLoaderLoadGL(void) {
+@@ -2532,9 +2532,9 @@ int gladLoaderLoadGL(void) {
void gladLoaderUnloadGL(void) {
@@ -47,3 +47,4 @@ index e8cc5ff1d9..ee0cc188fc 100644
+ _glad_gles_loader_handle = NULL;
}
}
+
diff --git a/thirdparty/glslang/patches/0003-preprocessor-token-name-memcpy.patch b/thirdparty/glslang/patches/0003-preprocessor-token-name-memcpy.patch
index 6281a31b2a4..ccfa08bf05d 100644
--- a/thirdparty/glslang/patches/0003-preprocessor-token-name-memcpy.patch
+++ b/thirdparty/glslang/patches/0003-preprocessor-token-name-memcpy.patch
@@ -5,7 +5,7 @@ index 582d119f42..88b0d62dde 100644
@@ -125,6 +125,14 @@ public:
char name[MaxTokenLength + 1];
};
-
+
+inline void SetPpTokenName(TPpToken& ppToken, const char* src, size_t len)
+{
+ if (len >= sizeof(ppToken.name))
@@ -18,11 +18,11 @@ index 582d119f42..88b0d62dde 100644
//
// Implementation is in PpAtom.cpp
@@ -156,6 +164,7 @@ public:
-
+
// Map atom -> string.
const char* getString(int atom) const { return stringMap[atom]->c_str(); }
+ const TString* getTString(int atom) const { return stringMap[atom]; }
-
+
protected:
TStringAtomMap(TStringAtomMap&);
@@ -261,7 +270,7 @@ public:
diff --git a/thirdparty/grisu2/README.md b/thirdparty/grisu2/README.md
index 0cbb8f1ae1e..dec3205a476 100644
--- a/thirdparty/grisu2/README.md
+++ b/thirdparty/grisu2/README.md
@@ -13,7 +13,7 @@ The original C implementation is by Florian Loitsch:
The implementation simplified and adapted to JSON and C++11 by Daniel Lemire as part of simdjson:
- https://github.com/simdjson/simdjson/blob/master/src/to_chars.cpp
-The `grisu2.h` file is the same as `to_chars.cpp` but with `godot.patch` applied to it, with the following changes:
+The `grisu2.h` file is the same as `to_chars.cpp` but with `patches/0001-godot-changes.patch` applied to it, with the following changes:
- Simplify namespaces to just be one `grisu2` namespace.
- Rename functions to ensure their names are unique.
- Make `to_chars` handle both float and double types instead of just double.
diff --git a/thirdparty/grisu2/patches/0001-godot-changes.patch b/thirdparty/grisu2/patches/0001-godot-changes.patch
index 357500f242f..246ae2caf1a 100644
--- a/thirdparty/grisu2/patches/0001-godot-changes.patch
+++ b/thirdparty/grisu2/patches/0001-godot-changes.patch
@@ -1,5 +1,5 @@
diff --git a/thirdparty/grisu2/grisu2.h b/thirdparty/grisu2/grisu2.h
-index f140e1a192..316a727ce0 100644
+index 3f3423281d..316a727ce0 100644
--- a/thirdparty/grisu2/grisu2.h
+++ b/thirdparty/grisu2/grisu2.h
@@ -1,15 +1,11 @@
@@ -115,5 +115,4 @@ index f140e1a192..316a727ce0 100644
-} // namespace simdjson
-
-#endif // SIMDJSON_SRC_TO_CHARS_CPP
-\ No newline at end of file
+} // namespace grisu2
diff --git a/thirdparty/icu4c/patches/0001-ustr-literals.patch b/thirdparty/icu4c/patches/0001-ustr-literals.patch
index 6d26ced9f27..67c9a654e13 100644
--- a/thirdparty/icu4c/patches/0001-ustr-literals.patch
+++ b/thirdparty/icu4c/patches/0001-ustr-literals.patch
@@ -2,8 +2,7 @@ diff --git a/thirdparty/icu4c/common/ubidi.cpp b/thirdparty/icu4c/common/ubidi.c
index 66a6f6bc67..69dc18b950 100644
--- a/thirdparty/icu4c/common/ubidi.cpp
+++ b/thirdparty/icu4c/common/ubidi.cpp
-@@ -3103,10 +3103,10 @@ ubidi_isolate(UMFBidiIsolationStrategy bidiIsolationStrategy,
-
+@@ -3104,8 +3104,8 @@ ubidi_isolate(UMFBidiIsolationStrategy bidiIsolationStrategy,
// 2iii. Let the boolean value isolate be True if the u:dir option of the resolved value of exp has a value other than 'inherit', or False otherwise.
bool isolate = uDirOption != U_MF_BIDI_OPTION_INHERIT;
@@ -14,4 +13,3 @@ index 66a6f6bc67..69dc18b950 100644
// 2iv. If dir is 'LTR'
switch (dir) {
- case U_MF_DIRECTIONALITY_LTR:
diff --git a/thirdparty/icu4c/patches/0002-tuple-include.patch b/thirdparty/icu4c/patches/0002-tuple-include.patch
index 0719f4b527a..4de7bb031be 100644
--- a/thirdparty/icu4c/patches/0002-tuple-include.patch
+++ b/thirdparty/icu4c/patches/0002-tuple-include.patch
@@ -2,8 +2,7 @@ diff --git a/thirdparty/icu4c/common/cmemory.h b/thirdparty/icu4c/common/cmemory
index fc0276fec5..0d66b5e291 100644
--- a/thirdparty/icu4c/common/cmemory.h
+++ b/thirdparty/icu4c/common/cmemory.h
-@@ -30,8 +30,9 @@
-
+@@ -31,6 +31,7 @@
#include <limits.h>
#include <stddef.h>
#include <string.h>
@@ -11,4 +10,3 @@ index fc0276fec5..0d66b5e291 100644
#include "unicode/localpointer.h"
#include "uassert.h"
- #if U_DEBUG && defined(UPRV_MALLOC_COUNT)
diff --git a/thirdparty/linuxbsd_headers/README.md b/thirdparty/linuxbsd_headers/README.md
index 36d7eb82be5..db5c9c3e4af 100644
--- a/thirdparty/linuxbsd_headers/README.md
+++ b/thirdparty/linuxbsd_headers/README.md
@@ -8,21 +8,27 @@ readability.
## ALSA
- Upstream: https://www.alsa-project.org/
-- Version: 1.1.3-5
+- Version: 1.1.3 (7e86c8c56fba6fd8cdb57ee97aaa731c351a8892, 2016)
- License: LGPL-2.1+
+`asoundlib.h` and `version.h` are generated by `configure` (Linux target).
+
Patches:
-- `0001-musl-standard-poll.patch` (GH-71934)
-- `0002-freebsd-sys-endian.patch` (GH-100047)
+- `0001-musl-standard-poll.patch` ([GH-71934](https://github.com/godotengine/godot/pull/71934))
+- `0002-freebsd-sys-endian.patch` ([GH-100047](https://github.com/godotengine/godot/pull/100047))
## dbus
- Upstream: https://www.freedesktop.org/wiki/Software/dbus/
-- Version: 1.12.2
+- Version: 1.12.2 (Ubuntu 18.04 package `1.12.2-1ubuntu1`)
- License: AFL-2.1
+`dbus-arch-deps.h` is generated by `configure` (x86_64 target). `dbus-protocol.h`
+includes the `DBUS_ERROR_APPARMOR_SECURITY_CONTEXT_UNKNOWN` define from Ubuntu's
+`aa-get-connection-apparmor-security-context.patch`.
+
## fontconfig
@@ -41,7 +47,7 @@ Patches:
## pulse
- Upstream: http://pulseaudio.org/
-- Version: 1.11.1
+- Version: 11.1
- License: LGPL-2.1+
@@ -69,14 +75,16 @@ Patches:
## X11
- Upstream: https://x.org/wiki/
-- Version:
+- Version:
* Xcursor: 1.2.0
- * Xext: 1.3.5
+ * Xext: 1.3.4
+ * Xfixes: 6.0.0
* Xinerama: 1.1.4
* Xi: 1.7.10
- * Xlib: 1.6.9
+ * Xlib: 1.7.5
* Xrandr: 1.5.2
* Xrender: 0.9.10
+ * xorgproto: 2021.5
- License: MIT
diff --git a/thirdparty/manifold/include/manifold/mesh.h b/thirdparty/manifold/include/manifold/mesh.h
index 9402c9c99aa..630dd334356 100644
--- a/thirdparty/manifold/include/manifold/mesh.h
+++ b/thirdparty/manifold/include/manifold/mesh.h
@@ -274,4 +274,4 @@ MeshGL64 ReadOBJ(std::istream& stream);
bool WriteOBJ(std::ostream& stream, const MeshGL64& mesh);
#endif
/** @} */
-} // namespace manifold
\ No newline at end of file
+} // namespace manifold
diff --git a/thirdparty/metal-cpp/Foundation/NSDate.hpp b/thirdparty/metal-cpp/Foundation/NSDate.hpp
index 0a5ec7ddb40..39f4e342d55 100644
--- a/thirdparty/metal-cpp/Foundation/NSDate.hpp
+++ b/thirdparty/metal-cpp/Foundation/NSDate.hpp
@@ -50,4 +50,4 @@ _NS_INLINE NS::Date* NS::Date::dateWithTimeIntervalSinceNow(NS::TimeInterval sec
return NS::Object::sendMessage<NS::Date*>(_NS_PRIVATE_CLS(NSDate), _NS_PRIVATE_SEL(dateWithTimeIntervalSinceNow_), secs);
}
-//-------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/thirdparty/metal-cpp/Foundation/NSLock.hpp b/thirdparty/metal-cpp/Foundation/NSLock.hpp
index 01df219402e..ef3ea333a04 100644
--- a/thirdparty/metal-cpp/Foundation/NSLock.hpp
+++ b/thirdparty/metal-cpp/Foundation/NSLock.hpp
@@ -115,4 +115,4 @@ _NS_INLINE void NS::Condition::broadcast()
NS::Object::sendMessage<void>(this, _NS_PRIVATE_SEL(broadcast));
}
-//-------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch b/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch
index cd737664ade..69922668888 100644
--- a/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch
+++ b/thirdparty/metal-cpp/patches/0001-add-missing-apis.patch
@@ -1,7 +1,8 @@
-diff -ruN original/Foundation/NSData.hpp patched/Foundation/NSData.hpp
---- original/Foundation/NSData.hpp 2026-02-18 06:41:30
-+++ patched/Foundation/NSData.hpp 2026-02-18 06:41:30
-@@ -34,6 +34,7 @@
+diff --git a/thirdparty/metal-cpp/Foundation/NSData.hpp b/thirdparty/metal-cpp/Foundation/NSData.hpp
+index 3ad360609f..03576df538 100644
+--- a/thirdparty/metal-cpp/Foundation/NSData.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSData.hpp
+@@ -34,6 +34,7 @@ class Data : public Copying<Data>
public:
void* mutableBytes() const;
UInteger length() const;
@@ -9,21 +10,20 @@ diff -ruN original/Foundation/NSData.hpp patched/Foundation/NSData.hpp
};
}
-@@ -49,6 +50,11 @@
- _NS_INLINE NS::UInteger NS::Data::length() const
- {
+@@ -51,4 +52,9 @@ _NS_INLINE NS::UInteger NS::Data::length() const
return Object::sendMessage<UInteger>(this, _NS_PRIVATE_SEL(length));
-+}
-+
+ }
+
+_NS_INLINE const void * NS::Data::bytes() const
+{
+ return Object::sendMessage<const void *>(this, _NS_PRIVATE_SEL(bytes));
- }
-
++}
++
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
-diff -ruN original/Foundation/NSDefines.hpp patched/Foundation/NSDefines.hpp
---- original/Foundation/NSDefines.hpp 2026-02-18 06:41:30
-+++ patched/Foundation/NSDefines.hpp 2026-02-18 06:41:30
+diff --git a/thirdparty/metal-cpp/Foundation/NSDefines.hpp b/thirdparty/metal-cpp/Foundation/NSDefines.hpp
+index 38bbb56b2a..33bef73268 100644
+--- a/thirdparty/metal-cpp/Foundation/NSDefines.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSDefines.hpp
@@ -22,6 +22,16 @@
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -41,10 +41,11 @@ diff -ruN original/Foundation/NSDefines.hpp patched/Foundation/NSDefines.hpp
#define _NS_WEAK_IMPORT __attribute__((weak_import))
#ifdef METALCPP_SYMBOL_VISIBILITY_HIDDEN
#define _NS_EXPORT __attribute__((visibility("hidden")))
-diff -ruN original/Foundation/NSObject.hpp patched/Foundation/NSObject.hpp
---- original/Foundation/NSObject.hpp 2026-02-18 06:41:30
-+++ patched/Foundation/NSObject.hpp 2026-02-18 06:41:30
-@@ -68,6 +68,12 @@
+diff --git a/thirdparty/metal-cpp/Foundation/NSObject.hpp b/thirdparty/metal-cpp/Foundation/NSObject.hpp
+index aff8e67623..828c18cd4f 100644
+--- a/thirdparty/metal-cpp/Foundation/NSObject.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSObject.hpp
+@@ -68,6 +68,12 @@ public:
class String* description() const;
class String* debugDescription() const;
@@ -57,7 +58,7 @@ diff -ruN original/Foundation/NSObject.hpp patched/Foundation/NSObject.hpp
protected:
friend class Referencing<Object, objc_object>;
-@@ -84,10 +90,6 @@
+@@ -84,10 +90,6 @@ protected:
static bool respondsToSelector(const void* pObj, SEL selector);
template <typename _Type>
static constexpr bool doesRequireMsgSendStret();
@@ -68,10 +69,11 @@ diff -ruN original/Foundation/NSObject.hpp patched/Foundation/NSObject.hpp
private:
Object() = delete;
-diff -ruN original/Foundation/NSPrivate.hpp patched/Foundation/NSPrivate.hpp
---- original/Foundation/NSPrivate.hpp 2026-02-18 06:41:30
-+++ patched/Foundation/NSPrivate.hpp 2026-02-18 06:41:30
-@@ -184,6 +184,8 @@
+diff --git a/thirdparty/metal-cpp/Foundation/NSPrivate.hpp b/thirdparty/metal-cpp/Foundation/NSPrivate.hpp
+index f8d87004f3..12a14636f7 100644
+--- a/thirdparty/metal-cpp/Foundation/NSPrivate.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSPrivate.hpp
+@@ -184,6 +184,8 @@ namespace Private
"bundleWithPath:");
_NS_PRIVATE_DEF_SEL(bundleWithURL_,
"bundleWithURL:");
@@ -80,7 +82,7 @@ diff -ruN original/Foundation/NSPrivate.hpp patched/Foundation/NSPrivate.hpp
_NS_PRIVATE_DEF_SEL(caseInsensitiveCompare_,
"caseInsensitiveCompare:");
_NS_PRIVATE_DEF_SEL(characterAtIndex_,
-@@ -268,6 +270,8 @@
+@@ -268,6 +270,8 @@ namespace Private
"initFileURLWithPath:");
_NS_PRIVATE_DEF_SEL(initWithBool_,
"initWithBool:");
@@ -89,10 +91,11 @@ diff -ruN original/Foundation/NSPrivate.hpp patched/Foundation/NSPrivate.hpp
_NS_PRIVATE_DEF_SEL(initWithBytes_objCType_,
"initWithBytes:objCType:");
_NS_PRIVATE_DEF_SEL(initWithBytesNoCopy_length_encoding_freeWhenDone_,
-diff -ruN original/Foundation/NSString.hpp patched/Foundation/NSString.hpp
---- original/Foundation/NSString.hpp 2026-02-18 06:41:30
-+++ patched/Foundation/NSString.hpp 2026-02-18 06:41:30
-@@ -104,6 +104,7 @@
+diff --git a/thirdparty/metal-cpp/Foundation/NSString.hpp b/thirdparty/metal-cpp/Foundation/NSString.hpp
+index c48e0689ec..654584e29c 100644
+--- a/thirdparty/metal-cpp/Foundation/NSString.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSString.hpp
+@@ -104,6 +104,7 @@ public:
String* stringByAppendingString(const String* pString) const;
ComparisonResult caseInsensitiveCompare(const String* pString) const;
@@ -100,21 +103,21 @@ diff -ruN original/Foundation/NSString.hpp patched/Foundation/NSString.hpp
};
/// Create an NS::String* from a string literal.
-@@ -250,6 +251,11 @@
- _NS_INLINE NS::ComparisonResult NS::String::caseInsensitiveCompare(const String* pString) const
- {
+@@ -252,4 +253,9 @@ _NS_INLINE NS::ComparisonResult NS::String::caseInsensitiveCompare(const String*
return Object::sendMessage<NS::ComparisonResult>(this, _NS_PRIVATE_SEL(caseInsensitiveCompare_), pString);
-+}
-+
+ }
+
+_NS_INLINE NS::String* NS::String::init(const void * bytes, NS::UInteger len, NS::StringEncoding encoding)
+{
+ return Object::sendMessage<NS::String*>(this, _NS_PRIVATE_SEL(initWithBytes_length_encoding_), bytes, len, encoding);
- }
-
++}
++
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
-diff -ruN original/QuartzCore/CALayer.hpp patched/QuartzCore/CALayer.hpp
---- original/QuartzCore/CALayer.hpp 1970-01-01 11:00:00
-+++ patched/QuartzCore/CALayer.hpp 2026-02-18 06:41:30
+diff --git a/thirdparty/metal-cpp/QuartzCore/CALayer.hpp b/thirdparty/metal-cpp/QuartzCore/CALayer.hpp
+new file mode 100644
+index 0000000000..d36726858e
+--- /dev/null
++++ b/thirdparty/metal-cpp/QuartzCore/CALayer.hpp
@@ -0,0 +1,79 @@
+#pragma once
+
@@ -195,9 +198,10 @@ diff -ruN original/QuartzCore/CALayer.hpp patched/QuartzCore/CALayer.hpp
+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeStandard);
+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeConstrainedHigh);
+_CA_PRIVATE_DEF_CONST(CA::DynamicRange, DynamicRangeHigh);
-diff -ruN original/QuartzCore/CAMetalLayer.hpp patched/QuartzCore/CAMetalLayer.hpp
---- original/QuartzCore/CAMetalLayer.hpp 2026-02-18 06:41:30
-+++ patched/QuartzCore/CAMetalLayer.hpp 2026-02-18 06:41:31
+diff --git a/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp b/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp
+index 53f6857d2a..8dfb0ae33b 100644
+--- a/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp
++++ b/thirdparty/metal-cpp/QuartzCore/CAMetalLayer.hpp
@@ -32,13 +32,14 @@
#include "CADefines.hpp"
#include "CAMetalDrawable.hpp"
@@ -214,9 +218,10 @@ diff -ruN original/QuartzCore/CAMetalLayer.hpp patched/QuartzCore/CAMetalLayer.h
{
public:
static class MetalLayer* layer();
-diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
---- original/QuartzCore/CAPrivate.hpp 2026-02-18 06:41:30
-+++ patched/QuartzCore/CAPrivate.hpp 2026-02-18 06:41:31
+diff --git a/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp b/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp
+index 0b7486a751..8f8822151d 100644
+--- a/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp
++++ b/thirdparty/metal-cpp/QuartzCore/CAPrivate.hpp
@@ -54,16 +54,49 @@
#define _CA_PRIVATE_DEF_CLS(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_LOOKUP_CLASS(symbol)
#define _CA_PRIVATE_DEF_PRO(symbol) void* s_k##symbol _CA_PRIVATE_VISIBILITY = _CA_PRIVATE_OBJC_GET_PROTOCOL(symbol)
@@ -245,8 +250,8 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
+ _CA_EXTERN type const CA##symbol _CA_PRIVATE_IMPORT; \
+ type const CA::symbol = (nullptr != &CA##symbol) ? CA##symbol : nullptr
+
- #else
-
++#else
++
+#define _CA_PRIVATE_DEF_STR(type, symbol) \
+ _CA_EXTERN type const CA##symbol; \
+ type const CA::symbol = CA::Private::LoadSymbol<type>("CA" #symbol)
@@ -257,8 +262,8 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
+
+#endif
+
-+#else
-+
+ #else
+
#define _CA_PRIVATE_DEF_CLS(symbol) extern void* s_k##symbol
#define _CA_PRIVATE_DEF_PRO(symbol) extern void* s_k##symbol
#define _CA_PRIVATE_DEF_SEL(accessor, symbol) extern SEL s_k##accessor
@@ -267,7 +272,7 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
#endif // CA_PRIVATE_IMPLEMENTATION
-@@ -76,6 +109,7 @@
+@@ -76,6 +109,7 @@ namespace Private
namespace Class
{
_CA_PRIVATE_DEF_CLS(CAMetalLayer);
@@ -275,7 +280,7 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
} // Class
} // Private
} // CA
-@@ -107,6 +141,8 @@
+@@ -107,6 +141,8 @@ namespace Private
"allowsNextDrawableTimeout");
_CA_PRIVATE_DEF_SEL(colorspace,
"colorspace");
@@ -284,7 +289,7 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
_CA_PRIVATE_DEF_SEL(device,
"device");
_CA_PRIVATE_DEF_SEL(displaySyncEnabled,
-@@ -121,14 +157,20 @@
+@@ -121,14 +157,20 @@ namespace Private
"maximumDrawableCount");
_CA_PRIVATE_DEF_SEL(nextDrawable,
"nextDrawable");
@@ -305,7 +310,7 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
_CA_PRIVATE_DEF_SEL(setDevice_,
"setDevice:");
_CA_PRIVATE_DEF_SEL(setDisplaySyncEnabled_,
-@@ -139,10 +181,19 @@
+@@ -139,10 +181,19 @@ namespace Private
"setFramebufferOnly:");
_CA_PRIVATE_DEF_SEL(setMaximumDrawableCount_,
"setMaximumDrawableCount:");
@@ -325,9 +330,10 @@ diff -ruN original/QuartzCore/CAPrivate.hpp patched/QuartzCore/CAPrivate.hpp
} // Class
} // Private
} // CA
-diff -ruN original/QuartzCore/QuartzCore.hpp patched/QuartzCore/QuartzCore.hpp
---- original/QuartzCore/QuartzCore.hpp 2026-02-18 06:41:30
-+++ patched/QuartzCore/QuartzCore.hpp 2026-02-18 06:41:31
+diff --git a/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp b/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp
+index 681003ad60..01418e0c15 100644
+--- a/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp
++++ b/thirdparty/metal-cpp/QuartzCore/QuartzCore.hpp
@@ -22,6 +22,7 @@
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/thirdparty/metal-cpp/patches/0002-sharedptr-nil-safe-retain-release.patch b/thirdparty/metal-cpp/patches/0002-sharedptr-nil-safe-retain-release.patch
index 4bf7299b2ec..750d352b6a4 100644
--- a/thirdparty/metal-cpp/patches/0002-sharedptr-nil-safe-retain-release.patch
+++ b/thirdparty/metal-cpp/patches/0002-sharedptr-nil-safe-retain-release.patch
@@ -1,6 +1,7 @@
-diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
---- original/Foundation/NSSharedPtr.hpp 2026-09-12 13:18:42
-+++ patched/Foundation/NSSharedPtr.hpp 2026-09-12 13:18:42
+diff --git a/thirdparty/metal-cpp/Foundation/NSSharedPtr.hpp b/thirdparty/metal-cpp/Foundation/NSSharedPtr.hpp
+index f1cf68e421..27db7e36ca 100644
+--- a/thirdparty/metal-cpp/Foundation/NSSharedPtr.hpp
++++ b/thirdparty/metal-cpp/Foundation/NSSharedPtr.hpp
@@ -22,6 +22,7 @@
#include <cstddef>
@@ -9,7 +10,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
namespace NS
{
-@@ -139,7 +140,7 @@
+@@ -139,7 +140,7 @@ template <class _Class>
_NS_INLINE NS::SharedPtr<_Class> RetainPtr(_Class* pObject)
{
NS::SharedPtr<_Class> ret;
@@ -18,7 +19,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
return ret;
}
-@@ -167,7 +168,7 @@
+@@ -167,7 +168,7 @@ _NS_INLINE NS::SharedPtr<_Class>::SharedPtr()
template <class _Class>
_NS_INLINE NS::SharedPtr<_Class>::~SharedPtr<_Class>() __attribute__((no_sanitize("undefined")))
{
@@ -27,7 +28,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
}
template <class _Class>
-@@ -178,14 +179,14 @@
+@@ -178,14 +179,14 @@ _NS_INLINE NS::SharedPtr<_Class>::SharedPtr(std::nullptr_t) noexcept
template <class _Class>
_NS_INLINE NS::SharedPtr<_Class>::SharedPtr(const SharedPtr<_Class>& other) noexcept
@@ -44,7 +45,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
{
}
-@@ -225,7 +226,7 @@
+@@ -225,7 +226,7 @@ _NS_INLINE NS::SharedPtr<_Class>::operator bool() const
template <class _Class>
_NS_INLINE void NS::SharedPtr<_Class>::reset() __attribute__((no_sanitize("undefined")))
{
@@ -53,7 +54,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
m_pObject = nullptr;
}
-@@ -240,9 +241,9 @@
+@@ -240,9 +241,9 @@ _NS_INLINE NS::SharedPtr<_Class>& NS::SharedPtr<_Class>::operator=(const SharedP
{
_Class* pOldObject = m_pObject;
@@ -65,7 +66,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
return *this;
}
-@@ -254,9 +255,9 @@
+@@ -254,9 +255,9 @@ _NS_INLINE NS::SharedPtr<_Class>::operator=(const SharedPtr<_OtherClass>& other)
{
_Class* pOldObject = m_pObject;
@@ -77,7 +78,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
return *this;
}
-@@ -266,13 +267,13 @@
+@@ -266,13 +267,13 @@ _NS_INLINE NS::SharedPtr<_Class>& NS::SharedPtr<_Class>::operator=(SharedPtr<_Cl
{
if (m_pObject != other.m_pObject)
{
@@ -93,7 +94,7 @@ diff -ruN original/Foundation/NSSharedPtr.hpp patched/Foundation/NSSharedPtr.hpp
}
other.m_pObject = nullptr;
return *this;
-@@ -285,7 +286,7 @@
+@@ -285,7 +286,7 @@ _NS_INLINE NS::SharedPtr<_Class>::operator=(SharedPtr<_OtherClass>&& other) __at
{
if (m_pObject != other.get())
{
diff --git a/thirdparty/metal-cpp/update-metal-cpp.sh b/thirdparty/metal-cpp/update-metal-cpp.sh
index 22d761123d3..b3a4adbee56 100755
--- a/thirdparty/metal-cpp/update-metal-cpp.sh
+++ b/thirdparty/metal-cpp/update-metal-cpp.sh
@@ -19,9 +19,13 @@ if [ -n "$1" ]; then
"$SCRIPT_DIR/Metal" \
"$SCRIPT_DIR/MetalFX" \
"$SCRIPT_DIR/QuartzCore" \
- "$SCRIPT_DIR/SingleHeader"
+ "$SCRIPT_DIR/LICENSE.txt"
- unzip -q "$1" -d "$SCRIPT_DIR"
+ # The ZIP contains a top-level `metal-cpp` folder.
+ TMP_DIR="$(mktemp -d)"
+ unzip -q "$1" -d "$TMP_DIR"
+ cp -r "$TMP_DIR"/metal-cpp/{Foundation,Metal,MetalFX,QuartzCore,LICENSE.txt} "$SCRIPT_DIR"
+ rm -rf "$TMP_DIR"
echo "Extracted metal-cpp $VERSION"
else
@@ -44,11 +48,10 @@ if [ -d "$PATCH_DIR" ]; then
fi
PATCH_NAME="$(basename "$PATCH")"
- PATCH_DIRECTORY="${SCRIPT_DIR#"$REPO_ROOT"/}"
- if git -C "$REPO_ROOT" apply --directory="$PATCH_DIRECTORY" --check "$PATCH" > /dev/null 2>&1; then
- git -C "$REPO_ROOT" apply --directory="$PATCH_DIRECTORY" "$PATCH"
+ if git -C "$REPO_ROOT" apply --check "$PATCH" > /dev/null 2>&1; then
+ git -C "$REPO_ROOT" apply "$PATCH"
echo " $PATCH_NAME: applied"
- elif git -C "$REPO_ROOT" apply --directory="$PATCH_DIRECTORY" --reverse --check "$PATCH" > /dev/null 2>&1; then
+ elif git -C "$REPO_ROOT" apply --reverse --check "$PATCH" > /dev/null 2>&1; then
echo " $PATCH_NAME: already applied"
else
echo " $PATCH_NAME: failed to apply"
diff --git a/thirdparty/minizip/patches/0001-godot-seek.patch b/thirdparty/minizip/patches/0001-godot-seek.patch
index 0790b9a0901..225dba2df95 100644
--- a/thirdparty/minizip/patches/0001-godot-seek.patch
+++ b/thirdparty/minizip/patches/0001-godot-seek.patch
@@ -1,5 +1,5 @@
diff --git a/thirdparty/minizip/ioapi.c b/thirdparty/minizip/ioapi.c
-index 3dbefe48c2..b072ecdcc2 100644
+index 3ee975162e..5712ca4aa1 100644
--- a/thirdparty/minizip/ioapi.c
+++ b/thirdparty/minizip/ioapi.c
@@ -75,9 +75,12 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef
@@ -22,7 +22,7 @@ index 3dbefe48c2..b072ecdcc2 100644
+
+#endif
diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
-index 6b9968c732..be64d7db45 100644
+index a5211239ea..71cab00926 100644
--- a/thirdparty/minizip/ioapi.h
+++ b/thirdparty/minizip/ioapi.h
@@ -128,6 +128,8 @@ typedef struct zlib_filefunc_def_s
@@ -44,10 +44,10 @@ index 6b9968c732..be64d7db45 100644
void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def);
diff --git a/thirdparty/minizip/unzip.c b/thirdparty/minizip/unzip.c
-index e9088bd542..98a568e098 100644
+index d7ff21cb54..a68333aa10 100644
--- a/thirdparty/minizip/unzip.c
+++ b/thirdparty/minizip/unzip.c
-@@ -148,6 +148,7 @@ typedef struct
+@@ -150,6 +150,7 @@ typedef struct
uLong compression_method; /* compression method (0==store) */
ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
int raw;
@@ -55,7 +55,7 @@ index e9088bd542..98a568e098 100644
} file_in_zip64_read_info_s;
-@@ -509,9 +510,9 @@ local unzFile unzOpenInternal(const void *path,
+@@ -511,9 +512,9 @@ local unzFile unzOpenInternal(const void *path,
us.z_filefunc.zseek32_file = NULL;
us.z_filefunc.ztell32_file = NULL;
if (pzlib_filefunc64_32_def==NULL)
@@ -68,7 +68,7 @@ index e9088bd542..98a568e098 100644
us.is64bitOpenFunction = is64bitOpenFunction;
-@@ -699,6 +700,15 @@ extern unzFile ZEXPORT unzOpen64(const void *path) {
+@@ -702,6 +703,15 @@ extern unzFile ZEXPORT unzOpen64(const void *path) {
return unzOpenInternal(path, NULL, 1);
}
@@ -84,7 +84,7 @@ index e9088bd542..98a568e098 100644
/*
Close a ZipFile opened with unzOpen.
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
-@@ -901,10 +911,19 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file,
+@@ -904,10 +914,19 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file,
if (lSeek!=0)
{
@@ -108,7 +108,7 @@ index e9088bd542..98a568e098 100644
}
while(acc < file_info.size_file_extra)
-@@ -1442,8 +1461,8 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
+@@ -1445,8 +1464,8 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
}
else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw))
{
@@ -119,7 +119,7 @@ index e9088bd542..98a568e098 100644
pfile_in_zip_read_info->stream.opaque = (voidpf)0;
pfile_in_zip_read_info->stream.next_in = 0;
pfile_in_zip_read_info->stream.avail_in = 0;
-@@ -1476,6 +1495,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
+@@ -1479,6 +1498,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
iSizeVar;
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
@@ -127,7 +127,7 @@ index e9088bd542..98a568e098 100644
s->pfile_in_zip_read = pfile_in_zip_read_info;
s->encrypted = 0;
-@@ -1506,6 +1526,84 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
+@@ -1509,6 +1529,84 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
return UNZ_OK;
}
@@ -213,10 +213,10 @@ index e9088bd542..98a568e098 100644
return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
}
diff --git a/thirdparty/minizip/unzip.h b/thirdparty/minizip/unzip.h
-index ceb614e783..d515cdafce 100644
+index 9c98b608c7..6ccd2c4eaf 100644
--- a/thirdparty/minizip/unzip.h
+++ b/thirdparty/minizip/unzip.h
-@@ -202,6 +202,8 @@ extern int ZEXPORT unzClose(unzFile file);
+@@ -203,6 +203,8 @@ extern int ZEXPORT unzClose(unzFile file);
these files MUST be closed with unzCloseCurrentFile before call unzClose.
return UNZ_OK if there is no problem. */
@@ -225,7 +225,7 @@ index ceb614e783..d515cdafce 100644
extern int ZEXPORT unzGetGlobalInfo(unzFile file,
unz_global_info *pglobal_info);
-@@ -394,6 +396,11 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file,
+@@ -395,6 +397,11 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file,
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
@@ -238,10 +238,10 @@ index ceb614e783..d515cdafce 100644
extern ZPOS64_T ZEXPORT unztell64(unzFile file);
diff --git a/thirdparty/minizip/zip.c b/thirdparty/minizip/zip.c
-index 103f325d37..4fd193e1f3 100644
+index 31005c51b0..73483d2163 100644
--- a/thirdparty/minizip/zip.c
+++ b/thirdparty/minizip/zip.c
-@@ -1061,9 +1061,9 @@ extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* glo
+@@ -1064,9 +1064,9 @@ extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* glo
ziinit.z_filefunc.zseek32_file = NULL;
ziinit.z_filefunc.ztell32_file = NULL;
@@ -254,7 +254,7 @@ index 103f325d37..4fd193e1f3 100644
ziinit.z_filefunc = *pzlib_filefunc64_32_def;
ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
-@@ -1423,8 +1423,8 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
+@@ -1470,8 +1470,8 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
{
if(zi->ci.method == Z_DEFLATED)
{
diff --git a/thirdparty/misc/ifaddrs-android.cc b/thirdparty/misc/ifaddrs-android.cc
index 1f8835b829c..06bb4e1dcaf 100644
--- a/thirdparty/misc/ifaddrs-android.cc
+++ b/thirdparty/misc/ifaddrs-android.cc
@@ -38,13 +38,16 @@
#include <errno.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+
struct netlinkrequest {
nlmsghdr header;
ifaddrmsg msg;
};
+
namespace {
const int kMaxReadSize = 4096;
};
+
int set_ifname(struct ifaddrs* ifaddr, int interface) {
char buf[IFNAMSIZ] = {0};
char* name = if_indextoname(interface, buf);
@@ -55,6 +58,7 @@ int set_ifname(struct ifaddrs* ifaddr, int interface) {
strncpy(ifaddr->ifa_name, name, strlen(name) + 1);
return 0;
}
+
int set_flags(struct ifaddrs* ifaddr) {
int fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd == -1) {
@@ -71,6 +75,7 @@ int set_flags(struct ifaddrs* ifaddr) {
ifaddr->ifa_flags = ifr.ifr_flags;
return 0;
}
+
int set_addresses(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* data,
size_t len) {
if (msg->ifa_family == AF_INET) {
@@ -89,6 +94,7 @@ int set_addresses(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* data,
}
return 0;
}
+
int make_prefixes(struct ifaddrs* ifaddr, int family, int prefixlen) {
char* prefix = NULL;
if (family == AF_INET) {
@@ -120,6 +126,7 @@ int make_prefixes(struct ifaddrs* ifaddr, int family, int prefixlen) {
*prefix = remainder;
return 0;
}
+
int populate_ifaddrs(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* bytes,
size_t len) {
if (set_ifname(ifaddr, msg->ifa_index) != 0) {
@@ -136,16 +143,19 @@ int populate_ifaddrs(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* bytes,
}
return 0;
}
+
int getifaddrs(struct ifaddrs** result) {
int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (fd < 0) {
return -1;
}
+
netlinkrequest ifaddr_request;
memset(&ifaddr_request, 0, sizeof(ifaddr_request));
ifaddr_request.header.nlmsg_flags = NLM_F_ROOT | NLM_F_REQUEST;
ifaddr_request.header.nlmsg_type = RTM_GETADDR;
ifaddr_request.header.nlmsg_len = NLMSG_LENGTH(sizeof(ifaddrmsg));
+
ssize_t count = send(fd, &ifaddr_request, ifaddr_request.header.nlmsg_len, 0);
if (static_cast<size_t>(count) != ifaddr_request.header.nlmsg_len) {
close(fd);
@@ -207,6 +217,7 @@ int getifaddrs(struct ifaddrs** result) {
freeifaddrs(start);
return -1;
}
+
void freeifaddrs(struct ifaddrs* addrs) {
struct ifaddrs* last = NULL;
struct ifaddrs* cursor = addrs;
diff --git a/thirdparty/misc/ok_color.h b/thirdparty/misc/ok_color.h
index 2cc7f1ceef6..d690567d987 100644
--- a/thirdparty/misc/ok_color.h
+++ b/thirdparty/misc/ok_color.h
@@ -1,12 +1,13 @@
+#pragma once
// Copyright(c) 2021 Björn Ottosson
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
-// this software and associated documentation files(the "Software"), to deal in
+// this softwareand associated documentation files(the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and /or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions :
-// The above copyright notice and this permission notice shall be included in all
+// The above copyright noticeand this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@@ -16,9 +17,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
-#ifndef OK_COLOR_H
-#define OK_COLOR_H
-
#include <cmath>
#include <cfloat>
@@ -33,7 +31,7 @@ struct HSL { float h; float s; float l; };
struct LC { float L; float C; };
// Alternative representation of (L_cusp, C_cusp)
-// Encoded so S = C_cusp/L_cusp and T = C_cusp/(1-L_cusp)
+// Encoded so S = C_cusp/L_cusp and T = C_cusp/(1-L_cusp)
// The maximum value for C in the triangle is then found as fmin(S*L, T*(1-L)), for a given L
struct ST { float S; float T; };
@@ -132,7 +130,7 @@ static float compute_max_saturation(float a, float b)
// Do one step Halley's method to get closer
// this gives an error less than 10e6, except for some blue hues where the dS/dh is close to infinite
- // this should be sufficient for most applications, otherwise do two/three steps
+ // this should be sufficient for most applications, otherwise do two/three steps
float k_l = +0.3963377774f * a + 0.2158037573f * b;
float k_m = -0.1055613458f * a - 0.0638541728f * b;
@@ -180,7 +178,7 @@ static LC find_cusp(float a, float b)
return { L_cusp , C_cusp };
}
-// Finds intersection of the line defined by
+// Finds intersection of the line defined by
// L = L0 * (1 - t) + t * L1;
// C = t * C1;
// a and b must be normalized so a^2 + b^2 == 1
@@ -454,7 +452,7 @@ static Cs get_Cs(float L, float a_, float b_)
float C_max = find_gamut_intersection(a_, b_, L, 1, L, cusp);
ST ST_max = to_ST(cusp);
-
+
// Scale factor to compensate for the curved part of gamut shape:
float k = C_max / fmin((L * ST_max.S), (1 - L) * ST_max.T);
@@ -601,7 +599,7 @@ static RGB okhsv_to_srgb(HSV hsv)
float a_ = cosf(2.f * pi * h);
float b_ = sinf(2.f * pi * h);
-
+
LC cusp = find_cusp(a_, b_);
ST ST_max = to_ST(cusp);
float S_max = ST_max.S;
@@ -690,4 +688,3 @@ static HSV srgb_to_okhsv(RGB rgb)
}
};
-#endif // OK_COLOR_H
diff --git a/thirdparty/misc/patches/ifaddrs-android-0001-godot-changes.patch b/thirdparty/misc/patches/ifaddrs-android-0001-godot-changes.patch
new file mode 100644
index 00000000000..62d70f7b575
--- /dev/null
+++ b/thirdparty/misc/patches/ifaddrs-android-0001-godot-changes.patch
@@ -0,0 +1,19 @@
+diff --git a/thirdparty/misc/ifaddrs-android.cc b/thirdparty/misc/ifaddrs-android.cc
+index 78268406ea..06bb4e1dca 100644
+--- a/thirdparty/misc/ifaddrs-android.cc
++++ b/thirdparty/misc/ifaddrs-android.cc
+@@ -25,8 +25,7 @@
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#if defined(ANDROID)
+-#include "talk/base/ifaddrs-android.h"
++#include "ifaddrs-android.h"
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -231,4 +230,3 @@ void freeifaddrs(struct ifaddrs* addrs) {
+ delete last;
+ }
+ }
+-#endif // defined(ANDROID)
diff --git a/thirdparty/misc/patches/ifaddrs-android-0001-complete-struct.patch b/thirdparty/misc/patches/ifaddrs-android-0002-complete-struct.patch
similarity index 100%
rename from thirdparty/misc/patches/ifaddrs-android-0001-complete-struct.patch
rename to thirdparty/misc/patches/ifaddrs-android-0002-complete-struct.patch
diff --git a/thirdparty/misc/patches/ok_color-0001-godot-changes.patch b/thirdparty/misc/patches/ok_color-0001-godot-changes.patch
new file mode 100644
index 00000000000..1aa4d91bac2
--- /dev/null
+++ b/thirdparty/misc/patches/ok_color-0001-godot-changes.patch
@@ -0,0 +1,240 @@
+diff --git a/thirdparty/misc/ok_color.h b/thirdparty/misc/ok_color.h
+index 608ee56538..1e4c713a1d 100644
+--- a/thirdparty/misc/ok_color.h
++++ b/thirdparty/misc/ok_color.h
+@@ -20,8 +20,9 @@
+ #include <cmath>
+ #include <cfloat>
+
+-namespace ok_color
++class ok_color
+ {
++public:
+
+ struct Lab { float L; float a; float b; };
+ struct RGB { float r; float g; float b; };
+@@ -34,9 +35,9 @@ struct LC { float L; float C; };
+ // The maximum value for C in the triangle is then found as fmin(S*L, T*(1-L)), for a given L
+ struct ST { float S; float T; };
+
+-constexpr float pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062f;
++static constexpr float pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062f;
+
+-float clamp(float x, float min, float max)
++static float clamp(float x, float min, float max)
+ {
+ if (x < min)
+ return min;
+@@ -46,22 +47,22 @@ float clamp(float x, float min, float max)
+ return x;
+ }
+
+-float sgn(float x)
++static float sgn(float x)
+ {
+ return (float)(0.f < x) - (float)(x < 0.f);
+ }
+
+-float srgb_transfer_function(float a)
++static float srgb_transfer_function(float a)
+ {
+ return .0031308f >= a ? 12.92f * a : 1.055f * powf(a, .4166666666666667f) - .055f;
+ }
+
+-float srgb_transfer_function_inv(float a)
++static float srgb_transfer_function_inv(float a)
+ {
+ return .04045f < a ? powf((a + .055f) / 1.055f, 2.4f) : a / 12.92f;
+ }
+
+-Lab linear_srgb_to_oklab(RGB c)
++static Lab linear_srgb_to_oklab(RGB c)
+ {
+ float l = 0.4122214708f * c.r + 0.5363325363f * c.g + 0.0514459929f * c.b;
+ float m = 0.2119034982f * c.r + 0.6806995451f * c.g + 0.1073969566f * c.b;
+@@ -78,7 +79,7 @@ Lab linear_srgb_to_oklab(RGB c)
+ };
+ }
+
+-RGB oklab_to_linear_srgb(Lab c)
++static RGB oklab_to_linear_srgb(Lab c)
+ {
+ float l_ = c.L + 0.3963377774f * c.a + 0.2158037573f * c.b;
+ float m_ = c.L - 0.1055613458f * c.a - 0.0638541728f * c.b;
+@@ -98,7 +99,7 @@ RGB oklab_to_linear_srgb(Lab c)
+ // Finds the maximum saturation possible for a given hue that fits in sRGB
+ // Saturation here is defined as S = C/L
+ // a and b must be normalized so a^2 + b^2 == 1
+-float compute_max_saturation(float a, float b)
++static float compute_max_saturation(float a, float b)
+ {
+ // Max saturation will be when one of r, g or b goes below zero.
+
+@@ -164,7 +165,7 @@ float compute_max_saturation(float a, float b)
+
+ // finds L_cusp and C_cusp for a given hue
+ // a and b must be normalized so a^2 + b^2 == 1
+-LC find_cusp(float a, float b)
++static LC find_cusp(float a, float b)
+ {
+ // First, find the maximum saturation (saturation S = C/L)
+ float S_cusp = compute_max_saturation(a, b);
+@@ -181,7 +182,7 @@ LC find_cusp(float a, float b)
+ // L = L0 * (1 - t) + t * L1;
+ // C = t * C1;
+ // a and b must be normalized so a^2 + b^2 == 1
+-float find_gamut_intersection(float a, float b, float L1, float C1, float L0, LC cusp)
++static float find_gamut_intersection(float a, float b, float L1, float C1, float L0, LC cusp)
+ {
+ // Find the intersection for upper and lower half seprately
+ float t;
+@@ -247,7 +248,7 @@ float find_gamut_intersection(float a, float b, float L1, float C1, float L0, LC
+ float u_g = g1 / (g1 * g1 - 0.5f * g * g2);
+ float t_g = -g * u_g;
+
+- float b = -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s - 1;
++ b = -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s - 1;
+ float b1 = -0.0041960863f * ldt - 0.7034186147f * mdt + 1.7076147010f * sdt;
+ float b2 = -0.0041960863f * ldt2 - 0.7034186147f * mdt2 + 1.7076147010f * sdt2;
+
+@@ -266,7 +267,7 @@ float find_gamut_intersection(float a, float b, float L1, float C1, float L0, LC
+ return t;
+ }
+
+-float find_gamut_intersection(float a, float b, float L1, float C1, float L0)
++static float find_gamut_intersection(float a, float b, float L1, float C1, float L0)
+ {
+ // Find the cusp of the gamut triangle
+ LC cusp = find_cusp(a, b);
+@@ -274,7 +275,7 @@ float find_gamut_intersection(float a, float b, float L1, float C1, float L0)
+ return find_gamut_intersection(a, b, L1, C1, L0, cusp);
+ }
+
+-RGB gamut_clip_preserve_chroma(RGB rgb)
++static RGB gamut_clip_preserve_chroma(RGB rgb)
+ {
+ if (rgb.r < 1 && rgb.g < 1 && rgb.b < 1 && rgb.r > 0 && rgb.g > 0 && rgb.b > 0)
+ return rgb;
+@@ -296,7 +297,7 @@ RGB gamut_clip_preserve_chroma(RGB rgb)
+ return oklab_to_linear_srgb({ L_clipped, C_clipped * a_, C_clipped * b_ });
+ }
+
+-RGB gamut_clip_project_to_0_5(RGB rgb)
++static RGB gamut_clip_project_to_0_5(RGB rgb)
+ {
+ if (rgb.r < 1 && rgb.g < 1 && rgb.b < 1 && rgb.r > 0 && rgb.g > 0 && rgb.b > 0)
+ return rgb;
+@@ -318,7 +319,7 @@ RGB gamut_clip_project_to_0_5(RGB rgb)
+ return oklab_to_linear_srgb({ L_clipped, C_clipped * a_, C_clipped * b_ });
+ }
+
+-RGB gamut_clip_project_to_L_cusp(RGB rgb)
++static RGB gamut_clip_project_to_L_cusp(RGB rgb)
+ {
+ if (rgb.r < 1 && rgb.g < 1 && rgb.b < 1 && rgb.r > 0 && rgb.g > 0 && rgb.b > 0)
+ return rgb;
+@@ -344,7 +345,7 @@ RGB gamut_clip_project_to_L_cusp(RGB rgb)
+ return oklab_to_linear_srgb({ L_clipped, C_clipped * a_, C_clipped * b_ });
+ }
+
+-RGB gamut_clip_adaptive_L0_0_5(RGB rgb, float alpha = 0.05f)
++static RGB gamut_clip_adaptive_L0_0_5(RGB rgb, float alpha = 0.05f)
+ {
+ if (rgb.r < 1 && rgb.g < 1 && rgb.b < 1 && rgb.r > 0 && rgb.g > 0 && rgb.b > 0)
+ return rgb;
+@@ -368,7 +369,7 @@ RGB gamut_clip_adaptive_L0_0_5(RGB rgb, float alpha = 0.05f)
+ return oklab_to_linear_srgb({ L_clipped, C_clipped * a_, C_clipped * b_ });
+ }
+
+-RGB gamut_clip_adaptive_L0_L_cusp(RGB rgb, float alpha = 0.05f)
++static RGB gamut_clip_adaptive_L0_L_cusp(RGB rgb, float alpha = 0.05f)
+ {
+ if (rgb.r < 1 && rgb.g < 1 && rgb.b < 1 && rgb.r > 0 && rgb.g > 0 && rgb.b > 0)
+ return rgb;
+@@ -397,7 +398,7 @@ RGB gamut_clip_adaptive_L0_L_cusp(RGB rgb, float alpha = 0.05f)
+ return oklab_to_linear_srgb({ L_clipped, C_clipped * a_, C_clipped * b_ });
+ }
+
+-float toe(float x)
++static float toe(float x)
+ {
+ constexpr float k_1 = 0.206f;
+ constexpr float k_2 = 0.03f;
+@@ -405,7 +406,7 @@ float toe(float x)
+ return 0.5f * (k_3 * x - k_1 + sqrtf((k_3 * x - k_1) * (k_3 * x - k_1) + 4 * k_2 * k_3 * x));
+ }
+
+-float toe_inv(float x)
++static float toe_inv(float x)
+ {
+ constexpr float k_1 = 0.206f;
+ constexpr float k_2 = 0.03f;
+@@ -413,7 +414,7 @@ float toe_inv(float x)
+ return (x * x + k_1 * x) / (k_3 * (x + k_2));
+ }
+
+-ST to_ST(LC cusp)
++static ST to_ST(LC cusp)
+ {
+ float L = cusp.L;
+ float C = cusp.C;
+@@ -423,7 +424,7 @@ ST to_ST(LC cusp)
+ // Returns a smooth approximation of the location of the cusp
+ // This polynomial was created by an optimization process
+ // It has been designed so that S_mid < S_max and T_mid < T_max
+-ST get_ST_mid(float a_, float b_)
++static ST get_ST_mid(float a_, float b_)
+ {
+ float S = 0.11516993f + 1.f / (
+ +7.44778970f + 4.15901240f * b_
+@@ -445,7 +446,7 @@ ST get_ST_mid(float a_, float b_)
+ }
+
+ struct Cs { float C_0; float C_mid; float C_max; };
+-Cs get_Cs(float L, float a_, float b_)
++static Cs get_Cs(float L, float a_, float b_)
+ {
+ LC cusp = find_cusp(a_, b_);
+
+@@ -478,7 +479,7 @@ Cs get_Cs(float L, float a_, float b_)
+ return { C_0, C_mid, C_max };
+ }
+
+-RGB okhsl_to_srgb(HSL hsl)
++static RGB okhsl_to_srgb(HSL hsl)
+ {
+ float h = hsl.h;
+ float s = hsl.s;
+@@ -536,7 +537,7 @@ RGB okhsl_to_srgb(HSL hsl)
+ };
+ }
+
+-HSL srgb_to_okhsl(RGB rgb)
++static HSL srgb_to_okhsl(RGB rgb)
+ {
+ Lab lab = linear_srgb_to_oklab({
+ srgb_transfer_function_inv(rgb.r),
+@@ -585,7 +586,7 @@ HSL srgb_to_okhsl(RGB rgb)
+ }
+
+
+-RGB okhsv_to_srgb(HSV hsv)
++static RGB okhsv_to_srgb(HSV hsv)
+ {
+ float h = hsv.h;
+ float s = hsv.s;
+@@ -632,7 +633,7 @@ RGB okhsv_to_srgb(HSV hsv)
+ };
+ }
+
+-HSV srgb_to_okhsv(RGB rgb)
++static HSV srgb_to_okhsv(RGB rgb)
+ {
+ Lab lab = linear_srgb_to_oklab({
+ srgb_transfer_function_inv(rgb.r),
+@@ -681,4 +682,4 @@ HSV srgb_to_okhsv(RGB rgb)
+ return { h, s, v };
+ }
+
+-} // namespace ok_color
++};
diff --git a/thirdparty/misc/patches/ok_color-0001-srgb_to_okhsl_precision.patch b/thirdparty/misc/patches/ok_color-0002-srgb_to_okhsl_precision.patch
similarity index 82%
rename from thirdparty/misc/patches/ok_color-0001-srgb_to_okhsl_precision.patch
rename to thirdparty/misc/patches/ok_color-0002-srgb_to_okhsl_precision.patch
index 35996445ddb..abe8e39694f 100644
--- a/thirdparty/misc/patches/ok_color-0001-srgb_to_okhsl_precision.patch
+++ b/thirdparty/misc/patches/ok_color-0002-srgb_to_okhsl_precision.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/misc/ok_color.h b/thirdparty/misc/ok_color.h
-index 4d0f0049bd..2cc7f1ceef 100644
+index 1e4c713a1d..d690567d98 100644
--- a/thirdparty/misc/ok_color.h
+++ b/thirdparty/misc/ok_color.h
-@@ -541,6 +541,11 @@ static RGB okhsl_to_srgb(HSL hsl)
+@@ -539,6 +539,11 @@ static RGB okhsl_to_srgb(HSL hsl)
static HSL srgb_to_okhsl(RGB rgb)
{
diff --git a/thirdparty/misc/patches/smaz-0001-write-string-warning.patch b/thirdparty/misc/patches/smaz-0001-write-string-warning.patch
index c76d0590235..686af01b82d 100644
--- a/thirdparty/misc/patches/smaz-0001-write-string-warning.patch
+++ b/thirdparty/misc/patches/smaz-0001-write-string-warning.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/misc/smaz.c b/thirdparty/misc/smaz.c
-index aa674c3858..6f9ea20e67 100644
+index 9b1ebc2136..555dfea844 100644
--- a/thirdparty/misc/smaz.c
+++ b/thirdparty/misc/smaz.c
-@@ -1,7 +1,7 @@
+@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <string.h>
/* Our compression codebook, used for compression */
@@ -11,7 +11,7 @@ index aa674c3858..6f9ea20e67 100644
"\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
"\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
"\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
-@@ -76,7 +76,7 @@ static char *Smaz_rcb[254] = {
+@@ -89,7 +89,7 @@ static char *Smaz_rcb[254] = {
"e, ", " it", "whi", " ma", "ge", "x", "e c", "men", ".com"
};
@@ -20,7 +20,7 @@ index aa674c3858..6f9ea20e67 100644
unsigned int h1,h2,h3=0;
int verblen = 0, _outlen = outlen;
char verb[256], *_out = out;
-@@ -154,7 +154,7 @@ out:
+@@ -167,7 +167,7 @@ out:
return out-_out;
}
@@ -29,7 +29,7 @@ index aa674c3858..6f9ea20e67 100644
unsigned char *c = (unsigned char*) in;
char *_out = out;
int _outlen = outlen;
-@@ -179,7 +179,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
+@@ -192,7 +192,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
inlen -= 2+len;
} else {
/* Codebook entry */
@@ -39,10 +39,10 @@ index aa674c3858..6f9ea20e67 100644
if (outlen < len) return _outlen+1;
diff --git a/thirdparty/misc/smaz.h b/thirdparty/misc/smaz.h
-index ce9c35d6b2..d8e1f8a6a5 100644
+index a547d89fdb..a9d8a337a7 100644
--- a/thirdparty/misc/smaz.h
+++ b/thirdparty/misc/smaz.h
-@@ -1,7 +1,7 @@
+@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#ifndef _SMAZ_H
#define _SMAZ_H
diff --git a/thirdparty/misc/yuv2rgb.h b/thirdparty/misc/yuv2rgb.h
index e8ccd427d02..5be94b4115a 100644
--- a/thirdparty/misc/yuv2rgb.h
+++ b/thirdparty/misc/yuv2rgb.h
@@ -1,4 +1,4 @@
-/* Thirdparty code presumably from http://wss.co.uk/pinknoise/yuv2rgb/ */
+/* Thirdparty code from http://wss.co.uk/pinknoise/yuv2rgb/ (yuv2rgb003.zip) */
/*
This YUV2RGB code is Copyright (C) 2008-11 Robin Watts
diff --git a/thirdparty/offset_allocator/patches/0001-fix-allocation-count-tracking.patch b/thirdparty/offset_allocator/patches/0001-fix-allocation-count-tracking.patch
index 1eaa8e24271..d66164e96a1 100644
--- a/thirdparty/offset_allocator/patches/0001-fix-allocation-count-tracking.patch
+++ b/thirdparty/offset_allocator/patches/0001-fix-allocation-count-tracking.patch
@@ -1,4 +1,5 @@
diff --git a/thirdparty/offset_allocator/offsetAllocator.cpp b/thirdparty/offset_allocator/offsetAllocator.cpp
+index a51f9dbf6d..16a97f0aa5 100644
--- a/thirdparty/offset_allocator/offsetAllocator.cpp
+++ b/thirdparty/offset_allocator/offsetAllocator.cpp
@@ -170,7 +170,7 @@ namespace OffsetAllocator
diff --git a/thirdparty/offset_allocator/patches/0002-fix-16-bit-node-indices.patch b/thirdparty/offset_allocator/patches/0002-fix-16-bit-node-indices.patch
index 385a7cbee85..fbe7ce2249f 100644
--- a/thirdparty/offset_allocator/patches/0002-fix-16-bit-node-indices.patch
+++ b/thirdparty/offset_allocator/patches/0002-fix-16-bit-node-indices.patch
@@ -1,44 +1,5 @@
-diff --git a/thirdparty/offset_allocator/offsetAllocator.hpp b/thirdparty/offset_allocator/offsetAllocator.hpp
---- a/thirdparty/offset_allocator/offsetAllocator.hpp
-+++ b/thirdparty/offset_allocator/offsetAllocator.hpp
-@@ -10,7 +10,7 @@ namespace OffsetAllocator
- typedef unsigned int uint32;
-
- // 16 bit offsets mode will halve the metadata storage cost
-- // But it only supports up to 65536 maximum allocation count
-+ // But it only supports up to 65534 maximum allocation count
- #ifdef USE_16_BIT_NODE_INDICES
- typedef uint16 NodeIndex;
- #else
-@@ -26,9 +26,10 @@ namespace OffsetAllocator
- struct Allocation
- {
- static constexpr uint32 NO_SPACE = 0xffffffff;
-+ static constexpr NodeIndex NO_SPACE_METADATA = static_cast<NodeIndex>(-1);
-
- uint32 offset = NO_SPACE;
-- NodeIndex metadata = NO_SPACE; // internal: node index
-+ NodeIndex metadata = NO_SPACE_METADATA; // internal: node index
- };
-
- struct StorageReport
-@@ -64,12 +65,12 @@ namespace OffsetAllocator
- StorageReportFull storageReportFull() const;
-
- private:
-- uint32 insertNodeIntoBin(uint32 size, uint32 dataOffset);
-- void removeNodeFromBin(uint32 nodeIndex);
-+ NodeIndex insertNodeIntoBin(uint32 size, uint32 dataOffset);
-+ void removeNodeFromBin(NodeIndex nodeIndex);
-
- struct Node
- {
-- static constexpr NodeIndex unused = 0xffffffff;
-+ static constexpr NodeIndex unused = static_cast<NodeIndex>(-1);
-
- uint32 dataOffset = 0;
- uint32 dataSize = 0;
diff --git a/thirdparty/offset_allocator/offsetAllocator.cpp b/thirdparty/offset_allocator/offsetAllocator.cpp
+index 16a97f0aa5..6d79f756a9 100644
--- a/thirdparty/offset_allocator/offsetAllocator.cpp
+++ b/thirdparty/offset_allocator/offsetAllocator.cpp
@@ -142,7 +142,7 @@ namespace OffsetAllocator
@@ -175,3 +136,44 @@ diff --git a/thirdparty/offset_allocator/offsetAllocator.cpp b/thirdparty/offset
while (nodeIndex != Node::unused)
{
nodeIndex = m_nodes[nodeIndex].binListNext;
+diff --git a/thirdparty/offset_allocator/offsetAllocator.hpp b/thirdparty/offset_allocator/offsetAllocator.hpp
+index 155e21dd95..5468db9d29 100644
+--- a/thirdparty/offset_allocator/offsetAllocator.hpp
++++ b/thirdparty/offset_allocator/offsetAllocator.hpp
+@@ -10,7 +10,7 @@ namespace OffsetAllocator
+ typedef unsigned int uint32;
+
+ // 16 bit offsets mode will halve the metadata storage cost
+- // But it only supports up to 65536 maximum allocation count
++ // But it only supports up to 65534 maximum allocation count
+ #ifdef USE_16_BIT_NODE_INDICES
+ typedef uint16 NodeIndex;
+ #else
+@@ -26,9 +26,10 @@ namespace OffsetAllocator
+ struct Allocation
+ {
+ static constexpr uint32 NO_SPACE = 0xffffffff;
++ static constexpr NodeIndex NO_SPACE_METADATA = static_cast<NodeIndex>(-1);
+
+ uint32 offset = NO_SPACE;
+- NodeIndex metadata = NO_SPACE; // internal: node index
++ NodeIndex metadata = NO_SPACE_METADATA; // internal: node index
+ };
+
+ struct StorageReport
+@@ -64,12 +65,12 @@ namespace OffsetAllocator
+ StorageReportFull storageReportFull() const;
+
+ private:
+- uint32 insertNodeIntoBin(uint32 size, uint32 dataOffset);
+- void removeNodeFromBin(uint32 nodeIndex);
++ NodeIndex insertNodeIntoBin(uint32 size, uint32 dataOffset);
++ void removeNodeFromBin(NodeIndex nodeIndex);
+
+ struct Node
+ {
+- static constexpr NodeIndex unused = 0xffffffff;
++ static constexpr NodeIndex unused = static_cast<NodeIndex>(-1);
+
+ uint32 dataOffset = 0;
+ uint32 dataSize = 0;
diff --git a/thirdparty/offset_allocator/patches/0003-fix-maximum-allocation-size.patch b/thirdparty/offset_allocator/patches/0003-fix-maximum-allocation-size.patch
index f90b1d43faf..a21a9436da0 100644
--- a/thirdparty/offset_allocator/patches/0003-fix-maximum-allocation-size.patch
+++ b/thirdparty/offset_allocator/patches/0003-fix-maximum-allocation-size.patch
@@ -1,4 +1,5 @@
diff --git a/thirdparty/offset_allocator/offsetAllocator.cpp b/thirdparty/offset_allocator/offsetAllocator.cpp
+index 6d79f756a9..4da3d7fd96 100644
--- a/thirdparty/offset_allocator/offsetAllocator.cpp
+++ b/thirdparty/offset_allocator/offsetAllocator.cpp
@@ -73,7 +73,7 @@ namespace OffsetAllocator
diff --git a/thirdparty/offset_allocator/patches/0004-add-header-guard.patch b/thirdparty/offset_allocator/patches/0004-add-header-guard.patch
index cd0cb0c0ecf..47a9ca1a3ae 100644
--- a/thirdparty/offset_allocator/patches/0004-add-header-guard.patch
+++ b/thirdparty/offset_allocator/patches/0004-add-header-guard.patch
@@ -1,4 +1,5 @@
diff --git a/thirdparty/offset_allocator/offsetAllocator.hpp b/thirdparty/offset_allocator/offsetAllocator.hpp
+index 5468db9d29..0991f7aa03 100644
--- a/thirdparty/offset_allocator/offsetAllocator.hpp
+++ b/thirdparty/offset_allocator/offsetAllocator.hpp
@@ -1,6 +1,9 @@
diff --git a/thirdparty/sdl/hidapi/VERSION b/thirdparty/sdl/hidapi/VERSION
index 0548fb4e9b2..a803cc227fe 100644
--- a/thirdparty/sdl/hidapi/VERSION
+++ b/thirdparty/sdl/hidapi/VERSION
@@ -1 +1 @@
-0.14.0
\ No newline at end of file
+0.14.0
diff --git a/thirdparty/sdl/patches/0001-remove-unnecessary-subsystems.patch b/thirdparty/sdl/patches/0001-remove-unnecessary-subsystems.patch
index 03db8714cab..c7af24591f0 100644
--- a/thirdparty/sdl/patches/0001-remove-unnecessary-subsystems.patch
+++ b/thirdparty/sdl/patches/0001-remove-unnecessary-subsystems.patch
@@ -1,8 +1,21 @@
diff --git a/thirdparty/sdl/SDL.c b/thirdparty/sdl/SDL.c
-index 3e61b8ad4a..d8e845057a 100644
+index 3e61b8ad4a..40982f2cfc 100644
--- a/thirdparty/sdl/SDL.c
+++ b/thirdparty/sdl/SDL.c
-@@ -44,23 +44,23 @@
+@@ -30,9 +30,9 @@
+ // this checks for HAVE_DBUS_DBUS_H internally.
+ #include "core/linux/SDL_dbus.h"
+
+-#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
+-#include "core/unix/SDL_gtk.h"
+-#endif
++// #if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
++// #include "core/unix/SDL_gtk.h"
++// #endif
+
+ #ifdef SDL_PLATFORM_EMSCRIPTEN
+ #include <emscripten.h>
+@@ -44,23 +44,25 @@
#include "SDL_hints_c.h"
#include "SDL_log_c.h"
#include "SDL_properties_c.h"
@@ -25,36 +38,50 @@ index 3e61b8ad4a..d8e845057a 100644
-#include "video/SDL_pixels_c.h"
-#include "video/SDL_surface_c.h"
-#include "video/SDL_video_c.h"
--#include "filesystem/SDL_filesystem_c.h"
--#include "io/SDL_asyncio_c.h"
+// #include "tray/SDL_tray_utils.h"
+// #include "video/SDL_pixels_c.h"
+// #include "video/SDL_surface_c.h"
+// #include "video/SDL_video_c.h"
-+// #include "filesystem/SDL_filesystem_c.h"
++#ifndef SDL_FILESYSTEM_DUMMY // Godot change
+ #include "filesystem/SDL_filesystem_c.h"
+-#include "io/SDL_asyncio_c.h"
++#endif
+// #include "io/SDL_asyncio_c.h"
#ifdef SDL_PLATFORM_ANDROID
#include "core/android/SDL_android.h"
#endif
-@@ -301,7 +301,7 @@ void SDL_InitMainThread(void)
+@@ -173,7 +175,7 @@ const char *SDL_GetAppMetadataProperty(const char *name)
+ }
+ if (!value || !*value) {
+ if (SDL_strcmp(name, SDL_PROP_APP_METADATA_NAME_STRING) == 0) {
+- value = SDL_GetExeName();
++ // value = SDL_GetExeName();
+ if (!value) {
+ value = "SDL Application";
+ }
+@@ -300,8 +302,10 @@ void SDL_InitMainThread(void)
+
SDL_InitTLSData();
SDL_InitEnvironment();
- SDL_InitTicks();
-- SDL_InitFilesystem();
-+ // SDL_InitFilesystem();
+- SDL_InitTicks();
++ SDL_InitTicks();
++#ifndef SDL_FILESYSTEM_DUMMY // Godot change
+ SDL_InitFilesystem();
++#endif
if (!done_info) {
const char *value;
-@@ -320,7 +320,7 @@ void SDL_InitMainThread(void)
+@@ -320,7 +324,9 @@ void SDL_InitMainThread(void)
static void SDL_QuitMainThread(void)
{
-- SDL_QuitFilesystem();
-+ // SDL_QuitFilesystem();
++#ifndef SDL_FILESYSTEM_DUMMY // Godot change
+ SDL_QuitFilesystem();
++#endif
SDL_QuitTicks();
SDL_QuitEnvironment();
SDL_QuitTLSData();
-@@ -711,7 +711,7 @@ void SDL_Quit(void)
+@@ -711,7 +717,7 @@ void SDL_Quit(void)
SDL_HelperWindowDestroy();
#endif
SDL_QuitSubSystem(SDL_ALL_SUBSYSTEM_FLAGS);
@@ -63,7 +90,7 @@ index 3e61b8ad4a..d8e845057a 100644
#ifdef SDL_USE_LIBDBUS
SDL_DBus_Quit();
-@@ -722,14 +722,14 @@ void SDL_Quit(void)
+@@ -722,14 +728,14 @@ void SDL_Quit(void)
#endif
SDL_QuitTimers();
@@ -377,8 +404,196 @@ index fa43ee6c57..711fe68881 100644
SDL_free(item->touchscreen_data->slots);
SDL_free(item->touchscreen_data->name);
SDL_free(item->touchscreen_data);
+diff --git a/thirdparty/sdl/core/unix/SDL_appid.c b/thirdparty/sdl/core/unix/SDL_appid.c
+index 95c5dc1a6b..fd0037eb7e 100644
+--- a/thirdparty/sdl/core/unix/SDL_appid.c
++++ b/thirdparty/sdl/core/unix/SDL_appid.c
+@@ -30,7 +30,7 @@ const char *SDL_GetAppID(void)
+
+ if (!id_str) {
+ // If the hint isn't set, try to use the application's executable name
+- id_str = SDL_GetExeName();
++ // id_str = SDL_GetExeName();
+ }
+
+ if (!id_str) {
+diff --git a/thirdparty/sdl/core/windows/SDL_windows.c b/thirdparty/sdl/core/windows/SDL_windows.c
+index b8b27e5ced..c7924bf934 100644
+--- a/thirdparty/sdl/core/windows/SDL_windows.c
++++ b/thirdparty/sdl/core/windows/SDL_windows.c
+@@ -24,7 +24,7 @@
+
+ #include "SDL_windows.h"
+
+-#include "../../video/SDL_surface_c.h"
++// #include "../../video/SDL_surface_c.h"
+
+ #include <shellapi.h> // CommandLineToArgvW()
+
+@@ -534,7 +534,7 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
+ if (ShouldAppsUseDarkModeFunc) {
+ value = ShouldAppsUseDarkModeFunc() ? TRUE : FALSE;
+ } else {
+- value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
++ // value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
+ }
+ FreeLibrary(uxtheme);
+ if (!IsWindowsBuildVersionAtLeast(18362)) {
+@@ -552,79 +552,79 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
+ #endif
+ }
+
+-HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
+-{
+-#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
+- SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
+- if (!s) {
+- return NULL;
+- }
+-
+- /* The dimensions will be needed after s is freed */
+- const int width = s->w;
+- const int height = s->h;
+-
+- BITMAPINFO bmpInfo;
+- SDL_zero(bmpInfo);
+- bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+- bmpInfo.bmiHeader.biWidth = width;
+- bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
+- bmpInfo.bmiHeader.biPlanes = 1;
+- bmpInfo.bmiHeader.biBitCount = 32;
+- bmpInfo.bmiHeader.biCompression = BI_RGB;
+-
+- HDC hdc = GetDC(NULL);
+- void *pBits = NULL;
+- HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
+- if (!hBitmap) {
+- ReleaseDC(NULL, hdc);
+- SDL_DestroySurface(s);
+- return NULL;
+- }
+-
+- SDL_memcpy(pBits, s->pixels, width * height * 4);
+-
+- SDL_DestroySurface(s);
+-
+- HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
+- if (!hMask) {
+- DeleteObject(hBitmap);
+- ReleaseDC(NULL, hdc);
+- return NULL;
+- }
+-
+- HDC hdcMem = CreateCompatibleDC(hdc);
+- HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
+-
+- for (int y = 0; y < height; y++) {
+- for (int x = 0; x < width; x++) {
+- BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
+- BYTE alpha = pixel[3];
+- COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
+- SetPixel(hdcMem, x, y, maskColor);
+- }
+- }
+-
+- ICONINFO iconInfo;
+- iconInfo.fIcon = TRUE;
+- iconInfo.xHotspot = 0;
+- iconInfo.yHotspot = 0;
+- iconInfo.hbmMask = hMask;
+- iconInfo.hbmColor = hBitmap;
+-
+- HICON hIcon = CreateIconIndirect(&iconInfo);
+-
+- SelectObject(hdcMem, oldBitmap);
+- DeleteDC(hdcMem);
+- DeleteObject(hBitmap);
+- DeleteObject(hMask);
+- ReleaseDC(NULL, hdc);
+-
+- return hIcon;
+-#else
+- return NULL;
+-#endif
+-}
++// HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
++// {
++// #if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
++// SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
++// if (!s) {
++// return NULL;
++// }
++
++// /* The dimensions will be needed after s is freed */
++// const int width = s->w;
++// const int height = s->h;
++
++// BITMAPINFO bmpInfo;
++// SDL_zero(bmpInfo);
++// bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
++// bmpInfo.bmiHeader.biWidth = width;
++// bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
++// bmpInfo.bmiHeader.biPlanes = 1;
++// bmpInfo.bmiHeader.biBitCount = 32;
++// bmpInfo.bmiHeader.biCompression = BI_RGB;
++
++// HDC hdc = GetDC(NULL);
++// void *pBits = NULL;
++// HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
++// if (!hBitmap) {
++// ReleaseDC(NULL, hdc);
++// SDL_DestroySurface(s);
++// return NULL;
++// }
++
++// SDL_memcpy(pBits, s->pixels, width * height * 4);
++
++// SDL_DestroySurface(s);
++
++// HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
++// if (!hMask) {
++// DeleteObject(hBitmap);
++// ReleaseDC(NULL, hdc);
++// return NULL;
++// }
++
++// HDC hdcMem = CreateCompatibleDC(hdc);
++// HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
++
++// for (int y = 0; y < height; y++) {
++// for (int x = 0; x < width; x++) {
++// BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
++// BYTE alpha = pixel[3];
++// COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
++// SetPixel(hdcMem, x, y, maskColor);
++// }
++// }
++
++// ICONINFO iconInfo;
++// iconInfo.fIcon = TRUE;
++// iconInfo.xHotspot = 0;
++// iconInfo.yHotspot = 0;
++// iconInfo.hbmMask = hMask;
++// iconInfo.hbmColor = hBitmap;
++
++// HICON hIcon = CreateIconIndirect(&iconInfo);
++
++// SelectObject(hdcMem, oldBitmap);
++// DeleteDC(hdcMem);
++// DeleteObject(hBitmap);
++// DeleteObject(hMask);
++// ReleaseDC(NULL, hdc);
++
++// return hIcon;
++// #else
++// return NULL;
++// #endif
++// }
+
+ // Some GUIDs we need to know without linking to libraries that aren't available before Vista.
+ /* *INDENT-OFF* */ // clang-format off
diff --git a/thirdparty/sdl/events/SDL_events.c b/thirdparty/sdl/events/SDL_events.c
-index 06f1053cf6..43e75e1c36 100644
+index 06f1053cf6..2b17e6c247 100644
--- a/thirdparty/sdl/events/SDL_events.c
+++ b/thirdparty/sdl/events/SDL_events.c
@@ -24,10 +24,10 @@
@@ -395,7 +610,7 @@ index 06f1053cf6..43e75e1c36 100644
#include "../timer/SDL_timer_c.h"
#include "../core/linux/SDL_udev.h"
#ifndef SDL_JOYSTICK_DISABLED
-@@ -39,7 +39,7 @@
+@@ -39,16 +39,16 @@
#ifdef HAVE_DBUS_DBUS_H
#include "core/linux/SDL_dbus.h"
#endif
@@ -404,6 +619,18 @@ index 06f1053cf6..43e75e1c36 100644
#ifdef SDL_PLATFORM_ANDROID
#include "../core/android/SDL_android.h"
+ #include "../video/android/SDL_androidevents.h"
+ #endif
+
+-#ifdef SDL_PLATFORM_UNIX
+-#include "../tray/SDL_tray_utils.h"
+-#endif
++// #ifdef SDL_PLATFORM_UNIX
++// #include "../tray/SDL_tray_utils.h"
++// #endif
+
+ // An arbitrary limit so we don't have unbounded growth
+ #define SDL_MAX_QUEUED_EVENTS 65535
@@ -989,7 +989,7 @@ void SDL_StopEventLoop(void)
}
@@ -451,9 +678,15 @@ index 06f1053cf6..43e75e1c36 100644
#endif
}
-@@ -1488,9 +1488,9 @@ void SDL_PumpEventMaintenance(void)
+@@ -1484,13 +1484,13 @@ void SDL_PumpEventMaintenance(void)
+ }
+ #endif
+
+- SDL_SendPendingPenProximity();
++ // SDL_SendPendingPenProximity();
- SDL_UpdateCursorAnimation();
+- SDL_UpdateCursorAnimation();
++ // SDL_UpdateCursorAnimation();
- SDL_UpdateTrays();
+ // SDL_UpdateTrays();
@@ -829,287 +1062,6 @@ index 51848b51be..d9055809c4 100644
+// #include <SDL3/SDL_oldnames.h>
#endif /* SDL_h_ */
-diff --git a/thirdparty/sdl/joystick/SDL_joystick.c b/thirdparty/sdl/joystick/SDL_joystick.c
-index ccf6572f50..cf08c30b86 100644
---- a/thirdparty/sdl/joystick/SDL_joystick.c
-+++ b/thirdparty/sdl/joystick/SDL_joystick.c
-@@ -29,7 +29,7 @@
- #include "SDL_steam_virtual_gamepad.h"
-
- #include "../events/SDL_events_c.h"
--#include "../video/SDL_sysvideo.h"
-+// #include "../video/SDL_sysvideo.h"
- #include "../sensor/SDL_sensor_c.h"
- #include "hidapi/SDL_hidapijoystick_c.h"
-
-@@ -1239,7 +1239,8 @@ static void AttemptSensorFusion(SDL_Joystick *joystick, bool invert_sensors)
- When a phone is being used as a gamepad, its orientation changes,
- so adjust sensor axes to match.
- */
-- if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
-+ // if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
-+ if (true) {
- /* When a device in landscape orientation is laid flat, the axes change
- orientation as follows:
- -X to +X becomes -X to +X
-@@ -2309,10 +2310,10 @@ static bool SDL_PrivateJoystickShouldIgnoreEvent(void)
- return false;
- }
-
-- if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
-- // We have windows but we don't have focus, ignore the event.
-- return true;
-- }
-+ // if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
-+ // // We have windows but we don't have focus, ignore the event.
-+ // return true;
-+ // }
- return false;
- }
-
-diff --git a/thirdparty/sdl/SDL.c b/thirdparty/sdl/SDL.c
-index d8e845057a..41216d3fd7 100644
---- a/thirdparty/sdl/SDL.c
-+++ b/thirdparty/sdl/SDL.c
-@@ -30,9 +30,9 @@
- // this checks for HAVE_DBUS_DBUS_H internally.
- #include "core/linux/SDL_dbus.h"
-
--#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
--#include "core/unix/SDL_gtk.h"
--#endif
-+// #if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
-+// #include "core/unix/SDL_gtk.h"
-+// #endif
-
- #ifdef SDL_PLATFORM_EMSCRIPTEN
- #include <emscripten.h>
-@@ -173,7 +173,7 @@ const char *SDL_GetAppMetadataProperty(const char *name)
- }
- if (!value || !*value) {
- if (SDL_strcmp(name, SDL_PROP_APP_METADATA_NAME_STRING) == 0) {
-- value = SDL_GetExeName();
-+ // value = SDL_GetExeName();
- if (!value) {
- value = "SDL Application";
- }
-diff --git a/thirdparty/sdl/core/unix/SDL_appid.c b/thirdparty/sdl/core/unix/SDL_appid.c
-index 95c5dc1a6b..fd0037eb7e 100644
---- a/thirdparty/sdl/core/unix/SDL_appid.c
-+++ b/thirdparty/sdl/core/unix/SDL_appid.c
-@@ -30,7 +30,7 @@ const char *SDL_GetAppID(void)
-
- if (!id_str) {
- // If the hint isn't set, try to use the application's executable name
-- id_str = SDL_GetExeName();
-+ // id_str = SDL_GetExeName();
- }
-
- if (!id_str) {
-diff --git a/thirdparty/sdl/core/windows/SDL_windows.c b/thirdparty/sdl/core/windows/SDL_windows.c
-index b8b27e5ced..c7924bf934 100644
---- a/thirdparty/sdl/core/windows/SDL_windows.c
-+++ b/thirdparty/sdl/core/windows/SDL_windows.c
-@@ -24,7 +24,7 @@
-
- #include "SDL_windows.h"
-
--#include "../../video/SDL_surface_c.h"
-+// #include "../../video/SDL_surface_c.h"
-
- #include <shellapi.h> // CommandLineToArgvW()
-
-@@ -534,7 +534,7 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
- if (ShouldAppsUseDarkModeFunc) {
- value = ShouldAppsUseDarkModeFunc() ? TRUE : FALSE;
- } else {
-- value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
-+ // value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
- }
- FreeLibrary(uxtheme);
- if (!IsWindowsBuildVersionAtLeast(18362)) {
-@@ -552,79 +552,79 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
- #endif
- }
-
--HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
--{
--#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
-- SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
-- if (!s) {
-- return NULL;
-- }
--
-- /* The dimensions will be needed after s is freed */
-- const int width = s->w;
-- const int height = s->h;
--
-- BITMAPINFO bmpInfo;
-- SDL_zero(bmpInfo);
-- bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-- bmpInfo.bmiHeader.biWidth = width;
-- bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
-- bmpInfo.bmiHeader.biPlanes = 1;
-- bmpInfo.bmiHeader.biBitCount = 32;
-- bmpInfo.bmiHeader.biCompression = BI_RGB;
--
-- HDC hdc = GetDC(NULL);
-- void *pBits = NULL;
-- HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
-- if (!hBitmap) {
-- ReleaseDC(NULL, hdc);
-- SDL_DestroySurface(s);
-- return NULL;
-- }
--
-- SDL_memcpy(pBits, s->pixels, width * height * 4);
--
-- SDL_DestroySurface(s);
--
-- HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
-- if (!hMask) {
-- DeleteObject(hBitmap);
-- ReleaseDC(NULL, hdc);
-- return NULL;
-- }
--
-- HDC hdcMem = CreateCompatibleDC(hdc);
-- HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
--
-- for (int y = 0; y < height; y++) {
-- for (int x = 0; x < width; x++) {
-- BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
-- BYTE alpha = pixel[3];
-- COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
-- SetPixel(hdcMem, x, y, maskColor);
-- }
-- }
--
-- ICONINFO iconInfo;
-- iconInfo.fIcon = TRUE;
-- iconInfo.xHotspot = 0;
-- iconInfo.yHotspot = 0;
-- iconInfo.hbmMask = hMask;
-- iconInfo.hbmColor = hBitmap;
--
-- HICON hIcon = CreateIconIndirect(&iconInfo);
--
-- SelectObject(hdcMem, oldBitmap);
-- DeleteDC(hdcMem);
-- DeleteObject(hBitmap);
-- DeleteObject(hMask);
-- ReleaseDC(NULL, hdc);
--
-- return hIcon;
--#else
-- return NULL;
--#endif
--}
-+// HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
-+// {
-+// #if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
-+// SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
-+// if (!s) {
-+// return NULL;
-+// }
-+
-+// /* The dimensions will be needed after s is freed */
-+// const int width = s->w;
-+// const int height = s->h;
-+
-+// BITMAPINFO bmpInfo;
-+// SDL_zero(bmpInfo);
-+// bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-+// bmpInfo.bmiHeader.biWidth = width;
-+// bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
-+// bmpInfo.bmiHeader.biPlanes = 1;
-+// bmpInfo.bmiHeader.biBitCount = 32;
-+// bmpInfo.bmiHeader.biCompression = BI_RGB;
-+
-+// HDC hdc = GetDC(NULL);
-+// void *pBits = NULL;
-+// HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
-+// if (!hBitmap) {
-+// ReleaseDC(NULL, hdc);
-+// SDL_DestroySurface(s);
-+// return NULL;
-+// }
-+
-+// SDL_memcpy(pBits, s->pixels, width * height * 4);
-+
-+// SDL_DestroySurface(s);
-+
-+// HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
-+// if (!hMask) {
-+// DeleteObject(hBitmap);
-+// ReleaseDC(NULL, hdc);
-+// return NULL;
-+// }
-+
-+// HDC hdcMem = CreateCompatibleDC(hdc);
-+// HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
-+
-+// for (int y = 0; y < height; y++) {
-+// for (int x = 0; x < width; x++) {
-+// BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
-+// BYTE alpha = pixel[3];
-+// COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
-+// SetPixel(hdcMem, x, y, maskColor);
-+// }
-+// }
-+
-+// ICONINFO iconInfo;
-+// iconInfo.fIcon = TRUE;
-+// iconInfo.xHotspot = 0;
-+// iconInfo.yHotspot = 0;
-+// iconInfo.hbmMask = hMask;
-+// iconInfo.hbmColor = hBitmap;
-+
-+// HICON hIcon = CreateIconIndirect(&iconInfo);
-+
-+// SelectObject(hdcMem, oldBitmap);
-+// DeleteDC(hdcMem);
-+// DeleteObject(hBitmap);
-+// DeleteObject(hMask);
-+// ReleaseDC(NULL, hdc);
-+
-+// return hIcon;
-+// #else
-+// return NULL;
-+// #endif
-+// }
-
- // Some GUIDs we need to know without linking to libraries that aren't available before Vista.
- /* *INDENT-OFF* */ // clang-format off
-diff --git a/thirdparty/sdl/events/SDL_events.c b/thirdparty/sdl/events/SDL_events.c
-index 43e75e1c36..2b17e6c247 100644
---- a/thirdparty/sdl/events/SDL_events.c
-+++ b/thirdparty/sdl/events/SDL_events.c
-@@ -46,9 +46,9 @@
- #include "../video/android/SDL_androidevents.h"
- #endif
-
--#ifdef SDL_PLATFORM_UNIX
--#include "../tray/SDL_tray_utils.h"
--#endif
-+// #ifdef SDL_PLATFORM_UNIX
-+// #include "../tray/SDL_tray_utils.h"
-+// #endif
-
- // An arbitrary limit so we don't have unbounded growth
- #define SDL_MAX_QUEUED_EVENTS 65535
-@@ -1484,9 +1484,9 @@ void SDL_PumpEventMaintenance(void)
- }
- #endif
-
-- SDL_SendPendingPenProximity();
-+ // SDL_SendPendingPenProximity();
-
-- SDL_UpdateCursorAnimation();
-+ // SDL_UpdateCursorAnimation();
-
- // SDL_UpdateTrays();
-
diff --git a/thirdparty/sdl/include/SDL3/SDL_render.h b/thirdparty/sdl/include/SDL3/SDL_render.h
index a4ea58025e..14d3790808 100644
--- a/thirdparty/sdl/include/SDL3/SDL_render.h
@@ -1162,6 +1114,44 @@ index a4ea58025e..14d3790808 100644
SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
} SDL_GPURenderStateCreateInfo;
+diff --git a/thirdparty/sdl/joystick/SDL_joystick.c b/thirdparty/sdl/joystick/SDL_joystick.c
+index ccf6572f50..cf08c30b86 100644
+--- a/thirdparty/sdl/joystick/SDL_joystick.c
++++ b/thirdparty/sdl/joystick/SDL_joystick.c
+@@ -29,7 +29,7 @@
+ #include "SDL_steam_virtual_gamepad.h"
+
+ #include "../events/SDL_events_c.h"
+-#include "../video/SDL_sysvideo.h"
++// #include "../video/SDL_sysvideo.h"
+ #include "../sensor/SDL_sensor_c.h"
+ #include "hidapi/SDL_hidapijoystick_c.h"
+
+@@ -1239,7 +1239,8 @@ static void AttemptSensorFusion(SDL_Joystick *joystick, bool invert_sensors)
+ When a phone is being used as a gamepad, its orientation changes,
+ so adjust sensor axes to match.
+ */
+- if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
++ // if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
++ if (true) {
+ /* When a device in landscape orientation is laid flat, the axes change
+ orientation as follows:
+ -X to +X becomes -X to +X
+@@ -2309,10 +2310,10 @@ static bool SDL_PrivateJoystickShouldIgnoreEvent(void)
+ return false;
+ }
+
+- if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
+- // We have windows but we don't have focus, ignore the event.
+- return true;
+- }
++ // if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
++ // // We have windows but we don't have focus, ignore the event.
++ // return true;
++ // }
+ return false;
+ }
+
diff --git a/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c b/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c
index 7d1ef1a890..23deb54a75 100644
--- a/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c
@@ -1428,45 +1418,6 @@ index 826e45b13c..e9da9e21c7 100644
GIP_MetadataFree(&attachment->metadata);
SDL_free(attachment);
context->attachments[i] = NULL;
-diff --git a/thirdparty/sdl/SDL.c b/thirdparty/sdl/SDL.c
-index 41216d3fd7..40982f2cfc 100644
---- a/thirdparty/sdl/SDL.c
-+++ b/thirdparty/sdl/SDL.c
-@@ -59,7 +59,9 @@
- // #include "video/SDL_pixels_c.h"
- // #include "video/SDL_surface_c.h"
- // #include "video/SDL_video_c.h"
--// #include "filesystem/SDL_filesystem_c.h"
-+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
-+#include "filesystem/SDL_filesystem_c.h"
-+#endif
- // #include "io/SDL_asyncio_c.h"
- #ifdef SDL_PLATFORM_ANDROID
- #include "core/android/SDL_android.h"
-@@ -300,8 +302,10 @@ void SDL_InitMainThread(void)
-
- SDL_InitTLSData();
- SDL_InitEnvironment();
-- SDL_InitTicks();
-- // SDL_InitFilesystem();
-+ SDL_InitTicks();
-+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
-+ SDL_InitFilesystem();
-+#endif
-
- if (!done_info) {
- const char *value;
-@@ -320,7 +324,9 @@ void SDL_InitMainThread(void)
-
- static void SDL_QuitMainThread(void)
- {
-- // SDL_QuitFilesystem();
-+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
-+ SDL_QuitFilesystem();
-+#endif
- SDL_QuitTicks();
- SDL_QuitEnvironment();
- SDL_QuitTLSData();
diff --git a/thirdparty/sdl/time/SDL_time.c b/thirdparty/sdl/time/SDL_time.c
index ba0a2cf7fa..8f1492b3df 100644
--- a/thirdparty/sdl/time/SDL_time.c
diff --git a/thirdparty/sdl/patches/0003-fix-cs-environ.patch b/thirdparty/sdl/patches/0003-fix-cs-environ.patch
index 3ec90f59107..c3375464a8b 100644
--- a/thirdparty/sdl/patches/0003-fix-cs-environ.patch
+++ b/thirdparty/sdl/patches/0003-fix-cs-environ.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/sdl/stdlib/SDL_getenv.c b/thirdparty/sdl/stdlib/SDL_getenv.c
-index 2626b62717b..d66751a2105 100644
+index 1517b5974b..e20962d65c 100644
--- a/thirdparty/sdl/stdlib/SDL_getenv.c
+++ b/thirdparty/sdl/stdlib/SDL_getenv.c
-@@ -153,6 +153,9 @@ SDL_Environment *SDL_CreateEnvironment(bool populated)
+@@ -154,6 +154,9 @@ SDL_Environment *SDL_CreateEnvironment(bool populated)
const char *SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name)
{
@@ -12,7 +12,7 @@ index 2626b62717b..d66751a2105 100644
const char *result = NULL;
if (!env) {
-@@ -172,6 +175,7 @@ const char *SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name)
+@@ -173,6 +176,7 @@ const char *SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name)
SDL_UnlockMutex(env->lock);
return result;
@@ -20,7 +20,7 @@ index 2626b62717b..d66751a2105 100644
}
typedef struct CountEnvStringsData
-@@ -250,6 +254,9 @@ char **SDL_GetEnvironmentVariables(SDL_Environment *env)
+@@ -251,6 +255,9 @@ char **SDL_GetEnvironmentVariables(SDL_Environment *env)
bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, bool overwrite)
{
@@ -30,7 +30,7 @@ index 2626b62717b..d66751a2105 100644
bool result = false;
CHECK_PARAM(!env) {
-@@ -287,10 +294,14 @@ bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const ch
+@@ -288,10 +295,14 @@ bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const ch
SDL_UnlockMutex(env->lock);
return result;
@@ -45,7 +45,7 @@ index 2626b62717b..d66751a2105 100644
bool result = false;
CHECK_PARAM(!env) {
-@@ -312,6 +323,7 @@ bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name)
+@@ -313,6 +324,7 @@ bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name)
SDL_UnlockMutex(env->lock);
return result;
diff --git a/thirdparty/sdl/patches/0004-ios-accelerometer.patch b/thirdparty/sdl/patches/0004-ios-accelerometer.patch
index 2b045b74589..8601d3443af 100644
--- a/thirdparty/sdl/patches/0004-ios-accelerometer.patch
+++ b/thirdparty/sdl/patches/0004-ios-accelerometer.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m b/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
-index 98756f2eab..5f1abf110f 100644
+index 36e18f0ec7..b4b31704d0 100644
--- a/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
+++ b/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
-@@ -945,8 +945,6 @@ static bool IOS_JoystickOpen(SDL_Joystick *joystick, int device_index)
+@@ -946,8 +946,6 @@ static bool IOS_JoystickOpen(SDL_Joystick *joystick, int device_index)
GCMotion *motion = controller.motion;
if (motion && motion.hasRotationRate) {
SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO, 0.0f);
@@ -11,7 +11,7 @@ index 98756f2eab..5f1abf110f 100644
SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 0.0f);
}
}
-@@ -1197,20 +1195,17 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
+@@ -1198,20 +1196,17 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
if (motion && motion.sensorsActive) {
float data[3];
diff --git a/thirdparty/sdl/patches/0007-fix-linux-getenv-unsafe.patch b/thirdparty/sdl/patches/0007-fix-linux-getenv-unsafe.patch
index 65cfe1b3075..9976361b114 100644
--- a/thirdparty/sdl/patches/0007-fix-linux-getenv-unsafe.patch
+++ b/thirdparty/sdl/patches/0007-fix-linux-getenv-unsafe.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/sdl/stdlib/SDL_getenv.c b/thirdparty/sdl/stdlib/SDL_getenv.c
-index 17220c69ae..50a511262b 100644
+index e20962d65c..7edf0775c1 100644
--- a/thirdparty/sdl/stdlib/SDL_getenv.c
+++ b/thirdparty/sdl/stdlib/SDL_getenv.c
-@@ -555,7 +555,7 @@ int SDL_unsetenv_unsafe(const char *name)
+@@ -552,7 +552,7 @@ int SDL_unsetenv_unsafe(const char *name)
#endif // HAVE_LIBC_ENVIRONMENT
// Retrieve a variable named "name" from the environment
diff --git a/thirdparty/sdl/stdlib/SDL_getenv.c b/thirdparty/sdl/stdlib/SDL_getenv.c
index fdf28e659bd..7edf0775c1f 100644
--- a/thirdparty/sdl/stdlib/SDL_getenv.c
+++ b/thirdparty/sdl/stdlib/SDL_getenv.c
@@ -55,6 +55,7 @@ extern char **environ;
static char **environ;
#endif
+
struct SDL_Environment
{
SDL_Mutex *lock; // !!! FIXME: reuse SDL_HashTable's lock.
diff --git a/thirdparty/sdl/update-sdl.sh b/thirdparty/sdl/update-sdl.sh
index 26c80828271..0d4382a4259 100755
--- a/thirdparty/sdl/update-sdl.sh
+++ b/thirdparty/sdl/update-sdl.sh
@@ -5,8 +5,8 @@ VERSION=3.4.16
target=$(dirname "$(realpath $0)")
pushd $target
-rm -rf atomic core events haptic hidapi include io joystick libm loadso \
- sensor stdlib thread timer *.c *.h CREDITS.md LICENSE.txt
+rm -rf atomic core events filesystem haptic hidapi include io joystick libm loadso misc \
+ sensor stdlib thread time timer *.c *.h CREDITS.md LICENSE.txt
rm -rf *.tar.gz tmp
mkdir tmp && pushd tmp
@@ -88,6 +88,8 @@ cp -rv timer/{*.{c,h},unix,windows} $target/timer
mkdir -p $target/hidapi
cp -v hidapi/{*.{c,h},AUTHORS.txt,LICENSE.txt,LICENSE-bsd.txt,VERSION} $target/hidapi
+# Upstream file lacks a final newline.
+[ -n "$(tail -c1 $target/hidapi/VERSION)" ] && echo >> $target/hidapi/VERSION
for dir in hidapi linux mac windows; do
mkdir $target/hidapi/$dir
cp -v hidapi/$dir/*.{c,h} $target/hidapi/$dir 2>/dev/null || :
diff --git a/thirdparty/spirv-reflect/patches/0002-spirv-headers.patch b/thirdparty/spirv-reflect/patches/0002-spirv-headers.patch
index c1fba76ccbf..d7d822e1b6c 100644
--- a/thirdparty/spirv-reflect/patches/0002-spirv-headers.patch
+++ b/thirdparty/spirv-reflect/patches/0002-spirv-headers.patch
@@ -1,5 +1,5 @@
diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h
-index cf8cfe2183..8f281ec80f 100644
+index 35a4e4a5bb..431bce997c 100644
--- a/thirdparty/spirv-reflect/spirv_reflect.h
+++ b/thirdparty/spirv-reflect/spirv_reflect.h
@@ -34,7 +34,7 @@ VERSION HISTORY
@@ -10,3 +10,4 @@ index cf8cfe2183..8f281ec80f 100644
+#include "../spirv-headers/include/spirv/unified1/spirv.h"
#endif
+
diff --git a/thirdparty/thorvg/LICENSE b/thirdparty/thorvg/LICENSE
index bb1f9b63702..bf114cccd91 100644
--- a/thirdparty/thorvg/LICENSE
+++ b/thirdparty/thorvg/LICENSE
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/thirdparty/tinyexr/LICENSE b/thirdparty/tinyexr/LICENSE
index d89add6035d..ea96c9b629a 100644
--- a/thirdparty/tinyexr/LICENSE
+++ b/thirdparty/tinyexr/LICENSE
@@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/thirdparty/vhacd/inc/vhacdCircularList.h b/thirdparty/vhacd/inc/vhacdCircularList.h
index 0f5ddf9ecfa..f8b6f64f5a2 100644
--- a/thirdparty/vhacd/inc/vhacdCircularList.h
+++ b/thirdparty/vhacd/inc/vhacdCircularList.h
@@ -76,4 +76,4 @@ private:
};
}
#include "vhacdCircularList.inl"
-#endif // VHACD_CIRCULAR_LIST_H
\ No newline at end of file
+#endif // VHACD_CIRCULAR_LIST_H
diff --git a/thirdparty/vhacd/inc/vhacdCircularList.inl b/thirdparty/vhacd/inc/vhacdCircularList.inl
index 2be5180524e..efee82c9351 100644
--- a/thirdparty/vhacd/inc/vhacdCircularList.inl
+++ b/thirdparty/vhacd/inc/vhacdCircularList.inl
@@ -158,4 +158,4 @@ namespace VHACD
return (*this);
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/vhacd/inc/vhacdMesh.h b/thirdparty/vhacd/inc/vhacdMesh.h
index a282e2b4fb6..80b09e5a1da 100644
--- a/thirdparty/vhacd/inc/vhacdMesh.h
+++ b/thirdparty/vhacd/inc/vhacdMesh.h
@@ -127,4 +127,4 @@ private:
double m_diag;
};
}
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/vhacd/inc/vhacdSArray.h b/thirdparty/vhacd/inc/vhacdSArray.h
index 4d84d1ae267..b62b453106d 100644
--- a/thirdparty/vhacd/inc/vhacdSArray.h
+++ b/thirdparty/vhacd/inc/vhacdSArray.h
@@ -155,4 +155,4 @@ private:
size_t m_maxSize;
};
}
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/vhacd/inc/vhacdVector.h b/thirdparty/vhacd/inc/vhacdVector.h
index efcfcf6ad79..c9e4edc0eeb 100644
--- a/thirdparty/vhacd/inc/vhacdVector.h
+++ b/thirdparty/vhacd/inc/vhacdVector.h
@@ -165,4 +165,4 @@ template <typename T>
const T ComputeVolume4(const Vec3<T>& a, const Vec3<T>& b, const Vec3<T>& c, const Vec3<T>& d);
}
#include "vhacdVector.inl" // template implementation
-#endif
\ No newline at end of file
+#endif
diff --git a/thirdparty/vhacd/inc/vhacdVector.inl b/thirdparty/vhacd/inc/vhacdVector.inl
index 223c2ef1734..638a2fb3385 100644
--- a/thirdparty/vhacd/inc/vhacdVector.inl
+++ b/thirdparty/vhacd/inc/vhacdVector.inl
@@ -359,4 +359,4 @@ namespace VHACD
return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
}
}
-#endif //VHACD_VECTOR_INL
\ No newline at end of file
+#endif //VHACD_VECTOR_INL
diff --git a/thirdparty/vhacd/patches/0005-fix-scale-calculation.patch b/thirdparty/vhacd/patches/0005-fix-scale-calculation.patch
deleted file mode 100644
index 4b05f64fbf1..00000000000
--- a/thirdparty/vhacd/patches/0005-fix-scale-calculation.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
-index 8c47fa1e2c..c445f20122 100644
---- a/thirdparty/vhacd/inc/vhacdVolume.h
-+++ b/thirdparty/vhacd/inc/vhacdVolume.h
-@@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
-
- double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
- double r;
-- if (d[0] > d[1] && d[0] > d[2]) {
-+ if (d[0] >= d[1] && d[0] >= d[2]) {
- r = d[0];
- m_dim[0] = dim;
- m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
- m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
- }
-- else if (d[1] > d[0] && d[1] > d[2]) {
-+ else if (d[1] >= d[0] && d[1] >= d[2]) {
- r = d[1];
- m_dim[1] = dim;
- m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);
diff --git a/thirdparty/vhacd/patches/0006-gcc13-include-fix.patch b/thirdparty/vhacd/patches/0005-gcc13-include-fix.patch
similarity index 100%
rename from thirdparty/vhacd/patches/0006-gcc13-include-fix.patch
rename to thirdparty/vhacd/patches/0005-gcc13-include-fix.patch
diff --git a/thirdparty/vhacd/src/vhacdManifoldMesh.cpp b/thirdparty/vhacd/src/vhacdManifoldMesh.cpp
index 7aac9c0d172..2618e2a88d3 100644
--- a/thirdparty/vhacd/src/vhacdManifoldMesh.cpp
+++ b/thirdparty/vhacd/src/vhacdManifoldMesh.cpp
@@ -199,4 +199,4 @@ bool TMMesh::CheckConsistancy()
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/thirdparty/vhacd/src/vhacdRaycastMesh.cpp b/thirdparty/vhacd/src/vhacdRaycastMesh.cpp
index e8b9435d5fb..6ce6efa2cae 100644
--- a/thirdparty/vhacd/src/vhacdRaycastMesh.cpp
+++ b/thirdparty/vhacd/src/vhacdRaycastMesh.cpp
@@ -205,4 +205,4 @@ namespace VHACD
}
-} // end of VHACD namespace
\ No newline at end of file
+} // end of VHACD namespace
diff --git a/thirdparty/xatlas/LICENSE b/thirdparty/xatlas/LICENSE
index 7af8b332388..dc4b9b6ed74 100644
--- a/thirdparty/xatlas/LICENSE
+++ b/thirdparty/xatlas/LICENSE
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.