summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/export/export.cpp62
-rw-r--r--platform/android/globals/global_defaults.cpp5
-rw-r--r--platform/android/godot_android.cpp30
-rw-r--r--platform/android/java_glue.cpp62
-rw-r--r--platform/android/os_android.cpp4
-rw-r--r--platform/android/os_android.h4
6 files changed, 84 insertions, 83 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 0bbb45b8f5..e836258e04 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) {
@@ -1212,9 +1212,9 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (p_flags&EXPORT_DUMB_CLIENT) {
- /*String host = EditorSettings::get_singleton()->get("file_server/host");
- int port = EditorSettings::get_singleton()->get("file_server/post");
- String passwd = EditorSettings::get_singleton()->get("file_server/password");
+ /*String host = EditorSettings::get_singleton()->get("filesystem/file_server/host");
+ int port = EditorSettings::get_singleton()->get("filesystem/file_server/post");
+ String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
cl.push_back("-rfs");
cl.push_back(host+":"+itos(port));
if (passwd!="") {
@@ -1305,7 +1305,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (_signed) {
- String jarsigner=EditorSettings::get_singleton()->get("android/jarsigner");
+ String jarsigner=EditorSettings::get_singleton()->get("export/android/jarsigner");
if (!FileAccess::exists(jarsigner)) {
EditorNode::add_io_error("'jarsigner' could not be found.\nPlease supply a path in the editor settings.\nResulting apk is unsigned.");
return OK;
@@ -1315,9 +1315,9 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
String password;
String user;
if (p_debug) {
- keystore=EditorSettings::get_singleton()->get("android/debug_keystore");
- password=EditorSettings::get_singleton()->get("android/debug_keystore_pass");
- user=EditorSettings::get_singleton()->get("android/debug_keystore_user");
+ keystore=EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ password=EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
+ user=EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
ep.step("Signing Debug APK..",103);
@@ -1340,7 +1340,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
args.push_back("SHA1");
args.push_back("-sigalg");
args.push_back("MD5withRSA");
- String tsa_url=EditorSettings::get_singleton()->get("android/timestamping_authority_url");
+ String tsa_url=EditorSettings::get_singleton()->get("export/android/timestamping_authority_url");
if (tsa_url != "") {
args.push_back("-tsa");
args.push_back(tsa_url);
@@ -1506,7 +1506,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
while(!ea->quit_request) {
- String adb=EditorSettings::get_singleton()->get("android/adb");
+ String adb=EditorSettings::get_singleton()->get("export/android/adb");
if (FileAccess::exists(adb)) {
String devices;
@@ -1628,8 +1628,8 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
}
- if (EditorSettings::get_singleton()->get("android/shutdown_adb_on_exit")) {
- String adb=EditorSettings::get_singleton()->get("android/adb");
+ if (EditorSettings::get_singleton()->get("export/android/shutdown_adb_on_exit")) {
+ String adb=EditorSettings::get_singleton()->get("export/android/adb");
if (!FileAccess::exists(adb)) {
return; //adb not configured
}
@@ -1647,7 +1647,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
EditorProgress ep("run","Running on "+devices[p_device].name,3);
- String adb=EditorSettings::get_singleton()->get("android/adb");
+ String adb=EditorSettings::get_singleton()->get("export/android/adb");
if (adb=="") {
EditorNode::add_io_error("ADB executable not configured in settings, can't run.");
@@ -1659,7 +1659,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
ep.step("Exporting APK",0);
- bool use_adb_over_usb = bool(EDITOR_DEF("android/use_remote_debug_over_adb",true));
+ bool use_adb_over_usb = bool(EDITOR_DEF("export/android/use_remote_debug_over_adb",true));
if (use_adb_over_usb) {
p_flags|=EXPORT_REMOTE_DEBUG_LOCALHOST;
@@ -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));
@@ -1728,7 +1728,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
print_line("Reverse result: "+itos(rv));
- int fs_port = EditorSettings::get_singleton()->get("file_server/port");
+ int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
args.clear();
args.push_back("reverse");
@@ -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;
@@ -1822,7 +1822,7 @@ EditorExportPlatformAndroid::EditorExportPlatformAndroid() {
bool EditorExportPlatformAndroid::can_export(String *r_error) const {
bool valid=true;
- String adb=EditorSettings::get_singleton()->get("android/adb");
+ String adb=EditorSettings::get_singleton()->get("export/android/adb");
String err;
if (!FileAccess::exists(adb)) {
@@ -1831,7 +1831,7 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const {
err+="ADB executable not configured in editor settings.\n";
}
- String js = EditorSettings::get_singleton()->get("android/jarsigner");
+ String js = EditorSettings::get_singleton()->get("export/android/jarsigner");
if (!FileAccess::exists(js)) {
@@ -1839,7 +1839,7 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const {
err+="OpenJDK 6 jarsigner not configured in editor settings.\n";
}
- String dk = EditorSettings::get_singleton()->get("android/debug_keystore");
+ String dk = EditorSettings::get_singleton()->get("export/android/debug_keystore");
if (!FileAccess::exists(dk)) {
@@ -1893,20 +1893,20 @@ EditorExportPlatformAndroid::~EditorExportPlatformAndroid() {
void register_android_exporter() {
String exe_ext=OS::get_singleton()->get_name()=="Windows"?"exe":"";
- EDITOR_DEF("android/adb","");
+ EDITOR_DEF("export/android/adb","");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/adb",PROPERTY_HINT_GLOBAL_FILE,exe_ext));
- EDITOR_DEF("android/jarsigner","");
+ EDITOR_DEF("export/android/jarsigner","");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/jarsigner",PROPERTY_HINT_GLOBAL_FILE,exe_ext));
- EDITOR_DEF("android/debug_keystore","");
+ EDITOR_DEF("export/android/debug_keystore","");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/debug_keystore",PROPERTY_HINT_GLOBAL_FILE,"keystore"));
- EDITOR_DEF("android/debug_keystore_user","androiddebugkey");
- EDITOR_DEF("android/debug_keystore_pass","android");
+ EDITOR_DEF("export/android/debug_keystore_user","androiddebugkey");
+ EDITOR_DEF("export/android/debug_keystore_pass","android");
//EDITOR_DEF("android/release_keystore","");
//EDITOR_DEF("android/release_username","");
//EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/release_keystore",PROPERTY_HINT_GLOBAL_FILE,"*.keystore"));
- EDITOR_DEF("android/timestamping_authority_url","");
- EDITOR_DEF("android/use_remote_debug_over_adb",false);
- EDITOR_DEF("android/shutdown_adb_on_exit",true);
+ EDITOR_DEF("export/android/timestamping_authority_url","");
+ EDITOR_DEF("export/android/use_remote_debug_over_adb",false);
+ EDITOR_DEF("export/android/shutdown_adb_on_exit",true);
Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>( memnew(EditorExportPlatformAndroid) );
EditorImportExport::get_singleton()->add_export_platform(exporter);
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..c4d1a85c5f 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -153,7 +153,7 @@ public:
} break;
case Variant::STRING_ARRAY: {
- DVector<String> sarray = *p_args[i];
+ PoolVector<String> sarray = *p_args[i];
jobjectArray arr = env->NewObjectArray(sarray.size(),env->FindClass("java/lang/String"),env->NewStringUTF(""));
for(int j=0;j<sarray.size();j++) {
@@ -165,18 +165,18 @@ public:
} break;
case Variant::INT_ARRAY: {
- DVector<int> array = *p_args[i];
+ PoolVector<int> array = *p_args[i];
jintArray arr = env->NewIntArray(array.size());
- DVector<int>::Read r = array.read();
+ PoolVector<int>::Read r = array.read();
env->SetIntArrayRegion(arr,0,array.size(),r.ptr());
v[i].l=arr;
} break;
case Variant::REAL_ARRAY: {
- DVector<float> array = *p_args[i];
+ PoolVector<float> array = *p_args[i];
jfloatArray arr = env->NewFloatArray(array.size());
- DVector<float>::Read r = array.read();
+ PoolVector<float>::Read r = array.read();
env->SetFloatArrayRegion(arr,0,array.size(),r.ptr());
v[i].l=arr;
@@ -225,7 +225,7 @@ public:
jobjectArray arr = (jobjectArray)env->CallObjectMethodA(instance,E->get().method,v);
int stringCount = env->GetArrayLength(arr);
- DVector<String> sarr;
+ PoolVector<String> sarr;
for (int i=0; i<stringCount; i++) {
jstring string = (jstring) env->GetObjectArrayElement(arr, i);
@@ -241,12 +241,12 @@ public:
jintArray arr = (jintArray)env->CallObjectMethodA(instance,E->get().method,v);
int fCount = env->GetArrayLength(arr);
- DVector<int> sarr;
+ PoolVector<int> sarr;
sarr.resize(fCount);
- DVector<int>::Write w = sarr.write();
+ PoolVector<int>::Write w = sarr.write();
env->GetIntArrayRegion(arr,0,fCount,w.ptr());
- w = DVector<int>::Write();
+ w = PoolVector<int>::Write();
ret=sarr;
} break;
case Variant::REAL_ARRAY: {
@@ -254,12 +254,12 @@ public:
jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance,E->get().method,v);
int fCount = env->GetArrayLength(arr);
- DVector<float> sarr;
+ PoolVector<float> sarr;
sarr.resize(fCount);
- DVector<float>::Write w = sarr.write();
+ PoolVector<float>::Write w = sarr.write();
env->GetFloatArrayRegion(arr,0,fCount,w.ptr());
- w = DVector<float>::Write();
+ w = PoolVector<float>::Write();
ret=sarr;
} break;
default: {
@@ -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..3e8ce35910 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -122,7 +122,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a
} break;
case Variant::STRING_ARRAY: {
- DVector<String> sarray = *p_arg;
+ PoolVector<String> sarray = *p_arg;
jobjectArray arr = env->NewObjectArray(sarray.size(),env->FindClass("java/lang/String"),env->NewStringUTF(""));
for(int j=0;j<sarray.size();j++) {
@@ -181,18 +181,18 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a
case Variant::INT_ARRAY: {
- DVector<int> array = *p_arg;
+ PoolVector<int> array = *p_arg;
jintArray arr = env->NewIntArray(array.size());
- DVector<int>::Read r = array.read();
+ PoolVector<int>::Read r = array.read();
env->SetIntArrayRegion(arr,0,array.size(),r.ptr());
v.val.l=arr;
v.obj=arr;
} break;
case Variant::RAW_ARRAY: {
- DVector<uint8_t> array = *p_arg;
+ PoolVector<uint8_t> array = *p_arg;
jbyteArray arr = env->NewByteArray(array.size());
- DVector<uint8_t>::Read r = array.read();
+ PoolVector<uint8_t>::Read r = array.read();
env->SetByteArrayRegion(arr,0,array.size(),reinterpret_cast<const signed char*>(r.ptr()));
v.val.l=arr;
v.obj=arr;
@@ -200,9 +200,9 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a
} break;
case Variant::REAL_ARRAY: {
- DVector<float> array = *p_arg;
+ PoolVector<float> array = *p_arg;
jfloatArray arr = env->NewFloatArray(array.size());
- DVector<float>::Read r = array.read();
+ PoolVector<float>::Read r = array.read();
env->SetFloatArrayRegion(arr,0,array.size(),r.ptr());
v.val.l=arr;
v.obj=arr;
@@ -259,7 +259,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
jobjectArray arr = (jobjectArray)obj;
int stringCount = env->GetArrayLength(arr);
//print_line("String array! " + String::num(stringCount));
- DVector<String> sarr;
+ PoolVector<String> sarr;
for (int i=0; i<stringCount; i++) {
jstring string = (jstring) env->GetObjectArrayElement(arr, i);
@@ -290,12 +290,12 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
jintArray arr = (jintArray)obj;
int fCount = env->GetArrayLength(arr);
- DVector<int> sarr;
+ PoolVector<int> sarr;
sarr.resize(fCount);
- DVector<int>::Write w = sarr.write();
+ PoolVector<int>::Write w = sarr.write();
env->GetIntArrayRegion(arr,0,fCount,w.ptr());
- w = DVector<int>::Write();
+ w = PoolVector<int>::Write();
return sarr;
};
@@ -303,12 +303,12 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
jbyteArray arr = (jbyteArray)obj;
int fCount = env->GetArrayLength(arr);
- DVector<uint8_t> sarr;
+ PoolVector<uint8_t> sarr;
sarr.resize(fCount);
- DVector<uint8_t>::Write w = sarr.write();
+ PoolVector<uint8_t>::Write w = sarr.write();
env->GetByteArrayRegion(arr,0,fCount,reinterpret_cast<signed char*>(w.ptr()));
- w = DVector<uint8_t>::Write();
+ w = PoolVector<uint8_t>::Write();
return sarr;
};
@@ -540,12 +540,12 @@ public:
jintArray arr = (jintArray)env->CallObjectMethodA(instance,E->get().method,v);
int fCount = env->GetArrayLength(arr);
- DVector<int> sarr;
+ PoolVector<int> sarr;
sarr.resize(fCount);
- DVector<int>::Write w = sarr.write();
+ PoolVector<int>::Write w = sarr.write();
env->GetIntArrayRegion(arr,0,fCount,w.ptr());
- w = DVector<int>::Write();
+ w = PoolVector<int>::Write();
ret=sarr;
env->DeleteLocalRef(arr);
} break;
@@ -554,12 +554,12 @@ public:
jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance,E->get().method,v);
int fCount = env->GetArrayLength(arr);
- DVector<float> sarr;
+ PoolVector<float> sarr;
sarr.resize(fCount);
- DVector<float>::Write w = sarr.write();
+ PoolVector<float>::Write w = sarr.write();
env->GetFloatArrayRegion(arr,0,fCount,w.ptr());
- w = DVector<float>::Write();
+ w = PoolVector<float>::Write();
ret=sarr;
env->DeleteLocalRef(arr);
} break;
@@ -642,7 +642,7 @@ struct JAndroidPointerEvent {
static List<JAndroidPointerEvent> pointer_events;
static List<InputEvent> key_events;
-static List<OS_Android::JoystickEvent> joy_events;
+static List<OS_Android::JoypadEvent> joy_events;
static bool initialized=false;
static Mutex *input_mutex=NULL;
static Mutex *suspend_mutex=NULL;
@@ -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();
@@ -1090,7 +1090,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv * env, jo
while (joy_events.size()) {
- OS_Android::JoystickEvent event = joy_events.front()->get();
+ OS_Android::JoypadEvent event = joy_events.front()->get();
os_android->process_joy_event(event);
joy_events.pop_front();
@@ -1415,7 +1415,7 @@ static unsigned int android_get_keysym(unsigned int p_code) {
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv * env, jobject obj, jint p_device, jint p_button, jboolean p_pressed) {
- OS_Android::JoystickEvent jevent;
+ OS_Android::JoypadEvent jevent;
jevent.device = p_device;
jevent.type = OS_Android::JOY_EVENT_BUTTON;
jevent.index = p_button;
@@ -1428,7 +1428,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv * en
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv * env, jobject obj, jint p_device, jint p_axis, jfloat p_value) {
- OS_Android::JoystickEvent jevent;
+ OS_Android::JoypadEvent jevent;
jevent.device = p_device;
jevent.type = OS_Android::JOY_EVENT_AXIS;
jevent.index = p_axis;
@@ -1440,7 +1440,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv * env,
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv * env, jobject obj, jint p_device, jint p_hat_x, jint p_hat_y) {
- OS_Android::JoystickEvent jevent;
+ OS_Android::JoypadEvent jevent;
jevent.device = p_device;
jevent.type = OS_Android::JOY_EVENT_HAT;
int hat = 0;
@@ -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..e625c0d7ec 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -370,7 +370,7 @@ void OS_Android::main_loop_focusin(){
}
-void OS_Android::process_joy_event(OS_Android::JoystickEvent p_event) {
+void OS_Android::process_joy_event(OS_Android::JoypadEvent p_event) {
switch (p_event.type) {
case JOY_EVENT_BUTTON:
@@ -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/android/os_android.h b/platform/android/os_android.h
index 68b50b2087..5e1fc10fd6 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -91,7 +91,7 @@ public:
JOY_EVENT_HAT = 2
};
- struct JoystickEvent {
+ struct JoypadEvent {
int device;
int type;
@@ -249,7 +249,7 @@ public:
void process_magnetometer(const Vector3& p_magnetometer);
void process_gyroscope(const Vector3& p_gyroscope);
void process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points);
- void process_joy_event(JoystickEvent p_event);
+ void process_joy_event(JoypadEvent p_event);
void process_event(InputEvent p_event);
void init_video_mode(int p_video_width,int p_video_height);