Skip to content

Commit a849e3a

Browse files
authored
Merge pull request #74491 from akien-mga/3.5-cherrypicks
Cherry-picks for the 3.5 branch (future 3.5.2) - 5th batch
2 parents ae7b413 + 0240586 commit a849e3a

31 files changed

+212
-76
lines changed

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
5757
- stb_vorbis updated to version 1.22.
5858
- zlib/minizip updated to version 1.2.13.
5959
- CA root certificates updated to 2022-10-21 bundle from Mozilla.
60-
- SDL GameControllerDB updated to 2022-12-07 git snapshot.
60+
- SDL GameControllerDB updated to 2023-02-27 git snapshot.
6161

6262
### Fixed
6363

@@ -84,6 +84,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
8484
- Fix hashing bug for PoolArrays comparisons ([GH-71103](https://github.com/godotengine/godot/pull/71103)).
8585
- Fix `File.get_path()` not working for compressed files ([GH-70726](https://github.com/godotengine/godot/pull/70726)).
8686
- Revert "RID: Change comparison operators to use RID_Data id instead of address" ([GH-69946](https://github.com/godotengine/godot/pull/69946)).
87+
- Prevent division by zero in posmod ([GH-73119](https://github.com/godotengine/godot/pull/73119)).
8788

8889
#### Editor
8990

@@ -136,32 +137,45 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
136137
- Fix emitting `target_reached` signal before updating state ([GH-68072](https://github.com/godotengine/godot/pull/68072)).
137138
- Fix crash conditions in Navigation system ([GH-68988](https://github.com/godotengine/godot/pull/68988)).
138139
- Fix Recast crash in NavigationMesh baking ([GH-69189](https://github.com/godotengine/godot/pull/69189)).
140+
- Move navigation server finalize before physics server ([GH-70343](https://github.com/godotengine/godot/pull/70343)).
139141

140142
#### Physics
141143

142144
- Fix computation of RigidBody2D `inverse_mass` when inertia is defined by the user ([GH-68659](https://github.com/godotengine/godot/pull/68659)).
143145
- Fix typo bug in heightmap shape ([GH-69852](https://github.com/godotengine/godot/pull/69852)).
144146
- Fix pairing crash in physics Octree ([GH-70365](https://github.com/godotengine/godot/pull/70365)).
147+
- Fix BVH lockguards for multithread mode ([GH-73629](https://github.com/godotengine/godot/pull/73629)).
145148

146149
#### Porting
147150

148151
- Android: Fix potential null in keyboard handling ([GH-66942](https://github.com/godotengine/godot/pull/66942)).
149152
- Android: Fix exporting custom `APPLICATION_ATTRIBS` ([GH-69024](https://github.com/godotengine/godot/pull/69024)).
153+
- Android: Fix writing value for XR hand tracking V2.0 in manifest ([GH-71231](https://github.com/godotengine/godot/pull/71231)).
150154
- HTML5: Add missing `OS::get_cursor_shape()` implementation ([GH-66871](https://github.com/godotengine/godot/pull/66871)).
151155
- HTML5: Fix bug in setting custom cursor ([GH-67044](https://github.com/godotengine/godot/pull/67044)).
152156
- iOS: Add new model identifiers for DPI metrics ([GH-70022](https://github.com/godotengine/godot/pull/70022)).
157+
- iOS: Implement missing `gamepad.buttonOptions`, `buttonMenu`, and `buttonHome` joy buttons ([GH-73781](https://github.com/godotengine/godot/pull/73781)).
158+
- iOS: Increase max simultaneous touches to 32 ([GH-74367](https://github.com/godotengine/godot/pull/74367)).
153159
- Linux: Fix burning CPU with udev disabled on Flatpak ([GH-69563](https://github.com/godotengine/godot/pull/69563)).
154160
- macOS: Update activation hack to work on Ventura ([GH-68777](https://github.com/godotengine/godot/pull/68777)).
155-
- macoS: Fix stylus tilt Y direction ([GH-70498](https://github.com/godotengine/godot/pull/70498)).
161+
- macOS: Fix stylus tilt Y direction ([GH-70498](https://github.com/godotengine/godot/pull/70498)).
162+
- UWP: Fix app crash when updating clipboard ([GH-73126](https://github.com/godotengine/godot/pull/73126)).
163+
- UWP: Fix build with Google ANGLE not supporting `EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER` ([GH-73127](https://github.com/godotengine/godot/pull/73127)).
164+
- Web: Add PS3 controller guide button mapping ([GH-73163](https://github.com/godotengine/godot/pull/73163)).
165+
- Web: Fix Standard Gamepad Mapping triggers for Chromium-based browsers ([GH-73254](https://github.com/godotengine/godot/pull/73254)).
156166
- Windows: Fix handling of some dead key combinations using Unicode char instead of Virtual key ([GH-66314](https://github.com/godotengine/godot/pull/66314)).
157167
- Windows: Fix Directory `make_dir()` choking on ".." ([GH-66467](https://github.com/godotengine/godot/pull/66467)).
158168
- Windows: Fix newlines not honored in Windows console subsystem ([GH-67236](https://github.com/godotengine/godot/pull/67236)).
169+
- Windows: Fix heap overflow setting native icon ([GH-71699](https://github.com/godotengine/godot/pull/71699)).
170+
- Windows: Fix Alt Gr getting stuck after Right Alt-Tab ([GH-71730](https://github.com/godotengine/godot/pull/71730)).
171+
- Windows: Fix Xbox Series controller detected as 2 devices ([GH-71784](https://github.com/godotengine/godot/pull/71784)).
159172

160173
#### Rendering
161174

162175
- Fix debanding strength being affected by environment adjustments ([GH-66327](https://github.com/godotengine/godot/pull/66327)).
163176
- Fix potential shader compiler out of bounds read ([GH-68813](https://github.com/godotengine/godot/pull/68813)).
164177
- Fix GLES 2 SpotLight bug with shadow filter mode ([GH-69826](https://github.com/godotengine/godot/pull/69826)).
178+
- Fix GLES 2 octahedral half float unpacking ([GH-71510](https://github.com/godotengine/godot/pull/71510)).
165179

166180

167181
## [3.5.1] - 2022-09-28

core/math/bvh.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#include "core/os/mutex.h"
5656

5757
#define BVHTREE_CLASS BVH_Tree<T, NUM_TREES, 2, MAX_ITEMS, USER_PAIR_TEST_FUNCTION, USER_CULL_TEST_FUNCTION, USE_PAIRS, BOUNDS, POINT>
58-
#define BVH_LOCKED_FUNCTION BVHLockedFunction(&_mutex, BVH_THREAD_SAFE &&_thread_safe);
58+
#define BVH_LOCKED_FUNCTION BVHLockedFunction _lock_guard(&_mutex, BVH_THREAD_SAFE &&_thread_safe);
5959

6060
template <class T, int NUM_TREES = 1, bool USE_PAIRS = false, int MAX_ITEMS = 32, class USER_PAIR_TEST_FUNCTION = BVH_DummyPairTestFunction<T>, class USER_CULL_TEST_FUNCTION = BVH_DummyCullTestFunction<T>, class BOUNDS = AABB, class POINT = Vector3, bool BVH_THREAD_SAFE = true>
6161
class BVH_Manager {
@@ -776,7 +776,7 @@ class BVH_Manager {
776776
_mutex = p_mutex;
777777

778778
if (_mutex->try_lock() != OK) {
779-
WARN_PRINT("Info : multithread BVH access detected (benign)");
779+
WARN_PRINT_ONCE("Info : multithread BVH access detected (benign)");
780780
_mutex->lock();
781781
}
782782

core/math/math_funcs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#ifndef MATH_FUNCS_H
3232
#define MATH_FUNCS_H
3333

34+
#include "core/error_macros.h"
3435
#include "core/math/math_defs.h"
3536
#include "core/math/random_pcg.h"
3637
#include "core/typedefs.h"
@@ -200,6 +201,7 @@ class Math {
200201
return value;
201202
}
202203
static _ALWAYS_INLINE_ int64_t posmod(int64_t p_x, int64_t p_y) {
204+
ERR_FAIL_COND_V_MSG(p_y == 0, 0, "Division by zero in posmod is undefined. Returning 0 as fallback.");
203205
int64_t value = p_x % p_y;
204206
if (((value < 0) && (p_y > 0)) || ((value > 0) && (p_y < 0))) {
205207
value += p_y;

doc/classes/Environment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes).
9191
</member>
9292
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0">
93-
The power of the light emitted by the background.
93+
The power of the light emitted by the background. This affects the sky brightness, the ambient light (if [member ambient_light_sky_contribution] is greater than [code]0.0[/code]) and specular light from the sky.
9494
</member>
9595
<member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0">
9696
The background mode. See [enum BGMode] for possible values.

doc/classes/OS.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@
10071007
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
10081008
- [code]OS.shell_open("mailto:[email protected]")[/code] opens the default email client with the "To" field set to [code][email protected][/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added.
10091009
Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method.
1010+
[b]Note:[/b] Use [method String.percent_encode] to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, [method shell_open] may not work correctly in a project exported to the Web platform.
10101011
[b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
10111012
</description>
10121013
</method>

doc/classes/String.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,14 @@
559559
<return type="bool" />
560560
<argument index="0" name="expr" type="String" />
561561
<description>
562-
Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
562+
Does a simple expression match (also called "glob" or "globbing"), where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code].
563563
</description>
564564
</method>
565565
<method name="matchn">
566566
<return type="bool" />
567567
<argument index="0" name="expr" type="String" />
568568
<description>
569-
Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
569+
Does a simple [b]case-insensitive[/b] expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code].
570570
</description>
571571
</method>
572572
<method name="md5_buffer">
@@ -626,13 +626,13 @@
626626
<method name="percent_decode">
627627
<return type="String" />
628628
<description>
629-
Decode a percent-encoded string. See [method percent_encode].
629+
Decode a percent-encoded string (also called URI-encoded string). See also [method percent_encode].
630630
</description>
631631
</method>
632632
<method name="percent_encode">
633633
<return type="String" />
634634
<description>
635-
Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests).
635+
Percent-encodes a string (also called URI-encoded string). Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests). See also [method percent_decode].
636636
</description>
637637
</method>
638638
<method name="plus_file">

doc/classes/Viewport.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description>
77
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
88
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
9-
If a viewport is a child of a [ViewportContainer], it will automatically take up its size, otherwise it must be set manually.
9+
If a viewport is a child of a [ViewportContainer], the viewport will automatically take up the container's size, otherwise it must be set manually.
1010
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
1111
Also, viewports can be assigned to different screens in case the devices have multiple screens.
1212
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.

doc/classes/ViewportContainer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Control for holding [Viewport]s.
55
</brief_description>
66
<description>
7-
A [Container] node that holds a [Viewport], automatically setting its size.
7+
A [Container] node that holds a [Viewport], automatically setting the viewport's size.
88
[b]Note:[/b] Changing a ViewportContainer's [member Control.rect_scale] will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container).
99
</description>
1010
<tutorials>

0 commit comments

Comments
 (0)