diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/export/export.cpp | 12 | ||||
-rw-r--r-- | platform/android/globals/global_defaults.cpp | 5 | ||||
-rw-r--r-- | platform/android/godot_android.cpp | 6 | ||||
-rw-r--r-- | platform/android/java_glue.cpp | 12 | ||||
-rw-r--r-- | platform/android/os_android.cpp | 2 | ||||
-rw-r--r-- | platform/bb10/export/export.cpp | 4 | ||||
-rw-r--r-- | platform/iphone/app_delegate.mm | 10 | ||||
-rwxr-xr-x | platform/iphone/gl_view.mm | 2 | ||||
-rwxr-xr-x | platform/iphone/globals/global_defaults.cpp | 5 | ||||
-rw-r--r-- | platform/javascript/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 4 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/uwp/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 4 |
14 files changed, 41 insertions, 39 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"); } diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp index a79d0807aa..6ba97b8b6e 100644 --- a/platform/bb10/export/export.cpp +++ b/platform/bb10/export/export.cpp @@ -248,7 +248,7 @@ void EditorExportPlatformBB10::_fix_descriptor(Vector<uint8_t>& p_descriptor) { if (this->name!="") { aname=this->name; } else { - aname = Globals::get_singleton()->get("application/name"); + aname = GlobalConfig::get_singleton()->get("application/name"); } @@ -432,7 +432,7 @@ Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debu 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) { diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index 86c3eecd47..feb87e742f 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -162,14 +162,14 @@ static int frame_count = 0; NSString* str = (NSString*)value; String uval = String::utf8([str UTF8String]); - Globals::get_singleton()->set("Info.plist/"+ukey, uval); + GlobalConfig::get_singleton()->set("Info.plist/"+ukey, uval); } else if ([value isKindOfClass:[NSNumber class]]) { NSNumber* n = (NSNumber*)value; double dval = [n doubleValue]; - Globals::get_singleton()->set("Info.plist/"+ukey, dval); + GlobalConfig::get_singleton()->set("Info.plist/"+ukey, dval); }; // do stuff } @@ -186,7 +186,7 @@ static int frame_count = 0; ++frame_count; #ifdef APPIRATER_ENABLED - int aid = Globals::get_singleton()->get("ios/app_id"); + int aid = GlobalConfig::get_singleton()->get("ios/app_id"); [Appirater appLaunched:YES app_id:aid]; #endif @@ -266,11 +266,11 @@ static int frame_count = 0; #ifdef MODULE_GAME_ANALYTICS_ENABLED printf("********************* didFinishLaunchingWithOptions\n"); - if(!Globals::get_singleton()->has("mobileapptracker/advertiser_id")) + if(!GlobalConfig::get_singleton()->has("mobileapptracker/advertiser_id")) { return; } - if(!Globals::get_singleton()->has("mobileapptracker/conversion_key")) + if(!GlobalConfig::get_singleton()->has("mobileapptracker/conversion_key")) { return; } diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index d8ed930157..3df29c5178 100755 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -76,7 +76,7 @@ void _hide_keyboard() { }; bool _play_video(String p_path, float p_volume, String p_audio_track, String p_subtitle_track) { - p_path = Globals::get_singleton()->globalize_path(p_path); + p_path = GlobalConfig::get_singleton()->globalize_path(p_path); NSString* file_path = [[[NSString alloc] initWithUTF8String:p_path.utf8().get_data()] autorelease]; diff --git a/platform/iphone/globals/global_defaults.cpp b/platform/iphone/globals/global_defaults.cpp index 0a67566398..76b5c9aa01 100755 --- a/platform/iphone/globals/global_defaults.cpp +++ b/platform/iphone/globals/global_defaults.cpp @@ -32,9 +32,10 @@ void register_iphone_global_defaults() { - GLOBAL_DEF("rasterizer.iOS/use_fragment_lighting",false); + /*GLOBAL_DEF("rasterizer.iOS/use_fragment_lighting",false); GLOBAL_DEF("rasterizer.iOS/fp16_framebuffer",false); GLOBAL_DEF("display.iOS/driver","GLES2"); - Globals::get_singleton()->set_custom_property_info("display.iOS/driver",PropertyInfo(Variant::STRING,"display.iOS/driver",PROPERTY_HINT_ENUM,"GLES1,GLES2")); + GlobalConfig::get_singleton()->set_custom_property_info("display.iOS/driver",PropertyInfo(Variant::STRING,"display.iOS/driver",PROPERTY_HINT_ENUM,"GLES1,GLES2")); GLOBAL_DEF("display.iOS/use_cadisplaylink",true); + */ } diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 77aab98e0c..c151bff45c 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -181,9 +181,9 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t>& p_html, const St String current_line = lines[i]; current_line = current_line.replace("$GODOT_TMEM",itos((1<<(max_memory+5))*1024*1024)); current_line = current_line.replace("$GODOT_BASE",p_name); - current_line = current_line.replace("$GODOT_CANVAS_WIDTH",Globals::get_singleton()->get("display/width")); - current_line = current_line.replace("$GODOT_CANVAS_HEIGHT",Globals::get_singleton()->get("display/height")); - current_line = current_line.replace("$GODOT_HEAD_TITLE",!html_title.empty()?html_title:(String) Globals::get_singleton()->get("application/name")); + current_line = current_line.replace("$GODOT_CANVAS_WIDTH",GlobalConfig::get_singleton()->get("display/width")); + current_line = current_line.replace("$GODOT_CANVAS_HEIGHT",GlobalConfig::get_singleton()->get("display/height")); + current_line = current_line.replace("$GODOT_HEAD_TITLE",!html_title.empty()?html_title:(String) GlobalConfig::get_singleton()->get("application/name")); current_line = current_line.replace("$GODOT_HEAD_INCLUDE",html_head_include); current_line = current_line.replace("$GODOT_STYLE_FONT_FAMILY",html_font_family); current_line = current_line.replace("$GODOT_STYLE_INCLUDE",html_style_include); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index f1b67021f0..3553bdc7a6 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -309,7 +309,7 @@ void OS_JavaScript::initialize(const VideoMode& p_desired,int p_video_driver,int #ifdef JAVASCRIPT_EVAL_ENABLED javascript_eval = memnew(JavaScript); - Globals::get_singleton()->add_singleton(Globals::Singleton("JavaScript", javascript_eval)); + GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("JavaScript", javascript_eval)); #endif } @@ -807,7 +807,7 @@ String OS_JavaScript::get_data_dir() const { //if (get_data_dir_func) // return get_data_dir_func(); return "/userfs"; - //return Globals::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir"); + //return GlobalConfig::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir"); }; String OS_JavaScript::get_executable_path() const { diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index d8298eee73..1cb41cede2 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -324,8 +324,8 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug String pkg_name; if (app_name!="") pkg_name=app_name; - else if (String(Globals::get_singleton()->get("application/name"))!="") - pkg_name=String(Globals::get_singleton()->get("application/name")); + else if (String(GlobalConfig::get_singleton()->get("application/name"))!="") + pkg_name=String(GlobalConfig::get_singleton()->get("application/name")); else pkg_name="Unnamed"; @@ -371,7 +371,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug if (file=="Contents/Resources/icon.icns") { //see if there is an icon - String iconpath = Globals::get_singleton()->get("application/icon"); + String iconpath = GlobalConfig::get_singleton()->get("application/icon"); print_line("icon? "+iconpath); if (iconpath!="") { Image icon; diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 186c509ca5..1844df5eef 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -1571,7 +1571,7 @@ Vector<uint8_t> EditorExportPlatformUWP::_fix_manifest(const Vector<uint8_t> &p_ String architecture = arch == ARM ? "ARM" : arch == X86 ? "x86" : "x64"; result = result.replace("$architecture$", architecture); - result = result.replace("$display_name$", display_name.empty() ? (String)Globals::get_singleton()->get("application/name") : display_name); + result = result.replace("$display_name$", display_name.empty() ? (String)GlobalConfig::get_singleton()->get("application/name") : display_name); result = result.replace("$publisher_display_name$", publisher_display_name); result = result.replace("$app_description$", description); result = result.replace("$bg_color$", background_color); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 445f4fc328..11e5fd1387 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2382,7 +2382,7 @@ String OS_Windows::get_data_dir() const { if (has_environment("APPDATA")) { - bool use_godot = Globals::get_singleton()->get("application/use_shared_user_dir"); + bool use_godot = GlobalConfig::get_singleton()->get("application/use_shared_user_dir"); if (!use_godot) return (OS::get_singleton()->get_environment("APPDATA")+"/"+an).replace("\\","/"); else @@ -2390,7 +2390,7 @@ String OS_Windows::get_data_dir() const { } } - return Globals::get_singleton()->get_resource_path(); + return GlobalConfig::get_singleton()->get_resource_path(); } |