MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / main_loop_iterate

Method main_loop_iterate

platform/android/os_android.cpp:367–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367bool OS_Android::main_loop_iterate(bool *r_should_swap_buffers) {
368 if (!main_loop) {
369 return false;
370 }
371 DisplayServerAndroid::get_singleton()->reset_swap_buffers_flag();
372 DisplayServerAndroid::get_singleton()->process_events();
373 uint64_t current_frames_drawn = Engine::get_singleton()->get_frames_drawn();
374 bool exit = Main::iteration();
375
376 if (r_should_swap_buffers) {
377 *r_should_swap_buffers = !is_in_low_processor_usage_mode() ||
378 DisplayServerAndroid::get_singleton()->should_swap_buffers() ||
379 RenderingServer::get_singleton()->has_changed() ||
380 current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
381 }
382
383 return exit;
384}
385
386void OS_Android::main_loop_end() {
387#ifdef TOOLS_ENABLED

Calls 5

should_swap_buffersMethod · 0.80
has_changedMethod · 0.80
process_eventsMethod · 0.45
get_frames_drawnMethod · 0.45

Tested by

no test coverage detected