From 89e19aaff0082a9d353d3130f3d79e85ebb122c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Mon, 14 Oct 2024 03:40:03 +0200 Subject: [PATCH] force last update after setting state to Suspended (#15888) # Objective - Android doesn't receive lifecycle event `Suspended` before suspension ## Solution - Fix update triggering just after state change on android ## Testing - Tested on the android emulator --- crates/bevy_winit/src/state.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_winit/src/state.rs b/crates/bevy_winit/src/state.rs index b9c9bdfb40..9217968d31 100644 --- a/crates/bevy_winit/src/state.rs +++ b/crates/bevy_winit/src/state.rs @@ -475,6 +475,7 @@ impl ApplicationHandler for WinitAppRunnerState { self.lifecycle = AppLifecycle::Suspended; // Trigger one last update to enter the suspended state should_update = true; + self.ran_update_since_last_redraw = false; #[cfg(target_os = "android")] {