Skip to content

Commit 85d8711

Browse files
authored
Merge pull request #886 from Spartan322/merge/f128f38
Merge commit godotengine/godot@f128f38
2 parents b06d20b + 721f53f commit 85d8711

File tree

209 files changed

+4650
-1916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+4650
-1916
lines changed

.clang-format

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Commented out parameters are those with the same value as base LLVM style.
22
# We can uncomment them if we want to change their value, or enforce the
3-
# chosen value in case the base style changes (last sync: Clang 19.1.0).
3+
# chosen value in case the base style changes (last sync: Clang 17.0.6).
44
BasedOnStyle: LLVM
55
AccessModifierOffset: -4
66
AlignAfterOpenBracket: DontAlign
@@ -10,74 +10,48 @@ AlignAfterOpenBracket: DontAlign
1010
# AcrossEmptyLines: false
1111
# AcrossComments: false
1212
# AlignCompound: false
13-
# AlignFunctionPointers: false
1413
# PadOperators: true
1514
# AlignConsecutiveBitFields:
1615
# Enabled: false
1716
# AcrossEmptyLines: false
1817
# AcrossComments: false
1918
# AlignCompound: false
20-
# AlignFunctionPointers: false
2119
# PadOperators: false
2220
# AlignConsecutiveDeclarations:
2321
# Enabled: false
2422
# AcrossEmptyLines: false
2523
# AcrossComments: false
2624
# AlignCompound: false
27-
# AlignFunctionPointers: false
2825
# PadOperators: false
2926
# AlignConsecutiveMacros:
3027
# Enabled: false
3128
# AcrossEmptyLines: false
3229
# AcrossComments: false
3330
# AlignCompound: false
34-
# AlignFunctionPointers: false
3531
# PadOperators: false
3632
# AlignConsecutiveShortCaseStatements:
3733
# Enabled: false
3834
# AcrossEmptyLines: false
3935
# AcrossComments: false
40-
# AlignCaseArrows: false
4136
# AlignCaseColons: false
42-
# AlignConsecutiveTableGenBreakingDAGArgColons:
43-
# Enabled: false
44-
# AcrossEmptyLines: false
45-
# AcrossComments: false
46-
# AlignCompound: false
47-
# AlignFunctionPointers: false
48-
# PadOperators: false
49-
# AlignConsecutiveTableGenCondOperatorColons:
50-
# Enabled: false
51-
# AcrossEmptyLines: false
52-
# AcrossComments: false
53-
# AlignCompound: false
54-
# AlignFunctionPointers: false
55-
# PadOperators: false
56-
# AlignConsecutiveTableGenDefinitionColons:
57-
# Enabled: false
58-
# AcrossEmptyLines: false
59-
# AcrossComments: false
60-
# AlignCompound: false
61-
# AlignFunctionPointers: false
62-
# PadOperators: false
6337
# AlignEscapedNewlines: Right
6438
AlignOperands: DontAlign
6539
AlignTrailingComments:
6640
Kind: Never
6741
OverEmptyLines: 0
6842
# AllowAllArgumentsOnNextLine: true
6943
AllowAllParametersOfDeclarationOnNextLine: false
70-
# AllowBreakBeforeNoexceptSpecifier: Never
7144
# AllowShortBlocksOnASingleLine: Never
72-
# AllowShortCaseExpressionOnASingleLine: true
7345
# AllowShortCaseLabelsOnASingleLine: false
74-
# AllowShortCompoundRequirementOnASingleLine: true
7546
# AllowShortEnumsOnASingleLine: true
7647
# AllowShortFunctionsOnASingleLine: All
7748
# AllowShortIfStatementsOnASingleLine: Never
7849
# AllowShortLambdasOnASingleLine: All
7950
# AllowShortLoopsOnASingleLine: false
51+
# AlwaysBreakAfterDefinitionReturnType: None
52+
# AlwaysBreakAfterReturnType: None
8053
# AlwaysBreakBeforeMultilineStrings: false
54+
# AlwaysBreakTemplateDeclarations: MultiLine
8155
# AttributeMacros:
8256
# - __capability
8357
# BinPackArguments: true
@@ -102,21 +76,17 @@ AllowAllParametersOfDeclarationOnNextLine: false
10276
# SplitEmptyFunction: true
10377
# SplitEmptyRecord: true
10478
# SplitEmptyNamespace: true
105-
# BreakAdjacentStringLiterals: true
106-
# BreakAfterAttributes: Leave
79+
# BreakAfterAttributes: Never
10780
# BreakAfterJavaFieldAnnotations: false
108-
# BreakAfterReturnType: None
10981
# BreakArrays: true
11082
# BreakBeforeBinaryOperators: None
11183
# BreakBeforeBraces: Attach
11284
# BreakBeforeConceptDeclarations: Always
11385
# BreakBeforeInlineASMColon: OnlyMultiline
11486
# BreakBeforeTernaryOperators: true
11587
BreakConstructorInitializers: AfterColon
116-
# BreakFunctionDefinitionParameters: false
11788
# BreakInheritanceList: BeforeColon
11889
# BreakStringLiterals: true
119-
# BreakTemplateDeclarations: MultiLine
12090
ColumnLimit: 0
12191
# CommentPragmas: '^ IWYU pragma:'
12292
# CompactNamespaces: false
@@ -174,16 +144,13 @@ JavaImportGroups:
174144
- javax
175145
# JavaScriptQuotes: Leave
176146
# JavaScriptWrapImports: true
177-
KeepEmptyLines:
178-
AtEndOfFile: false
179-
AtStartOfBlock: false
180-
AtStartOfFile: false
147+
# KeepEmptyLinesAtEOF: false
148+
KeepEmptyLinesAtTheStartOfBlocks: false
181149
# LambdaBodyIndentation: Signature
182150
# Language: Cpp
183151
# LineEnding: DeriveLF
184152
# MacroBlockBegin: ''
185153
# MacroBlockEnd: ''
186-
# MainIncludeChar: Quote
187154
# MaxEmptyLinesToKeep: 1
188155
# NamespaceIndentation: None
189156
# ObjCBinPackProtocolList: Auto
@@ -198,7 +165,6 @@ PackConstructorInitializers: NextLine
198165
# PenaltyBreakComment: 300
199166
# PenaltyBreakFirstLessLess: 120
200167
# PenaltyBreakOpenParenthesis: 0
201-
# PenaltyBreakScopeResolution: 500
202168
# PenaltyBreakString: 1000
203169
# PenaltyBreakTemplateDeclaration: 10
204170
# PenaltyExcessCharacter: 1000000
@@ -215,7 +181,6 @@ RemoveSemicolon: true
215181
# RequiresExpressionIndentation: OuterScope
216182
# SeparateDefinitionBlocks: Leave
217183
# ShortNamespaceLines: 1
218-
# SkipMacroDefinitionBody: false
219184
# SortIncludes: CaseSensitive
220185
# SortJavaStaticImport: Before
221186
# SortUsingDeclarations: LexicographicNumeric
@@ -229,14 +194,14 @@ RemoveSemicolon: true
229194
# SpaceBeforeCtorInitializerColon: true
230195
# SpaceBeforeInheritanceColon: true
231196
# SpaceBeforeJsonColon: false
197+
# SpaceBeforeParens: ControlStatements
232198
# SpaceBeforeParensOptions:
233199
# AfterControlStatements: true
234200
# AfterForeachMacros: true
235201
# AfterFunctionDeclarationName: false
236202
# AfterFunctionDefinitionName: false
237203
# AfterIfMacros: true
238204
# AfterOverloadedOperator: false
239-
# AfterPlacementOperator: true
240205
# AfterRequiresInClause: false
241206
# AfterRequiresInExpression: false
242207
# BeforeNonEmptyParentheses: false
@@ -251,7 +216,6 @@ SpacesInLineCommentPrefix:
251216
Maximum: -1
252217
# SpacesInParens: Never
253218
# SpacesInParensOptions:
254-
# ExceptDoubleParentheses: false
255219
# InConditionalStatements: false
256220
# InCStyleCasts: false
257221
# InEmptyParentheses: false
@@ -264,7 +228,6 @@ Standard: c++20
264228
# - Q_UNUSED
265229
# - QT_REQUIRE_VERSION
266230
TabWidth: 4
267-
# TableGenBreakInsideDAGArg: DontBreak
268231
UseTab: Always
269232
# VerilogBreakBetweenInstancePorts: true
270233
# WhitespaceSensitiveMacros:

COPYRIGHT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ License: MPL-2.0
195195

196196
Files: ./thirdparty/clipper2/
197197
Comment: Clipper2
198-
Copyright: 2010-2023, Angus Johnson
198+
Copyright: 2010-2024, Angus Johnson
199199
License: BSL-1.0
200200

201201
Files: ./thirdparty/cvtt/

core/extension/gdextension_interface.cpp

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,91 @@ static GDExtensionTypeFromVariantConstructorFunc gdextension_get_variant_to_type
702702
ERR_FAIL_V_MSG(nullptr, "Getting Variant conversion function with invalid type");
703703
}
704704

705+
static GDExtensionVariantGetInternalPtrFunc gdextension_variant_get_ptr_internal_getter(GDExtensionVariantType p_type) {
706+
switch (p_type) {
707+
case GDEXTENSION_VARIANT_TYPE_BOOL:
708+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<bool *(*)(Variant *)>(VariantInternal::get_bool));
709+
case GDEXTENSION_VARIANT_TYPE_INT:
710+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<int64_t *(*)(Variant *)>(VariantInternal::get_int));
711+
case GDEXTENSION_VARIANT_TYPE_FLOAT:
712+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<double *(*)(Variant *)>(VariantInternal::get_float));
713+
case GDEXTENSION_VARIANT_TYPE_STRING:
714+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<String *(*)(Variant *)>(VariantInternal::get_string));
715+
case GDEXTENSION_VARIANT_TYPE_VECTOR2:
716+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector2 *(*)(Variant *)>(VariantInternal::get_vector2));
717+
case GDEXTENSION_VARIANT_TYPE_VECTOR2I:
718+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector2i *(*)(Variant *)>(VariantInternal::get_vector2i));
719+
case GDEXTENSION_VARIANT_TYPE_RECT2:
720+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Rect2 *(*)(Variant *)>(VariantInternal::get_rect2));
721+
case GDEXTENSION_VARIANT_TYPE_RECT2I:
722+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Rect2i *(*)(Variant *)>(VariantInternal::get_rect2i));
723+
case GDEXTENSION_VARIANT_TYPE_VECTOR3:
724+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector3 *(*)(Variant *)>(VariantInternal::get_vector3));
725+
case GDEXTENSION_VARIANT_TYPE_VECTOR3I:
726+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector3i *(*)(Variant *)>(VariantInternal::get_vector3i));
727+
case GDEXTENSION_VARIANT_TYPE_TRANSFORM2D:
728+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Transform2D *(*)(Variant *)>(VariantInternal::get_transform2d));
729+
case GDEXTENSION_VARIANT_TYPE_VECTOR4:
730+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector4 *(*)(Variant *)>(VariantInternal::get_vector4));
731+
case GDEXTENSION_VARIANT_TYPE_VECTOR4I:
732+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector4i *(*)(Variant *)>(VariantInternal::get_vector4i));
733+
case GDEXTENSION_VARIANT_TYPE_PLANE:
734+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Plane *(*)(Variant *)>(VariantInternal::get_plane));
735+
case GDEXTENSION_VARIANT_TYPE_QUATERNION:
736+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Quaternion *(*)(Variant *)>(VariantInternal::get_quaternion));
737+
case GDEXTENSION_VARIANT_TYPE_AABB:
738+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<AABB *(*)(Variant *)>(VariantInternal::get_aabb));
739+
case GDEXTENSION_VARIANT_TYPE_BASIS:
740+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Basis *(*)(Variant *)>(VariantInternal::get_basis));
741+
case GDEXTENSION_VARIANT_TYPE_TRANSFORM3D:
742+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Transform3D *(*)(Variant *)>(VariantInternal::get_transform));
743+
case GDEXTENSION_VARIANT_TYPE_PROJECTION:
744+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Projection *(*)(Variant *)>(VariantInternal::get_projection));
745+
case GDEXTENSION_VARIANT_TYPE_COLOR:
746+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Color *(*)(Variant *)>(VariantInternal::get_color));
747+
case GDEXTENSION_VARIANT_TYPE_STRING_NAME:
748+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<StringName *(*)(Variant *)>(VariantInternal::get_string_name));
749+
case GDEXTENSION_VARIANT_TYPE_NODE_PATH:
750+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<NodePath *(*)(Variant *)>(VariantInternal::get_node_path));
751+
case GDEXTENSION_VARIANT_TYPE_RID:
752+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<RID *(*)(Variant *)>(VariantInternal::get_rid));
753+
case GDEXTENSION_VARIANT_TYPE_OBJECT:
754+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Object **(*)(Variant *)>(VariantInternal::get_object));
755+
case GDEXTENSION_VARIANT_TYPE_CALLABLE:
756+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Callable *(*)(Variant *)>(VariantInternal::get_callable));
757+
case GDEXTENSION_VARIANT_TYPE_SIGNAL:
758+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Signal *(*)(Variant *)>(VariantInternal::get_signal));
759+
case GDEXTENSION_VARIANT_TYPE_DICTIONARY:
760+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Dictionary *(*)(Variant *)>(VariantInternal::get_dictionary));
761+
case GDEXTENSION_VARIANT_TYPE_ARRAY:
762+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Array *(*)(Variant *)>(VariantInternal::get_array));
763+
case GDEXTENSION_VARIANT_TYPE_PACKED_BYTE_ARRAY:
764+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedByteArray *(*)(Variant *)>(VariantInternal::get_byte_array));
765+
case GDEXTENSION_VARIANT_TYPE_PACKED_INT32_ARRAY:
766+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedInt32Array *(*)(Variant *)>(VariantInternal::get_int32_array));
767+
case GDEXTENSION_VARIANT_TYPE_PACKED_INT64_ARRAY:
768+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedInt64Array *(*)(Variant *)>(VariantInternal::get_int64_array));
769+
case GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT32_ARRAY:
770+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedFloat32Array *(*)(Variant *)>(VariantInternal::get_float32_array));
771+
case GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT64_ARRAY:
772+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedFloat64Array *(*)(Variant *)>(VariantInternal::get_float64_array));
773+
case GDEXTENSION_VARIANT_TYPE_PACKED_STRING_ARRAY:
774+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedStringArray *(*)(Variant *)>(VariantInternal::get_string_array));
775+
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR2_ARRAY:
776+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector2Array *(*)(Variant *)>(VariantInternal::get_vector2_array));
777+
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR3_ARRAY:
778+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector3Array *(*)(Variant *)>(VariantInternal::get_vector3_array));
779+
case GDEXTENSION_VARIANT_TYPE_PACKED_COLOR_ARRAY:
780+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedColorArray *(*)(Variant *)>(VariantInternal::get_color_array));
781+
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR4_ARRAY:
782+
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector4Array *(*)(Variant *)>(VariantInternal::get_vector4_array));
783+
case GDEXTENSION_VARIANT_TYPE_NIL:
784+
case GDEXTENSION_VARIANT_TYPE_VARIANT_MAX:
785+
ERR_FAIL_V_MSG(nullptr, "Getting Variant get internal pointer function with invalid type.");
786+
}
787+
ERR_FAIL_V_MSG(nullptr, "Getting Variant get internal pointer function with invalid type.");
788+
}
789+
705790
// ptrcalls
706791
static GDExtensionPtrOperatorEvaluator gdextension_variant_get_ptr_operator_evaluator(GDExtensionVariantOperator p_operator, GDExtensionVariantType p_type_a, GDExtensionVariantType p_type_b) {
707792
return (GDExtensionPtrOperatorEvaluator)Variant::get_ptr_operator_evaluator(Variant::Operator(p_operator), Variant::Type(p_type_a), Variant::Type(p_type_b));
@@ -1627,6 +1712,7 @@ void gdextension_setup_interface() {
16271712
REGISTER_INTERFACE_FUNC(variant_can_convert_strict);
16281713
REGISTER_INTERFACE_FUNC(get_variant_from_type_constructor);
16291714
REGISTER_INTERFACE_FUNC(get_variant_to_type_constructor);
1715+
REGISTER_INTERFACE_FUNC(variant_get_ptr_internal_getter);
16301716
REGISTER_INTERFACE_FUNC(variant_get_ptr_operator_evaluator);
16311717
REGISTER_INTERFACE_FUNC(variant_get_ptr_builtin_method);
16321718
REGISTER_INTERFACE_FUNC(variant_get_ptr_constructor);

core/extension/gdextension_interface.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ typedef struct {
200200

201201
typedef void (*GDExtensionVariantFromTypeConstructorFunc)(GDExtensionUninitializedVariantPtr, GDExtensionTypePtr);
202202
typedef void (*GDExtensionTypeFromVariantConstructorFunc)(GDExtensionUninitializedTypePtr, GDExtensionVariantPtr);
203+
typedef void *(*GDExtensionVariantGetInternalPtrFunc)(GDExtensionVariantPtr);
203204
typedef void (*GDExtensionPtrOperatorEvaluator)(GDExtensionConstTypePtr p_left, GDExtensionConstTypePtr p_right, GDExtensionTypePtr r_result);
204205
typedef void (*GDExtensionPtrBuiltInMethod)(GDExtensionTypePtr p_base, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr r_return, int p_argument_count);
205206
typedef void (*GDExtensionPtrConstructor)(GDExtensionUninitializedTypePtr p_base, const GDExtensionConstTypePtr *p_args);
@@ -1385,6 +1386,23 @@ typedef GDExtensionVariantFromTypeConstructorFunc (*GDExtensionInterfaceGetVaria
13851386
*/
13861387
typedef GDExtensionTypeFromVariantConstructorFunc (*GDExtensionInterfaceGetVariantToTypeConstructor)(GDExtensionVariantType p_type);
13871388

1389+
/**
1390+
* @name variant_get_ptr_internal_getter
1391+
* @since 4.4
1392+
*
1393+
* Provides a function pointer for retrieving a pointer to a variant's internal value.
1394+
* Access to a variant's internal value can be used to modify it in-place, or to retrieve its value without the overhead of variant conversion functions.
1395+
* It is recommended to cache the getter for all variant types in a function table to avoid retrieval overhead upon use.
1396+
*
1397+
* @note Each function assumes the variant's type has already been determined and matches the function.
1398+
* Invoking the function with a variant of a mismatched type has undefined behavior, and may lead to a segmentation fault.
1399+
*
1400+
* @param p_type The Variant type.
1401+
*
1402+
* @return A pointer to a type-specific function that returns a pointer to the internal value of a variant. Check the implementation of this function (gdextension_variant_get_ptr_internal_getter) for pointee type info of each variant type.
1403+
*/
1404+
typedef GDExtensionVariantGetInternalPtrFunc (*GDExtensionInterfaceGetVariantGetInternalPtrFunc)(GDExtensionVariantType p_type);
1405+
13881406
/**
13891407
* @name variant_get_ptr_operator_evaluator
13901408
* @since 4.1

core/input/input_map.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,15 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
521521
default_builtin_cache.insert("ui_text_completion_query", inputs);
522522

523523
inputs = List<Ref<InputEvent>>();
524-
inputs.push_back(InputEventKey::create_reference(Key::ENTER));
525-
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER));
524+
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::TAB));
525+
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::ENTER));
526+
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::KP_ENTER));
526527
default_builtin_cache.insert("ui_text_completion_accept", inputs);
527528

528529
inputs = List<Ref<InputEvent>>();
529530
inputs.push_back(InputEventKey::create_reference(Key::TAB));
531+
inputs.push_back(InputEventKey::create_reference(Key::ENTER));
532+
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER));
530533
default_builtin_cache.insert("ui_text_completion_replace", inputs);
531534

532535
// Newlines
@@ -536,7 +539,6 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
536539
default_builtin_cache.insert("ui_text_newline", inputs);
537540

538541
inputs = List<Ref<InputEvent>>();
539-
540542
inputs.push_back(InputEventKey::create_reference(Key::ENTER | KeyModifierMask::CMD_OR_CTRL));
541543
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER | KeyModifierMask::CMD_OR_CTRL));
542544
default_builtin_cache.insert("ui_text_newline_blank", inputs);

core/math/projection.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -914,14 +914,10 @@ void Projection::set_light_atlas_rect(const Rect2 &p_rect) {
914914
}
915915

916916
Projection::operator String() const {
917-
String str;
918-
for (int i = 0; i < 4; i++) {
919-
for (int j = 0; j < 4; j++) {
920-
str += String((j > 0) ? ", " : "\n") + rtos(columns[i][j]);
921-
}
922-
}
923-
924-
return str;
917+
return "[X: " + columns[0].operator String() +
918+
", Y: " + columns[1].operator String() +
919+
", Z: " + columns[2].operator String() +
920+
", W: " + columns[3].operator String() + "]";
925921
}
926922

927923
real_t Projection::get_aspect() const {

core/os/os.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,14 @@ bool OS::has_feature(const String &p_feature) {
538538
return true;
539539
}
540540

541-
if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
542-
return true;
541+
if (has_server_feature_callback) {
542+
return has_server_feature_callback(p_feature);
543+
}
544+
#ifdef DEBUG_ENABLED
545+
else if (is_stdout_verbose()) {
546+
WARN_PRINT_ONCE("Server features cannot be checked before RenderingServer has been created. If you are checking a server feature, consider moving your OS::has_feature call after INITIALIZATION_LEVEL_SERVERS.");
543547
}
548+
#endif
544549

545550
if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
546551
return true;

0 commit comments

Comments
 (0)