mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 20:53:15 +00:00
Merge pull request #60506 from m4gr3d/fix_low_processor_mode_rendering_after_resume_main
This commit is contained in:
commit
6a9115b983
@ -503,6 +503,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererResumed(JNI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We force redraw to ensure we render at least once when resuming the app.
|
||||||
|
Main::force_redraw();
|
||||||
if (os_android->get_main_loop()) {
|
if (os_android->get_main_loop()) {
|
||||||
os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_RESUMED);
|
os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_RESUMED);
|
||||||
}
|
}
|
||||||
|
@ -187,10 +187,11 @@ bool OS_Android::main_loop_iterate(bool *r_should_swap_buffers) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DisplayServerAndroid::get_singleton()->process_events();
|
DisplayServerAndroid::get_singleton()->process_events();
|
||||||
|
uint64_t current_frames_drawn = Engine::get_singleton()->get_frames_drawn();
|
||||||
bool exit = Main::iteration();
|
bool exit = Main::iteration();
|
||||||
|
|
||||||
if (r_should_swap_buffers) {
|
if (r_should_swap_buffers) {
|
||||||
*r_should_swap_buffers = !is_in_low_processor_usage_mode() || RenderingServer::get_singleton()->has_changed();
|
*r_should_swap_buffers = !is_in_low_processor_usage_mode() || RenderingServer::get_singleton()->has_changed() || current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
return exit;
|
return exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user