Commit Graph

3749 Commits

Author SHA1 Message Date
Fabio Alessandrelli c363d2d5b3
[Core] Fix File.get_buffer returning wrong length
File.get_buffer always returned as many bytes as requested (even when
EOF was reached), this resulted in random bytes being returned when
overflowing.

(cherry picked from commit d8ea68d3dd)
2024-01-30 15:03:20 +01:00
Cody Roberts a785276e02
Add project settings for AVAudioSessionCategory on iOS
Co-authored-by: Georg Wacker <contact@georgwacker.com>
(cherry picked from commit 739d27ae40)
2024-01-30 15:03:19 +01:00
Rémi Verschelde 81b93b2e6b
Donors: Change tiers to match Dev Fund, sync latest data
The new list includes all donors listed on fund.godotengine.org,
together with the ones still on Patreon on matching tiers.

We haven't yet updated Patreon tiers to match the Dev Fund, so donors
who used to be listed under "Silver donors" are now grandfathered under
the "Gold members" category from the Dev Fund.

(cherry picked from commit ff5ac866e8)
2024-01-30 15:03:19 +01:00
Rémi Verschelde e7b750b0f9
Fix various GCC 13 warnings
Fixes occurrences of `-Wtype-limits`, `-Wmaybe-uninitialized`,
`-Wduplicated-branches`.

(cherry picked from commit 02e4e208ef)
2024-01-30 15:03:19 +01:00
A Thousand Ships dc095b8ad4
Add check to ensure registered classes are declared
Checks that all classes registered to `ClassDB` have been properly declared with `GDCLASS`

(cherry picked from commit 4b205afd3d)
2023-09-06 13:25:12 +02:00
Danil Alexeev 442677a3f0
[3.x] Core: Add recursion level check for `VariantWriter::write()`
(cherry picked from commit 0213cbbf20)
2023-09-06 13:25:00 +02:00
Yuri Rubinsky d3f8563298
Fix crash when calling `fill` method on an empty `Image`
(cherry picked from commit adec51cde8)
2023-09-06 13:15:01 +02:00
Paweł 706f939b73
Fix Windows StringFileInfo structure
(cherry picked from commit e15a086bb9)
2023-08-28 16:40:31 +02:00
Bartłomiej T. Listwon 497b77c3cf
Fix moving position indicator out of bounds in FileAccessMemory
(cherry picked from commit bff0c71e2e)
2023-08-28 16:40:31 +02:00
Danil Alexeev b884fe2c76
[3.x] Core: Add recursion level check for `Array` and `Dictionary` hashing
(cherry picked from commit 68e8c1bb8f)
2023-08-28 16:15:32 +02:00
Simon Barkehanai bf2d62382f
Fix infinite loop on EOF in the command line debugger
When using the command line debugger (godot -d) on Unix systems, when
entering an EOF (ctrl+D), the debugger enters an infinite loop.

Adding a check for EOF in the debugger loop exits the debugger when EOF
is entered.

Fixes #50170.

(cherry picked from commit 4ecad8dea3)
(cherry picked from commit d1dcea79d4)
2023-08-19 00:53:17 +02:00
fabriceci 964ebb1028
Test, refactor and fix a bug in Basis.get_axis_angle
Backport of #63428.

Co-authored-by: juanFdS <juan9794@gmail.com>

(cherry picked from commits 8245fd3275
and d1c8c5dd30)
2023-08-19 00:35:55 +02:00
lawnjelly c2e9cc4542
BVH - fix lockguards for multithread mode
Due to a lack of variable name, the BVH lock guards lifetimes previously did not cover the whole function call.

(cherry picked from commit 5639be5f4f)
2023-03-06 13:32:02 +01:00
Rémi Verschelde d6912be31c
Math: Prevent division by zero in posmod
Fixes #43932.

Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
(cherry picked from commit f011d8ca9c)
2023-03-06 13:32:01 +01:00
heppocogne c599cc2b4e
Fix `get_path()` is not working when files are opend with `open_compressed`
And also fixed `get_absolute_path()` in the same way

(cherry picked from commit ea11ffc88c)
2023-01-11 16:03:02 +01:00
Ninni Pipping d6360d4c3c
Fix for PoolArray comparison
(cherry picked from commit f26069e94d)
2023-01-11 16:03:02 +01:00
Rémi Verschelde 16f6a5b139
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".

Backported from #70885.
2023-01-10 15:32:59 +01:00
Rémi Verschelde 3b833bfaf1
Revert "RID: Change comparison operators to use RID_Data id instead of address"
(cherry picked from commit c404cc0e58)
2022-12-12 14:42:52 +01:00
Jordan Schidlowsky 894e302d9a
expose additional global enums in 3.x which are available in master
(cherry picked from commit dc5226ecfd)
2022-12-12 14:42:05 +01:00
Rémi Verschelde 4ee12fa80b Project Manager: Fix hacky code for project rename
Instantiating a new ProjectSettings is *not* the way to go.
ConfigFile works just fine to read/change a single value.

Fixes memory leaks as the instantiated ProjectSettings was never freed.
Forbid doing this to prevent such problems.

Fixes #25661.

(cherry picked from commit f21f75eb6f)
2022-12-05 10:10:15 +08:00
dzil123 4c00e4c504 Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
(cherry picked from commit 1fa8b3dd42)
2022-12-05 10:09:31 +08:00
Rafał Mikrut 52e25bc555 Fix exporting big templates
(cherry picked from commit 86fa3ba560)
2022-12-05 10:05:13 +08:00
dzil123 c3210df448 [3.x] PCKPacker Fix error spam
(cherry picked from commit b3812750da)
2022-12-05 09:36:18 +08:00
Marcus Elg 108e3196ea Improve %f formatting for inf and nan
(cherry picked from commit e9cbe9517b)
2022-12-05 09:16:08 +08:00
Haoyu Qiu 52ab4ef0d2 Fix String::word_wrap() for long words
(cherry picked from commit 51fd1c27aa)
2022-12-05 09:15:57 +08:00
bruvzg d368b55a53
[iOS] Fix build with warnings=extra.
(cherry picked from commit 987723b386)
2022-11-03 18:33:21 +01:00
Rémi Verschelde b193713612 Style: Ensure consistent formatting with clang-format 15
(cherry picked from commit f9b91d8d24)
2022-09-21 13:35:34 +02:00
lawnjelly c7d9c3b21f Fix uninitialized data reads in Input
Found by Valgrind.

(cherry picked from commit d60eae3dbc)
2022-09-09 14:35:08 +02:00
Micky 70b55faa38 Prevent HTTPRequest from polling invalid client
(cherry picked from commit 9e284f68ec)
2022-09-09 14:34:40 +02:00
Haoyu Qiu 7dfcd9d80d Fix parsing of XML CDATA and add test cases
(cherry picked from commit 7ed2b09bc0)
2022-09-09 14:31:36 +02:00
Haoyu Qiu 293c3844b3 Fix action name completion for `Input.get_{axis,vector}`
(cherry picked from commit e6dd71d227)
2022-09-01 11:09:02 +02:00
Fredia Huya-Kouadio e1e03297f1 Additional fixes to the Android `get_current_dir()` implementation.
(cherry picked from commit 9910d4681d)
2022-09-01 11:05:27 +02:00
Pedro J. Estébanez 5296ab8cd6 Determine ProjectSettings' resource path early
(cherry picked from commit 89892e4f32)
2022-08-30 11:27:42 +02:00
Marcel Admiraal a957b4fb8c Fix header guard in error_macros.h
(cherry picked from commit e2dac6ecd9)
2022-08-30 11:16:18 +02:00
David Snopek 81fa7abb40 Fix locale resource remapping with binary conversion on export
(cherry picked from commit 0cf4ba0d84)
2022-08-29 17:05:30 +02:00
Haoyu Qiu 1ea8b9d2b7 Fix Time.get_unix_time_from_system() not including msecs
(cherry picked from commit 1be078ebcb)
2022-08-08 16:32:16 +02:00
Fabio Alessandrelli b2ba3bab52 [File] Fix FileAccessCompressed::get_buffer return value.
It used to return the write index instead of the written bytes (i.e.
index + 1) when reading until last block.

(cherry picked from commit e8f7b79bb0)
2022-08-08 13:18:05 +02:00
Fabio Alessandrelli 4e33610fb0 [Core] Use std type traits to check operations triviality.
(cherry picked from commit 6f02183f8c)
2022-08-04 15:20:28 +02:00
Rémi Verschelde 751b16a285 File: Re-add support to skip CR (`\r`) in `File::get_as_text`
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.

(cherry picked from commit 1418f97c70)
2022-08-01 00:40:55 +02:00
David Snopek 5eaf83f2d7 Add error messages and docs to explain restrictions when calling NetworkedMultiplayerCustom.initialize() 2022-07-29 13:51:44 -05:00
David Snopek 738e76b710 Add error messages and docs to explain allowed transitions in NetworkedMultiplayerCustom.set_connection_status() 2022-07-29 09:02:53 -05:00
pattlebass fb7ecc748f [3.x] HTML5: Add support for `Input.vibrate_handheld()` 2022-07-28 13:20:05 +03:00
Rémi Verschelde 6c8d9b8401
Merge pull request #63480 from m4gr3d/fix_remaining_scoped_storage_regressions_3x
[3.x] Address remaining scoped storage regressions
2022-07-26 18:15:14 +02:00
Fredia Huya-Kouadio fc2c202312 Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
2022-07-26 07:42:49 -07:00
Ricardo Buring 90725964a4 Fixup BVH debugging statements 2022-07-25 18:35:14 +02:00
Rémi Verschelde 818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
Rémi Verschelde c8099e9524
Merge pull request #63223 from m4gr3d/fix_slow_copy_3x
[3.x] Address slow copy performance when using the `FileAccessFilesystemJAndroid` implementation
2022-07-22 00:21:59 +02:00
Fredia Huya-Kouadio aab26ad7d2 Address slow copy performance when using the `FileAccessFilesystemJAndroid` implementation.
Read/write ops for this implementation are done through the java layer via jni, and so for good performance, it's key to avoid numerous repeated small read/write ops due the jni overhead.

The alternative is to allocate a (conversatively-sized) large buffer to reduce the number of read/write ops over the jni boundary.
2022-07-21 08:21:12 -07:00
Rémi Verschelde 4ef99b409d
Merge pull request #63163 from dsnopek/multiplayer-peer-custom-3.x 2022-07-20 22:41:15 +02:00
fabriceci 43e9816fb1 Fix the calculation of the angular velocity when the rotation speed is not high.
(cherry picked from commit db7c91e0ad)
2022-07-19 17:16:21 +02:00