diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/detect.py | 2 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 3 | ||||
-rw-r--r-- | platform/android/java_glue.cpp | 6 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 4 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 6 | ||||
-rw-r--r-- | platform/windows/detect.py | 3 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 6 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 6 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 4 |
10 files changed, 21 insertions, 23 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 6ca687d057..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; } diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 40dfe6d909..c4d0cf5181 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -936,13 +936,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/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/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/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(); |