This commit is contained in:
Matt Thompson 2025-07-15 23:41:22 +03:00 committed by GitHub
commit 0fff5353b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -667,6 +667,15 @@ impl<T: BufferedEvent> WinitAppRunnerState<T> {
#[cfg(not(feature = "custom_cursor"))]
self.update_cursors();
self.ran_update_since_last_redraw = true;
// Read RequestRedraw events that may have been sent during the update
if let Some(app_redraw_events) =
self.world().get_resource::<Events<RequestRedraw>>()
{
if redraw_event_reader.read(app_redraw_events).last().is_some() {
self.redraw_requested = true;
}
}
} else {
self.redraw_requested = true;
}