bevy/tools/example-showcase/extra-window-resized-events.patch
François ba2fffef5a
example showcase: fix window resized patch (#11596)
# Objective

- one of the patch for the example showcase need to be updated after the
recent winit event loop changes

## Solution

- update it
2024-01-29 17:53:18 +00:00

17 lines
609 B
Diff

diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs
index 63d79b1d2..83ed56293 100644
--- a/crates/bevy_winit/src/lib.rs
+++ b/crates/bevy_winit/src/lib.rs
@@ -429,6 +429,12 @@ fn handle_winit_event(
runner_state.window_event_received = true;
+ window_resized.send(WindowResized {
+ window,
+ width: win.width(),
+ height: win.height(),
+ });
+
match event {
WindowEvent::Resized(size) => {
react_to_resize(&mut win, size, &mut window_resized, window);