mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 12:14:44 +00:00
-Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
This commit is contained in:
parent
89588d4334
commit
25678b1876
162 changed files with 1296 additions and 831 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#include "dir_access_jandroid.h"
|
||||
#include "file_access_android.h"
|
||||
#include "file_access_jandroid.h"
|
||||
#include "global_config.h"
|
||||
#include "project_settings.h"
|
||||
#include "java_class_wrapper.h"
|
||||
#include "main/input_default.h"
|
||||
#include "main/main.h"
|
||||
|
|
@ -883,7 +883,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
|
|||
__android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK");
|
||||
|
||||
//video driver is determined here, because once initialized, it can't be changed
|
||||
String vd = GlobalConfig::get_singleton()->get("display/driver");
|
||||
String vd = ProjectSettings::get_singleton()->get("display/driver");
|
||||
|
||||
env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean) true);
|
||||
|
||||
|
|
@ -930,12 +930,12 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, job
|
|||
|
||||
static void _initialize_java_modules() {
|
||||
|
||||
if (!GlobalConfig::get_singleton()->has("android/modules")) {
|
||||
if (!ProjectSettings::get_singleton()->has("android/modules")) {
|
||||
print_line("ANDROID MODULES: Nothing to load, aborting");
|
||||
return;
|
||||
}
|
||||
|
||||
String modules = GlobalConfig::get_singleton()->get("android/modules");
|
||||
String modules = ProjectSettings::get_singleton()->get("android/modules");
|
||||
modules = modules.strip_edges();
|
||||
if (modules == String()) {
|
||||
return;
|
||||
|
|
@ -1005,7 +1005,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
|
|||
// because of the way android forces you to do everything with threads
|
||||
|
||||
java_class_wrapper = memnew(JavaClassWrapper(_godot_instance));
|
||||
GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("JavaClassWrapper", java_class_wrapper));
|
||||
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper));
|
||||
_initialize_java_modules();
|
||||
|
||||
Main::setup2();
|
||||
|
|
@ -1504,8 +1504,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv *env
|
|||
s->set_instance(env->NewGlobalRef(p_object));
|
||||
jni_singletons[singname] = s;
|
||||
|
||||
GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton(singname, s));
|
||||
GlobalConfig::get_singleton()->set(singname, s);
|
||||
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton(singname, s));
|
||||
ProjectSettings::get_singleton()->set(singname, s);
|
||||
}
|
||||
|
||||
static Variant::Type get_jni_type(const String &p_type) {
|
||||
|
|
@ -1578,7 +1578,7 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
|
|||
|
||||
String js = env->GetStringUTFChars(path, NULL);
|
||||
|
||||
return env->NewStringUTF(GlobalConfig::get_singleton()->get(js).operator String().utf8().get_data());
|
||||
return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue