Merge pull request #61405 from akien-mga/3.x-android-export-poll-300ms

This commit is contained in:
Rémi Verschelde 2022-05-25 14:03:55 +02:00 committed by GitHub
commit 654d6165a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,11 +373,11 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
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 sleep = 300'000;
uint64_t wait = 3'000'000;
uint64_t time = OS::get_singleton()->get_ticks_usec();
while (OS::get_singleton()->get_ticks_usec() - time < wait) {
OS::get_singleton()->delay_usec(1000 * sleep);
OS::get_singleton()->delay_usec(sleep);
if (ea->quit_request.is_set()) {
break;
}