Move singleton management from ProjectSettings to Engine
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
#include "audio_driver_jandroid.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "dir_access_jandroid.h"
|
||||
#include "engine.h"
|
||||
#include "file_access_android.h"
|
||||
#include "file_access_jandroid.h"
|
||||
#include "java_class_wrapper.h"
|
||||
@ -953,7 +954,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
|
||||
__android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK");
|
||||
|
||||
java_class_wrapper = memnew(JavaClassWrapper(_godot_instance));
|
||||
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("JavaClassWrapper", java_class_wrapper));
|
||||
_initialize_java_modules();
|
||||
}
|
||||
|
||||
@ -1426,7 +1427,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv *env
|
||||
s->set_instance(env->NewGlobalRef(p_object));
|
||||
jni_singletons[singname] = s;
|
||||
|
||||
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton(singname, s));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton(singname, s));
|
||||
ProjectSettings::get_singleton()->set(singname, s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user