mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add missing display server overrides
Improves the base functionality for the Android platform and helps reduce the amount of spurious error logs emitted.
This commit is contained in:
@@ -268,12 +268,16 @@ bool OS_Android::main_loop_iterate(bool *r_should_swap_buffers) {
|
||||
if (!main_loop) {
|
||||
return false;
|
||||
}
|
||||
DisplayServerAndroid::get_singleton()->reset_swap_buffers_flag();
|
||||
DisplayServerAndroid::get_singleton()->process_events();
|
||||
uint64_t current_frames_drawn = Engine::get_singleton()->get_frames_drawn();
|
||||
bool exit = Main::iteration();
|
||||
|
||||
if (r_should_swap_buffers) {
|
||||
*r_should_swap_buffers = !is_in_low_processor_usage_mode() || RenderingServer::get_singleton()->has_changed() || current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
|
||||
*r_should_swap_buffers = !is_in_low_processor_usage_mode() ||
|
||||
DisplayServerAndroid::get_singleton()->should_swap_buffers() ||
|
||||
RenderingServer::get_singleton()->has_changed() ||
|
||||
current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
|
||||
}
|
||||
|
||||
return exit;
|
||||
|
||||
Reference in New Issue
Block a user