summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-05 09:16:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-05 09:16:00 -0300
commit0f7af4ea51744cda23c4d3c7481f9c332973d1d4 (patch)
tree27b8914062558b5648655ccf3db13251d217af98 /platform/android
parent9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff)
-Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/export/export.cpp12
-rw-r--r--platform/android/globals/global_defaults.cpp5
-rw-r--r--platform/android/godot_android.cpp6
-rw-r--r--platform/android/java_glue.cpp12
-rw-r--r--platform/android/os_android.cpp2
5 files changed, 19 insertions, 18 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 0bbb45b8f5..3259f0a165 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -553,8 +553,8 @@ void EditorExportPlatformAndroid::_fix_resources(Vector<uint8_t>& p_manifest) {
String lang = str.substr(str.find_last("-")+1,str.length()).replace("-","_");
String prop = "application/name_"+lang;
- if (Globals::get_singleton()->has(prop)) {
- str = Globals::get_singleton()->get(prop);
+ if (GlobalConfig::get_singleton()->has(prop)) {
+ str = GlobalConfig::get_singleton()->get(prop);
} else {
str = get_project_name();
}
@@ -626,7 +626,7 @@ String EditorExportPlatformAndroid::get_project_name() const {
if (this->name!="") {
aname=this->name;
} else {
- aname = Globals::get_singleton()->get("application/name");
+ aname = GlobalConfig::get_singleton()->get("application/name");
}
@@ -1148,7 +1148,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (!found) {
- String appicon = Globals::get_singleton()->get("application/icon");
+ String appicon = GlobalConfig::get_singleton()->get("application/icon");
if (appicon!="" && appicon.ends_with(".png")) {
FileAccess*f = FileAccess::open(appicon,FileAccess::READ);
if (f) {
@@ -1719,7 +1719,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
args.push_back("--remove-all");
err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
- int port = Globals::get_singleton()->get("debug/debug_port");
+ int port = GlobalConfig::get_singleton()->get("network/debug/remote_port");
args.clear();
args.push_back("reverse");
args.push_back("tcp:"+itos(port));
@@ -1766,7 +1766,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
String EditorExportPlatformAndroid::get_package_name() {
String pname = package;
- String basename = Globals::get_singleton()->get("application/name");
+ String basename = GlobalConfig::get_singleton()->get("application/name");
basename=basename.to_lower();
String name;
diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp
index 3ec1094ee1..52b59b2dc1 100644
--- a/platform/android/globals/global_defaults.cpp
+++ b/platform/android/globals/global_defaults.cpp
@@ -32,10 +32,11 @@
void register_android_global_defaults() {
- GLOBAL_DEF("rasterizer.Android/use_fragment_lighting",false);
+/* GLOBAL_DEF("rasterizer.Android/use_fragment_lighting",false);
GLOBAL_DEF("rasterizer.Android/fp16_framebuffer",false);
GLOBAL_DEF("display.Android/driver","GLES2");
// GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false);
- Globals::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2"));
+ GlobalConfig::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2"));
+ */
}
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index 4ef6619146..715021db33 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -654,7 +654,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) {
#else
Error err = Main::setup("apk",0,NULL);
- String modules = Globals::get_singleton()->get("android/modules");
+ String modules = GlobalConfig::get_singleton()->get("android/modules");
Vector<String> mods = modules.split(",",false);
mods.push_back("GodotOS");
__android_log_print(ANDROID_LOG_INFO,"godot","mod count: %i",mods.size());
@@ -912,7 +912,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_Godot_registerSingleton(JNIEnv
s->set_instance(env->NewGlobalRef(p_object));
jni_singletons[singname]=s;
- Globals::get_singleton()->add_singleton(Globals::Singleton(singname,s));
+ GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton(singname,s));
}
@@ -983,7 +983,7 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_Godot_getGlobal(JNIEnv * en
String js = env->GetStringUTFChars( path, NULL );
- return env->NewStringUTF(Globals::get_singleton()->get(js).operator String().utf8().get_data());
+ return env->NewStringUTF(GlobalConfig::get_singleton()->get(js).operator String().utf8().get_data());
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index c8dc3ce3c3..602d22dfa2 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -921,7 +921,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv * e
__android_log_print(ANDROID_LOG_INFO,"godot","*****SETUP OK");
//video driver is determined here, because once initialized, it cant be changed
- String vd = Globals::get_singleton()->get("display/driver");
+ String vd = GlobalConfig::get_singleton()->get("display/driver");
env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean)true);
@@ -976,7 +976,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_quit(JNIEnv * env, jo
static void _initialize_java_modules() {
- String modules = Globals::get_singleton()->get("android/modules");
+ String modules = GlobalConfig::get_singleton()->get("android/modules");
Vector<String> mods = modules.split(",",false);
print_line("ANDROID MODULES : " + modules);
__android_log_print(ANDROID_LOG_INFO,"godot","mod count: %i",mods.size());
@@ -1051,7 +1051,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv * env, jo
// because of the way android forces you to do everything with threads
java_class_wrapper = memnew( JavaClassWrapper(_godot_instance ));
- Globals::get_singleton()->add_singleton(Globals::Singleton("JavaClassWrapper",java_class_wrapper));
+ GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("JavaClassWrapper",java_class_wrapper));
_initialize_java_modules();
Main::setup2();
@@ -1570,8 +1570,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv * en
s->set_instance(env->NewGlobalRef(p_object));
jni_singletons[singname]=s;
- Globals::get_singleton()->add_singleton(Globals::Singleton(singname,s));
- Globals::get_singleton()->set(singname,s);
+ GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton(singname,s));
+ GlobalConfig::get_singleton()->set(singname,s);
}
@@ -1649,7 +1649,7 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
String js = env->GetStringUTFChars( path, NULL );
- return env->NewStringUTF(Globals::get_singleton()->get(js).operator String().utf8().get_data());
+ return env->NewStringUTF(GlobalConfig::get_singleton()->get(js).operator String().utf8().get_data());
}
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 54af4cde13..093064104a 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -748,7 +748,7 @@ String OS_Android::get_data_dir() const {
return ".";
- //return Globals::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
+ //return GlobalConfig::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
}