summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-17 14:18:47 +0100
committerGitHub <noreply@github.com>2017-12-17 14:18:47 +0100
commitfc0e341fc5948fae608d4e2c589cc116542fa392 (patch)
tree45c64a700bcbb6baf6c9dc815e4f197f1689b405
parent5b1960e5ff1fc82f73d8e3395aa41ca7ade58a76 (diff)
parent95edc3855ad7fcb8c30501af8369c7df941b3838 (diff)
Merge pull request #14764 from poke1024/android
Increase sleep time for android export thread
-rw-r--r--platform/android/export/export.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}