summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-11-08 19:53:22 +0100
committerkobewi <kobewi4e@gmail.com>2022-12-11 21:36:48 +0100
commit7c6b659bd799080ca3a84110b112313a8cd12b1f (patch)
tree200036957075d148064c2bc3441b3bb4679614ae /modules
parent05097ded0a915cd6c083f15dab08da2bdc0770b8 (diff)
Add PropertyInfo overload for GLOBAL_DEF
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript.cpp8
-rw-r--r--modules/webrtc/register_types.cpp3
2 files changed, 3 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index b7feedaeaa..07d887f0cd 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -2537,8 +2537,7 @@ GDScriptLanguage::GDScriptLanguage() {
script_frame_time = 0;
_debug_call_stack_pos = 0;
- int dmcs = GLOBAL_DEF("debug/settings/gdscript/max_call_stack", 1024);
- ProjectSettings::get_singleton()->set_custom_property_info("debug/settings/gdscript/max_call_stack", PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater")); //minimum is 1024
+ int dmcs = GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"), 1024);
if (EngineDebugger::is_active()) {
//debugging enabled!
@@ -2559,10 +2558,7 @@ GDScriptLanguage::GDScriptLanguage() {
GDScriptWarning::Code code = (GDScriptWarning::Code)i;
Variant default_enabled = GDScriptWarning::get_default_value(code);
String path = GDScriptWarning::get_settings_path_from_code(code);
- GLOBAL_DEF(path, default_enabled);
-
- PropertyInfo property_info = GDScriptWarning::get_property_info(code);
- ProjectSettings::get_singleton()->set_custom_property_info(path, property_info);
+ GLOBAL_DEF(GDScriptWarning::get_property_info(code), default_enabled);
}
#endif // DEBUG_ENABLED
}
diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp
index 09cd538b96..e89fce2ed3 100644
--- a/modules/webrtc/register_types.cpp
+++ b/modules/webrtc/register_types.cpp
@@ -43,8 +43,7 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
}
#define SET_HINT(NAME, _VAL_, _MAX_) \
- GLOBAL_DEF(NAME, _VAL_); \
- ProjectSettings::get_singleton()->set_custom_property_info(NAME, PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"));
+ GLOBAL_DEF(PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"), _VAL_);
SET_HINT(WRTC_IN_BUF, 64, 4096);