1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Use system timer/wait functions for frame delay when screen reader is active.

This commit is contained in:
Pāvels Nadtočajevs
2025-04-12 16:21:01 +03:00
parent 1b37dacc18
commit 98f377d9d0
9 changed files with 70 additions and 13 deletions

View File

@@ -4855,11 +4855,9 @@ bool Main::iteration() {
}
SceneTree *scene_tree = SceneTree::get_singleton();
bool skip_delay = scene_tree && scene_tree->is_accessibility_enabled();
bool wake_for_events = scene_tree && scene_tree->is_accessibility_enabled();
if (!skip_delay) {
OS::get_singleton()->add_frame_delay(DisplayServer::get_singleton()->window_can_draw());
}
OS::get_singleton()->add_frame_delay(DisplayServer::get_singleton()->window_can_draw(), wake_for_events);
#ifdef TOOLS_ENABLED
if (auto_build_solutions) {