diff options
| author | Leon Krause | 2017-11-13 21:46:57 +0100 |
|---|---|---|
| committer | Leon Krause | 2017-11-14 15:15:13 +0100 |
| commit | 9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c (patch) | |
| tree | 8ceadc6a5891c5f3205b0e23d5b7dd6ef3d40e1f /modules/gdnative | |
| parent | 3732b2318e8a4942e8202f1797527220a5ae01a0 (diff) | |
| download | godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.tar.gz godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.tar.zst godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.zip | |
Move singleton management from ProjectSettings to Engine
Diffstat (limited to 'modules/gdnative')
| -rw-r--r-- | modules/gdnative/gdnative/gdnative.cpp | 4 | ||||
| -rw-r--r-- | modules/gdnative/nativescript/api_generator.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp index 64a7c33cf..f11ff9011 100644 --- a/modules/gdnative/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative/gdnative.cpp @@ -30,10 +30,10 @@ #include "gdnative/gdnative.h" #include "class_db.h" +#include "engine.h" #include "error_macros.h" #include "global_constants.h" #include "os/os.h" -#include "project_settings.h" #include "variant.h" #ifdef __cplusplus @@ -88,7 +88,7 @@ void GDAPI godot_object_destroy(godot_object *p_o) { // Singleton API godot_object GDAPI *godot_global_get_singleton(char *p_name) { - return (godot_object *)ProjectSettings::get_singleton()->get_singleton_object(String(p_name)); + return (godot_object *)Engine::get_singleton()->get_singleton_object(String(p_name)); } // result shouldn't be freed void GDAPI *godot_get_stack_bottom() { diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 63fb71feb..f9d699fb5 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -32,9 +32,9 @@ #ifdef TOOLS_ENABLED #include "core/class_db.h" +#include "core/engine.h" #include "core/global_constants.h" #include "core/pair.h" -#include "core/project_settings.h" #include "os/file_access.h" // helper stuff @@ -177,7 +177,7 @@ List<ClassAPI> generate_c_api_classes() { if (name.begins_with("_")) { name.remove(0); } - class_api.is_singleton = ProjectSettings::get_singleton()->has_singleton(name); + class_api.is_singleton = Engine::get_singleton()->has_singleton(name); } class_api.is_instanciable = !class_api.is_singleton && ClassDB::can_instance(class_name); |
