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
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
9 changed files with 70 additions and 13 deletions

View file

@ -180,9 +180,9 @@ String OS_Web::get_name() const {
return "Web";
}
void OS_Web::add_frame_delay(bool p_can_draw) {
void OS_Web::add_frame_delay(bool p_can_draw, bool p_wake_for_events) {
#ifndef PROXY_TO_PTHREAD_ENABLED
OS::add_frame_delay(p_can_draw);
OS::add_frame_delay(p_can_draw, p_wake_for_events);
#endif
}

View file

@ -99,7 +99,7 @@ public:
// Override default OS implementation which would block the main thread with delay_usec.
// Implemented in web_main.cpp loop callback instead.
void add_frame_delay(bool p_can_draw) override;
void add_frame_delay(bool p_can_draw, bool p_wake_for_events) override;
void vibrate_handheld(int p_duration_ms, float p_amplitude) override;