bevy/tools/example-showcase/extra-window-resized-events.patch
François Mockers 23cf8ffe6c
update CI patch for EventWriter::send deprecation (#18044)
# Objective

- EventWriter::send has been deprecated, but it was used by one of the
CI patch

## Solution

- Use EventWriter::write instead
2025-02-26 20:36:15 +00:00

18 lines
597 B
Diff

diff --git a/crates/bevy_winit/src/state.rs b/crates/bevy_winit/src/state.rs
index df0aab42d..6e28a6e9c 100644
--- a/crates/bevy_winit/src/state.rs
+++ b/crates/bevy_winit/src/state.rs
@@ -208,6 +208,12 @@ impl<T: Event> ApplicationHandler<T> for WinitAppRunnerState<T> {
}
}
+ window_resized.write(WindowResized {
+ window,
+ width: win.width(),
+ height: win.height(),
+ });
+
match event {
WindowEvent::Resized(size) => {
react_to_resize(window, &mut win, size, &mut window_resized);