summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/android/export/export.cpp5
-rw-r--r--platform/android/java_glue.cpp6
-rw-r--r--platform/iphone/export/export.cpp2
-rw-r--r--platform/javascript/export/export.cpp4
-rw-r--r--platform/osx/export/export.cpp2
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm6
-rw-r--r--platform/uwp/export/export.cpp2
-rw-r--r--platform/windows/SCsub4
-rw-r--r--platform/windows/detect.py3
-rw-r--r--platform/windows/os_windows.cpp6
-rw-r--r--platform/windows/os_windows.h4
-rw-r--r--platform/x11/SCsub4
-rw-r--r--platform/x11/export/export.cpp3
-rw-r--r--platform/x11/os_x11.cpp6
-rw-r--r--platform/x11/os_x11.h4
17 files changed, 33 insertions, 34 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index bc67f6e6dc..892b1b6a85 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -277,7 +277,7 @@ def get_ndk_version(path):
try:
with open(prop_file_path) as prop_file:
for line in prop_file:
- key_value = map(lambda x: string.strip(x), line.split("="))
+ key_value = list(map(lambda x: x.strip(), line.split("=")))
if key_value[0] == "Pkg.Revision":
return key_value[1]
except:
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 255413bf2c..d4c079cfc6 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -352,10 +352,11 @@ class EditorExportAndroid : public EditorExportPlatform {
ea->device_lock->unlock();
}
+ uint64_t sleep = OS::get_singleton()->get_power_state() == OS::POWERSTATE_ON_BATTERY ? 1000 : 100;
uint64_t wait = 3000000;
uint64_t time = OS::get_singleton()->get_ticks_usec();
while (OS::get_singleton()->get_ticks_usec() - time < wait) {
- OS::get_singleton()->delay_usec(1000);
+ OS::get_singleton()->delay_usec(1000 * sleep);
if (ea->quit_request)
break;
}
@@ -1305,7 +1306,7 @@ public:
return valid;
}
- virtual String get_binary_extension() const {
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const {
return "apk";
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index bc57f2032f..1e28ef4c6a 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -935,13 +935,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
}
__android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %i\n", cmdlen, int(use_apk_expansion));
-#if 0
- char *args[]={"-test","render",NULL};
- __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup...");
- Error err = Main::setup("apk",2,args,false);
-#else
Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
-#endif
if (cmdline) {
free(cmdline);
}
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index 1833bdf2b3..9ea8d58db0 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -108,7 +108,7 @@ public:
virtual String get_os_name() const { return "iOS"; }
virtual Ref<Texture> get_logo() const { return logo; }
- virtual String get_binary_extension() const { return "ipa"; }
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const { return "ipa"; }
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 775e9c7ee0..ec5010f330 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -57,7 +57,7 @@ public:
virtual Ref<Texture> get_logo() const;
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
- virtual String get_binary_extension() const;
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual bool poll_devices();
@@ -149,7 +149,7 @@ bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p
return !r_missing_templates;
}
-String EditorExportPlatformJavaScript::get_binary_extension() const {
+String EditorExportPlatformJavaScript::get_binary_extension(const Ref<EditorExportPreset> &p_preset) const {
return "html";
}
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index d3b763b42e..8a09aa634e 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -74,7 +74,7 @@ public:
virtual String get_os_name() const { return "OSX"; }
virtual Ref<Texture> get_logo() const { return logo; }
- virtual String get_binary_extension() const { return use_dmg() ? "dmg" : "zip"; }
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const { return use_dmg() ? "dmg" : "zip"; }
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index ede50a05ba..2381b85658 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -215,8 +215,8 @@ public:
virtual bool _check_internal_feature_support(const String &p_feature);
- virtual void set_use_vsync(bool p_enable);
- virtual bool is_vsync_enabled() const;
+ virtual void _set_use_vsync(bool p_enable);
+ //virtual bool is_vsync_enabled() const;
void run();
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index f3809e6eed..aab37cb59c 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -2063,14 +2063,14 @@ Error OS_OSX::move_to_trash(const String &p_path) {
return OK;
}
-void OS_OSX::set_use_vsync(bool p_enable) {
+void OS_OSX::_set_use_vsync(bool p_enable) {
CGLContextObj ctx = CGLGetCurrentContext();
if (ctx) {
GLint swapInterval = p_enable ? 1 : 0;
CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
}
}
-
+/*
bool OS_OSX::is_vsync_enabled() const {
GLint swapInterval = 0;
CGLContextObj ctx = CGLGetCurrentContext();
@@ -2079,7 +2079,7 @@ bool OS_OSX::is_vsync_enabled() const {
}
return swapInterval ? true : false;
}
-
+*/
OS_OSX *OS_OSX::singleton = NULL;
OS_OSX::OS_OSX() {
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 7f86b4ae53..45ca097de5 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -1013,7 +1013,7 @@ public:
return "UWP";
}
- virtual String get_binary_extension() const {
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const {
return "appx";
}
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 5030f4b3e0..604896b0db 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -9,9 +9,9 @@ def make_debug_mingw(target, source, env):
mingw_prefix = env["mingw_prefix_32"]
else:
mingw_prefix = env["mingw_prefix_64"]
- os.system(mingw_prefix + 'objcopy --only-keep-debug %s %s.debug' % (target[0], target[0]))
+ os.system(mingw_prefix + 'objcopy --only-keep-debug %s %s.debugsymbols' % (target[0], target[0]))
os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded %s' % (target[0]))
- os.system(mingw_prefix + 'objcopy --add-gnu-debuglink=%s.debug %s' % (target[0], target[0]))
+ os.system(mingw_prefix + 'objcopy --add-gnu-debuglink=%s.debugsymbols %s' % (target[0], target[0]))
common_win = [
"context_gl_win.cpp",
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 01eb50e69c..564359d743 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -188,6 +188,9 @@ def configure(env):
else:
VC_PATH = ""
+ if (env["use_lto"]):
+ env.Append(CCFLAGS=['/GL'])
+ env.Append(LINKFLAGS=['/LTCG'])
if (env["openmp"]):
env.Append(CPPFLAGS=['/openmp'])
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 6cab683e83..d3fa2bbc0d 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2288,19 +2288,19 @@ String OS_Windows::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
-void OS_Windows::set_use_vsync(bool p_enable) {
+void OS_Windows::_set_use_vsync(bool p_enable) {
if (gl_context)
gl_context->set_use_vsync(p_enable);
}
-
+/*
bool OS_Windows::is_vsync_enabled() const {
if (gl_context)
return gl_context->is_using_vsync();
return true;
-}
+}*/
OS::PowerState OS_Windows::get_power_state() {
return power_manager->get_power_state();
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index f2226a53a9..7c5490a0a4 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -275,8 +275,8 @@ public:
virtual bool is_joy_known(int p_device);
virtual String get_joy_guid(int p_device) const;
- virtual void set_use_vsync(bool p_enable);
- virtual bool is_vsync_enabled() const;
+ virtual void _set_use_vsync(bool p_enable);
+ //virtual bool is_vsync_enabled() const;
virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
diff --git a/platform/x11/SCsub b/platform/x11/SCsub
index 6378553638..38dd2ddd88 100644
--- a/platform/x11/SCsub
+++ b/platform/x11/SCsub
@@ -4,9 +4,9 @@ import os
Import('env')
def make_debug(target, source, env):
- os.system('objcopy --only-keep-debug %s %s.debug' % (target[0], target[0]))
+ os.system('objcopy --only-keep-debug %s %s.debugsymbols' % (target[0], target[0]))
os.system('strip --strip-debug --strip-unneeded %s' % (target[0]))
- os.system('objcopy --add-gnu-debuglink=%s.debug %s' % (target[0], target[0]))
+ os.system('objcopy --add-gnu-debuglink=%s.debugsymbols %s' % (target[0], target[0]))
common_x11 = [
"context_gl_x11.cpp",
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index fdb43c9ae0..1baa3e127f 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -44,7 +44,8 @@ void register_x11_exporter() {
logo->create_from_image(img);
platform->set_logo(logo);
platform->set_name("Linux/X11");
- platform->set_extension("bin");
+ platform->set_extension("x86");
+ platform->set_extension("x86_64", "binary_format/64_bits");
platform->set_release_32("linux_x11_32_release");
platform->set_debug_32("linux_x11_32_debug");
platform->set_release_64("linux_x11_64_release");
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 0c0bc1a8a3..6616e47317 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -2306,11 +2306,11 @@ String OS_X11::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
-void OS_X11::set_use_vsync(bool p_enable) {
+void OS_X11::_set_use_vsync(bool p_enable) {
if (context_gl)
return context_gl->set_use_vsync(p_enable);
}
-
+/*
bool OS_X11::is_vsync_enabled() const {
if (context_gl)
@@ -2318,7 +2318,7 @@ bool OS_X11::is_vsync_enabled() const {
return true;
}
-
+*/
void OS_X11::set_context(int p_context) {
XClassHint *classHint = XAllocClassHint();
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index c8cea1e30c..86f25918fd 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -270,8 +270,8 @@ public:
virtual void set_context(int p_context);
- virtual void set_use_vsync(bool p_enable);
- virtual bool is_vsync_enabled() const;
+ virtual void _set_use_vsync(bool p_enable);
+ //virtual bool is_vsync_enabled() const;
virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();