Commit graph

3842 commits

Author SHA1 Message Date
Rémi Verschelde
5beec641b6
Merge pull request #64933 from madmiraal/fix-error_macros-header-guard-3.x
[3.x] Fix header guard in error_macros.h
2022-08-27 09:17:04 +02:00
Rémi Verschelde
c78c9bcf96
Merge pull request #64926 from RandomShaper/ps_res_path_3.x
[3.x] Determine `ProjectSettings`' resource path early
2022-08-26 23:03:06 +02:00
Marcel Admiraal
e2dac6ecd9 Fix header guard in error_macros.h 2022-08-26 16:04:54 +01:00
Pedro J. Estébanez
89892e4f32 Determine ProjectSettings' resource path early 2022-08-26 15:09:19 +02:00
Marcus Elg
e9cbe9517b Improve %f formatting for inf and nan 2022-08-25 12:58:38 +02:00
Rémi Verschelde
8388ea1d6b
Merge pull request #64839 from akien-mga/3.x-zstd-1.5.2
zstd: Update to upstream version 1.5.2
2022-08-25 00:51:28 +02:00
bruvzg
b7c9eb1a3c Add arch flag to assembler to fix build on ARM64 macOS / iOS.
(cherry picked from commit b767d2e0fd)
2022-08-24 18:26:28 +02:00
Rémi Verschelde
bda382684f zstd: Update to upstream version 1.5.2
Release notes:
- https://github.com/facebook/zstd/releases/tag/v1.5.1
- https://github.com/facebook/zstd/releases/tag/v1.5.2

(cherry picked from commit 39ed39900e)
2022-08-24 18:26:14 +02:00
Marcin Nowak
90762b9660 [3.x] Backport panning strength parameters from 4.0 2022-08-23 23:27:51 +02:00
Haoyu Qiu
51fd1c27aa Fix String::word_wrap() for long words 2022-08-18 16:56:38 +08:00
Haoyu Qiu
e6dd71d227 Fix action name completion for Input.get_{axis,vector} 2022-08-15 23:44:11 +08:00
Francois Belair
d331e5c7ac Fix binary internal cache not being filled 2022-08-14 12:30:59 -04:00
Haoyu Qiu
2d93718cd2 Add clear method to pool arrays 2022-08-10 17:31:29 +08:00
Rémi Verschelde
8cec1c63c2
Merge pull request #63629 from dsnopek/fix-locale-remap-with-binary-resources-3.x
[3.x] Fix locale resource remapping with binary conversion on export
2022-08-08 20:03:56 +02:00
David Snopek
0cf4ba0d84 Fix locale resource remapping with binary conversion on export 2022-08-08 09:38:39 -05:00
Rémi Verschelde
6eee83579a
Merge pull request #64101 from timothyqiu/subsecond 2022-08-08 16:31:49 +02:00
Rémi Verschelde
7dc8ec0c61
Merge pull request #63643 from aaronfranke/3.x-mouse-mode-ch 2022-08-08 14:36:45 +02:00
Haoyu Qiu
1be078ebcb Fix Time.get_unix_time_from_system() not including msecs 2022-08-08 20:31:51 +08:00
Fabio Alessandrelli
ee5eb943f7 [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 09:50:41 +02:00
Rémi Verschelde
0bed7ea63f
Merge pull request #61316 from bruvzg/tts_3x
[3.x] Backport text-to-speech support.
2022-08-05 23:45:51 +02:00
Rémi Verschelde
0dccbcd7ce
Merge pull request #61878 from bruvzg/backport_locale_select
[3.x] Backport locale selection improvements.
2022-08-05 23:45:17 +02:00
Rémi Verschelde
14c9325b5d
Merge pull request #62408 from Razoric480/raz/fix-no-cache
[3.x] Fix nested resources being cached if no-cache argument used
2022-08-05 23:43:54 +02:00
Rémi Verschelde
daa5b542b4
Merge pull request #56765 from madmiraal/fix-45592-2-3.x
[3.x] Fix mouse speed not changing fast enough
2022-08-05 22:37:44 +02:00
Rémi Verschelde
26762a71b6
Merge pull request #58537 from winterpixelgames/feature/virtual-keyboard-types-3.x 2022-08-05 19:37:13 +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
Aaron Franke
0d6e2d1090
Add MOUSE_MODE_CONFINED_HIDDEN to MouseMode enum 2022-07-29 13:46:04 -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
Pedro J. Estébanez
4e1f30390d Use the right memory ordering in SafeNumeric operations
(cherry picked from commit 02a584d8e6)
2022-07-19 17:10:26 +02:00
David Snopek
8ad5889c1a Add NetworkedMultiplayerCustom so high-level multiplayer backends can be added from GDScript 2022-07-19 09:16:41 -05:00
Aaron Franke
f60cc50667
[3.x] Add forwards-compatible aliases for pool/packed arrays 2022-07-18 12:37:15 -05:00
Kirill Diduk
910c67b268 [GDNative] Expose String::join() to GDNative Core API v1.3 2022-07-16 16:31:32 +02:00
Kirill Diduk
2cd87ef226 [GDNative] Refactoring: add const to has and join methods of pooled arrays 2022-07-16 14:08:42 +02:00
Rémi Verschelde
101cbe5d5b
Merge pull request #62723 from hansemro/eraser-detect-3.x 2022-07-15 00:13:15 +02:00
Francois Belair
2ceb93bbef Fix custom res caching sub-res even if no-cache
Fixes #59686, fixes #59752
2022-07-13 11:18:26 -04:00
Kirill Diduk
7b8b91f505 [GDScript][GDNative] Add 'sort' and 'has' methods to pooled arrays
This is a backport from 4.0 to 3.x that adds 'sort' and 'has' methods
to the following types:
- PoolByteArray
- PoolIntArray
- PoolRealArray
- PoolStringArray
- PoolVector2Array
- PoolVector3Array
- PoolColorArray

For all the types above, the methods 'sort' and 'has' have been
exposed to the GDNative API (v. 1.3)

Since the method 'has' was already implemented in GDScript before,
in this commit it has been only exposed to GDNative API.

The classes documentation is updated.

The method 'sort' uses the exisging class "Sorter".

Pooled arrays in 4.0 are rewritten, that's why this backport is not
completely indentical to the original PR made for 4.0 (see #32144).
2022-07-07 23:24:31 +02:00
Brian Semrau
ce24b48e50 Add support for multiple virtual keyboard types 2022-07-07 14:22:28 -04:00
Rémi Verschelde
be85923dc5
Merge pull request #54083 from Rubonnek/add_bin_messages_3x 2022-07-05 23:04:15 +02:00
Wilson E. Alvarez
a97a016381
Add error messages to String::bin_to_int64, and accept capital B in prefix
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-05 11:59:21 -04:00
Wilson E. Alvarez
f12a1b6214
Add error messages String::hex_to_int functions, and accept capital X in prefix
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-05 10:16:55 -04:00
Hansem Ro
193d5c11f3 [3.x, macOS, Windows, X11] Add stylus inverted/eraser support to InputEventMouseMotion event 2022-07-04 16:12:11 -07:00
bruvzg
a8eb779ac3
Backport locale selection improvements. 2022-07-04 11:49:20 +03:00
Estelle Linkpy Reid
7a2d3b04a5 Corrected InputEventKey::as_text to return a non-empty string for physical keys. 2022-07-02 15:34:15 +02:00
bruvzg
6489fe890e
Backport text-to-speech support. 2022-07-01 11:04:50 +03:00
Rémi Verschelde
a7559fcb6e Errors: Fallback to fprintf if OS singleton doesn't exist
Otherwise we would crash if something prints an error before init or
after destruction of the `OS` singleton which handles printing/logging.

(cherry picked from commit c83084fccb)
2022-06-30 19:23:02 +02:00
Rémi Verschelde
d74ff8dd93
Merge pull request #62440 from timothyqiu/thread-func-base
[3.x] Check thread func in base scripts for argument info
2022-06-28 08:11:11 +02:00
Haoyu Qiu
f740b4f481 Check thread func in base scripts for argument info 2022-06-27 11:24:04 +08:00
ne0fhyk
24e3b3b88d Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
2022-06-26 16:53:02 -07:00
Marcel Admiraal
b8b7c21583 Ensure AudioFrame variables l and r are always initialised
(cherry picked from commit d3f0994572)
2022-06-20 14:58:57 +02:00
Rémi Verschelde
acd4a01b8c ProjectSettings: Ensure 'editor/' settings aren't nested
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.

This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
2022-06-19 11:47:19 +02:00
Theraot
6007d7f0ed Added missing p_bidirectional to AStar2D methods
The methods disconnect_points and are_points_connected  now have an optional p_bidirectional parameter matching AStar.

(cherry picked from commit 3590cdfd34)
2022-06-16 20:49:01 +02:00
Yuri Rubinsky
d525d902c1 Fix wrapf to correct wrap values with 0.1 stepping
(cherry picked from commit 09418afbc0)
2022-06-16 10:10:48 +02:00
smix8
8bd7c6188b [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
2022-06-14 05:55:14 +02:00
bruvzg
11a7997a67 [Windows, 3.x] Add support for handling network share paths. 2022-06-13 09:24:35 +03:00
FireForge
53c01540d9 Make Input mouse_mode and use_accumulated_input properties
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2022-06-10 17:33:12 +08:00
kobewi
460fd7c03b Add Dictionary.merge()
(cherry picked from commit a0915e6dee)
2022-06-09 11:58:48 +02:00
sps1112
ede6ce9847 Bind vararg method flag in core constants
(cherry picked from commit 1f361b0367)
2022-06-09 10:55:17 +02:00
Rémi Verschelde
80b82e4e66 i18n: Misc fixes translation strings
Adds some translator comments to solve some questions raised on Weblate.
2022-06-08 12:56:42 +02:00
lawnjelly
1d870403b2 Optimized Mesh Merging
Changes from PoolVector to LocalVector and pre-reserving vectors rather than push_back.
2022-06-07 20:16:51 +01:00
lawnjelly
ba74643594 Force unsigned behaviour for bitfield enums
Some compilers (notably MSVC) were using signed values for bitfield enums. This was causing problems where 2 bits were used to store 4 or less enum values, where they were being treated as negative numbers.

This PR explicitly requests these enums to be treated as unsigned values.
2022-06-06 16:58:21 +01:00
Aaron Franke
0470392930
[3.x] Improve architectures in OS::has_feature and make it work on MSVC 2022-06-05 23:16:13 -05:00
Haoyu Qiu
1a7e3b3ab6 Fix String.http_escape on Windows 2022-06-03 13:41:45 +08:00
Univeous
e514cd71b1 fix get_meta() with defalt value 2022-05-24 20:23:08 +08:00
Hugo Locurcio
61278499aa Tweak 64-bit integer overflow message to mention that it's a signed type
(cherry picked from commit 7b5bf3af19)
2022-05-22 19:43:56 +02:00
Haoyu Qiu
b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
Haoyu Qiu
b611b4cddc Create onready variables when dropping nodes and holding Ctrl 2022-05-17 11:52:17 +08:00
Hugo Locurcio
e19f8fcbdc Improve error messages when creating Images from code
The rationale behind the expected number of bytes is now displayed
in clear (width, height, format, number of mipmaps expected if any).

(cherry picked from commit 18e9e6a81a)
2022-05-16 21:12:21 +02:00
kobewi
621cb8c52f Move Display settings higher in the list
(cherry picked from commit 739242dd04)
2022-05-16 17:14:43 +02:00
Haoyu Qiu
b40dff698c Fix invalid memory usage when using Image.convert
(cherry picked from commit 34c1a2beaa)
2022-05-16 17:14:43 +02:00
Rémi Verschelde
5e693b6d84 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2022-05-16 16:38:26 +02:00
Nicholas Huelin
5cedb395dc Fix inconsistent naming in Time
(cherry picked from commit 8409d92282)
2022-05-16 15:58:36 +02:00
Mario Liebisch
4cfe174263 Increase line counter when parsing comments
(cherry picked from commit bf708e72dc)
2022-05-16 15:56:47 +02:00
Haoyu Qiu
3d1644f7c3 Add search methods for pool arrays
* has()
* count()
* find()
* rfind()
2022-05-08 11:07:00 +08:00
Hugo Locurcio
8682874419
Rename profiler "Idle Time" to "Process Time"
References to "idle time" are progressively being replaced by
"process time" throughout the engine to avoid confusion.

This also changes some debug prints to be printed only when verbose
mode is enabled (like in `master`).
2022-05-06 19:31:31 +02:00
smix8
da9a88a35a Allow AStar/AStar2D zero point weight
Allow AStar/AStar2D zero point weight.

Limit was set to 1 which seemed like an arbitrary value as lower values down to zero can be useful for common gameplay navigation elements like teleports.
2022-05-06 02:33:31 +02:00
Rémi Verschelde
9e37599f36 Core: Rename math 'phi' arguments to 'angle'
(cherry picked from commit e7a58a7eb6)
2022-05-05 15:02:46 +02:00
mdavisprog
53fb0440d3 Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.

This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.

Documentation is updated to reflect new API function.

(cherry picked from commit f3c1232c59)
2022-05-05 15:02:46 +02:00
lawnjelly
df7fab51a3 Physics Interpolation - Flush transforms after physics tick
Leftover transforms from the physics tick were being flushed during idle, which was causing problems for physics interpolation.

This PR flushes the transforms at the end of the physics tick when physics interpolation is active.
2022-05-04 20:30:46 +01:00
Rémi Verschelde
6ee64331db
Merge pull request #60527 from KoBeWi/unique_names_demastered 2022-05-02 10:48:27 +02:00
Rémi Verschelde
d8e702b010
Merge pull request #60552 from madmiraal/implement-3466-3.x
[3.x] Add a method for obtaining display cutouts on Android
2022-05-02 07:58:05 +02:00
Haoyu Qiu
767134fd8d Fix left aligned integer sign in string formatting 2022-05-01 12:43:03 +08:00
bruvzg
bea7c9be5d [3.x] Improve embedded PCK loading and exporting. 2022-04-28 11:11:48 +03:00
kobewi
b7336524f2 Expose move_to_trash()
(cherry picked from commit b80e52f048)
2022-04-27 12:41:01 +02:00
kleonc
6f01a949c2 Fix Image.blit_rect/blend_rect() for negative p_dest point
(cherry picked from commit 4038bc0c36)
2022-04-27 12:38:27 +02:00
laws65
6aac042faa Proper validation of negative values in datetime strings and datetime dicts
(cherry picked from commit cf9fc0b936)
2022-04-27 12:22:49 +02:00
Oğuzhan Eroğlu
fd329d19e8 Quick fix: Crash when parsing invalid datetime string #60189
(cherry picked from commit 2b8eb126b4)
2022-04-27 12:22:26 +02:00
Haoyu Qiu
d088128b43 Remove duplicate editor settings definitions 2022-04-27 15:26:46 +08:00
Rémi Verschelde
ba7881bd36
Merge pull request #60366 from adamscott/nav-map-thread-work-pool-3x
Use ThreadWorkPool instead of thread_process_array in NavMap [3.x]
2022-04-26 18:45:53 +02:00
Adam Scott
7749346f48 Use ThreadWorkPool instead of thread_process_array in NavMap
Port ThreadWorkPool to 3.x
2022-04-26 09:18:46 -04:00
kobewi
e1c74ae83f Implement Scene Unique Nodes 2022-04-26 13:55:48 +02:00
Marcel Admiraal
ec2270b88f Add a method for obtaining display cutouts on Android 2022-04-26 13:52:33 +02:00
Rémi Verschelde
ab4bbdde90
Merge pull request #60421 from AndreaCatania/bvo_3x 2022-04-26 11:35:03 +02:00
Rémi Verschelde
5e4358eb73
Merge pull request #60426 from timothyqiu/array-fill
[3.x] Add fill method to `Array` and `Pool*Array`
2022-04-25 23:00:17 +02:00
Rémi Verschelde
9260dd3ac1
Merge pull request #60427 from lawnjelly/rid_handles_safer_locks 2022-04-25 15:50:00 +02:00
Haoyu Qiu
8f0f98ffab Bind Semaphore.try_wait() 2022-04-25 20:47:09 +08:00
Haoyu Qiu
77b6f7595a Add fill method to Array and PoolArrays
Co-authored-by: Matheus Lima Cunha <matheus.limacunha@hotmail.com>
2022-04-23 19:29:17 +08:00
lawnjelly
130cc36a88 Improve locking safety for RID handles builds
Additional locks are added. This is primarily to cover a potential race condition where the pool is resized from another thread during a get operation.
2022-04-23 09:09:50 +01:00
AndreaCatania
62e9044837 Backported the oa_hashmap lookup_ptr function 2022-04-22 10:00:55 +02:00
AndreaCatania
6f24727916 Backported the Vector function to_byte_array and slice 2022-04-22 10:00:55 +02:00
RedHeadphone
b6968ab060 validate input in Time.get_datetime_string_from_dict()
format fix

better fix to handle ERR_FAIL_COND_V_MSG return data type

(cherry picked from commit 7e35af3dc3)
2022-04-14 21:38:27 +02:00
Rémi Verschelde
9a45eb70b4
Merge pull request #60204 from akien-mga/3.x-cherrypicks 2022-04-13 14:23:56 +02:00
kobewi
e86a64a2a5 Add optional 'default' argument to get_meta()
(cherry picked from commit 3eb7fc4bfd)
2022-04-13 11:43:49 +02:00
Bartłomiej T. Listwon
71f5a88b04 Remove get_data() from CowData 2022-04-13 11:32:44 +02:00
keptsecret
c69689ab5a fix unable to change directory in user access mode 2022-04-03 11:22:01 -04:00
George Marques
f0ca73892a
Fix argument type generation with typed method binds
It needs to generate the types, not only set the argument count.
2022-04-02 14:32:01 -03:00
George Marques
226103d166
Enable type information on release
This is needed for GDScript (and potentially other scripting languages)
to properly identify type errors and avoid mismatch between release and
debug versions.

This increases the release bynary size by about 889 KiB.
2022-04-01 18:20:33 -03:00
Rémi Verschelde
3c0d32562b
Merge pull request #59606 from m4gr3d/fix_low_processor_mode_3x
[3.x] Fix flickering issues with low processor mode on Android
2022-03-29 22:51:32 +02:00
Fredia Huya-Kouadio
8ca32d1727 Fix flickering issues with low processor mode on Android 2022-03-29 12:17:25 -07:00
Haoyu Qiu
50ba2d3051 Fix crash when exporting projects with shared libraries
(cherry picked from commit 680bcef825)
2022-03-28 23:48:03 +02:00
bruvzg
fd2fba7c2c
Add binary MO translation file support. Add brotli decoder and WOFF2 support.
Use smaller .mo files instead of .po, if gettext is available.
Convert editor fonts to .woff2 format.
2022-03-25 19:51:39 +02:00
Hugo Locurcio
292ad704e6
Increase the maximum number of concurrent DNS queries from 32 to 256
This makes the following error message less likely to be printed
when performing many concurrent HTTP requests:

    Condition ' resolving == IP::RESOLVER_INVALID_ID ' is true. returned: ERR_BUG
2022-03-25 17:13:51 +01:00
Rémi Verschelde
9e44fb166d
Merge pull request #59344 from madmiraal/fix-57943-3.x
[3.x] Ensure minimum modifiers are pressed when matching actions
2022-03-20 11:27:20 +01:00
Marcel Admiraal
88c723c33c Ensure minimum modifiers are pressed when matching actions 2022-03-20 08:08:40 +00:00
Rémi Verschelde
4739c821dc
Merge pull request #59234 from akien-mga/3.x-rid-comparison-id 2022-03-18 12:06:17 +01:00
taigi100
e49d8f8b4c Update color constants to use HEX codes
(cherry picked from commit bd247fa315)
2022-03-17 15:49:58 +01:00
Bartłomiej T. Listwon
8db39b82ea Include platform_config.h in thread.cpp and thread.h
(cherry picked from commit 6c6291b84f)
2022-03-17 13:03:52 +01:00
Rémi Verschelde
797321fec4 RID: Change comparison operators to use RID_Data id instead of address
This should helps making sorting more deterministic in physics and rendering.

The same change was done for 4.0 in 4f163972bb.
2022-03-17 11:03:07 +01:00
Haoyu Qiu
878cf8262a Add context support for editor translation 2022-03-16 15:44:30 +08:00
ConteZero
2ff0735329 Added primary clipboard for Linux 2022-03-14 15:28:36 +01:00
Aaron Franke
3040285b27 Add offset string from minutes conversion method to Time singleton
(cherry picked from commit 55aabb8b06)
2022-03-12 14:44:23 +01:00
Hugo Locurcio
cec7c908ca
Add get_screen_refresh_rate() to OS
This method can be used to get the refresh rate of a given screen.
It is supported on Windows, macOS, Linux, Android and iOS (but not
HTML5).
2022-03-10 22:10:48 +01:00
Rémi Verschelde
1639b3a6a9
Merge pull request #58674 from Calinou/smooth-trimesh-collision-always-setting-3.x 2022-03-10 21:11:44 +01:00
Rémi Verschelde
690020d385 Revert "Fix ProjectSettings has_setting() when used on a overriden setting with feature tags"
(cherry picked from commit 78bf9926f8)
2022-03-09 09:53:26 +01:00
Rémi Verschelde
85b4848ca8
Merge pull request #54188 from Rubonnek/increase_var_arg_max_3x 2022-03-08 13:10:48 +01:00
Wilson E. Alvarez
424dbf70af
Increase VARIANT_ARG_MAX to 8 2022-03-07 10:03:49 -05:00
Rémi Verschelde
445339e1b2
Merge pull request #58427 from lawnjelly/safe_vector2 2022-03-07 12:39:28 +01:00
lawnjelly
0bcda22d7c Protection for array operator for Vector2 / 3 in DEV builds
A previous PR had changed the array operator to give unbounded access. This could cause crashes where old code depended on this previous safe behaviour.

This PR adds DEV_ASSERT macros for out of bound access to DEV builds, allowing us to quickly identify bugs in calling code, without affecting performance in release or release_debug editor builds.
2022-03-07 10:34:40 +00:00
Rémi Verschelde
f622c60805
Merge pull request #58492 from lawnjelly/float_literals_3
[3.x] Float literals - fix math classes to allow 32 bit calculations
2022-03-06 10:14:10 +01:00
Hugo Locurcio
413689559c
Always register the Smooth Trimesh Collision project setting
This ensures the project setting never disappears from the editor,
even if the current physics engine is GodotPhysics.

This also adds documentation for the Smooth Trimesh Collision
project setting.
2022-03-02 18:50:21 +01:00
Haoyu Qiu
56fd92ca76 Fix UndoRedo::create_action() invalid memory usage
(cherry picked from commit b00b7f9b7c)
2022-03-02 12:02:37 +01:00
Hugo Locurcio
824eaabd7b Print every file exported with PCKPacker.flush()s verbose parameter
Previously, only one line per 100 files was printed.

This also refactors the print statement to use Godot methods and
make it more informative overall.

(cherry picked from commit 8e57e5dc6a)
2022-03-02 11:00:26 +01:00
lawnjelly
d24c715678 Float literals - fix math classes to allow 32 bit calculations
Converts float literals from double format (e.g. 0.0) to float format (e.g. 0.0f) where appropriate for 32 bit calculations, and cast to (real_t) or (float) as appropriate.

This ensures that appropriate calculations will be done at 32 bits when real_t is compiled as float, rather than promoted to 64 bits.
2022-02-24 16:46:02 +00:00
Rémi Verschelde
fe8ea0de5b
Merge pull request #58295 from Pineapple/ustring-optimizations
Optimize String concatenation and copy functions
2022-02-21 08:45:23 +01:00
Bartłomiej T. Listwon
66085e210e Optimize String::copy_from(const CharType &p_char) 2022-02-20 12:47:35 +01:00
Bartłomiej T. Listwon
3d35f29f27 Optimize String::copy_from_unchecked 2022-02-20 12:47:35 +01:00
Bartłomiej T. Listwon
069e8f32d8 Optimize String::operator+= and CharString::operator+= 2022-02-20 12:47:22 +01:00
Ricardo Subtil
60f9c0fb42 Fix decompression functions not returning errcodes
(cherry picked from commit 61790a03f5)
2022-02-19 15:50:38 +01:00
Yuri Sizov
df13466139 Add type variations to Theme 2022-02-17 15:24:10 +03:00
Rémi Verschelde
47e34dc4e2
Merge pull request #58157 from Calinou/os-add-get-processor-name-3.x 2022-02-17 12:34:16 +01:00
Haoyu Qiu
0f76143444
Make VMap::find_nearest return -1 when empty
(cherry picked from commit 3057b19daa)
2022-02-17 09:59:28 +01:00