Skip to content

Commit 1115013

Browse files
authored
Merge pull request bevyengine#6 from mockersf/winit-0.30-fix-patches
fix patches
2 parents f2f3d93 + 00fa59b commit 1115013

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs
2-
index 63d79b1d2..83ed56293 100644
3-
--- a/crates/bevy_winit/src/lib.rs
4-
+++ b/crates/bevy_winit/src/lib.rs
5-
@@ -429,6 +429,12 @@ fn handle_winit_event(
1+
diff --git a/crates/bevy_winit/src/state.rs b/crates/bevy_winit/src/state.rs
2+
index c256f5492..ae065111b 100644
3+
--- a/crates/bevy_winit/src/state.rs
4+
+++ b/crates/bevy_winit/src/state.rs
5+
@@ -198,6 +198,12 @@ impl<T: Event> ApplicationHandler<T> for WinitAppRunnerState<T> {
6+
}
7+
}
68

7-
runner_state.window_event_received = true;
8-
9-
+ window_resized.send(WindowResized {
10-
+ window,
11-
+ width: win.width(),
12-
+ height: win.height(),
13-
+ });
9+
+ window_resized.send(WindowResized {
10+
+ window,
11+
+ width: win.width(),
12+
+ height: win.height(),
13+
+ });
1414
+
15-
match event {
16-
WindowEvent::Resized(size) => {
17-
react_to_resize(&mut win, size, &mut window_resized, window);
15+
match event {
16+
WindowEvent::Resized(size) => {
17+
react_to_resize(&mut win, size, &mut window_resized, window);

tools/example-showcase/remove-desktop-app-mode.patch

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
diff --git a/crates/bevy_winit/src/winit_config.rs b/crates/bevy_winit/src/winit_config.rs
2-
index f2cb424ec..e68e01de0 100644
2+
index 104384086..6e3c8dd83 100644
33
--- a/crates/bevy_winit/src/winit_config.rs
44
+++ b/crates/bevy_winit/src/winit_config.rs
5-
@@ -31,14 +31,7 @@ impl WinitSettings {
5+
@@ -29,10 +29,7 @@ impl WinitSettings {
66
///
77
/// Use the [`EventLoopProxy`](crate::EventLoopProxy) to request a redraw from outside bevy.
88
pub fn desktop_app() -> Self {
99
- WinitSettings {
10-
- focused_mode: UpdateMode::Reactive {
11-
- wait: Duration::from_secs(5),
12-
- },
13-
- unfocused_mode: UpdateMode::ReactiveLowPower {
14-
- wait: Duration::from_secs(60),
15-
- },
10+
- focused_mode: UpdateMode::reactive(Duration::from_secs(5)),
11+
- unfocused_mode: UpdateMode::reactive_low_power(Duration::from_secs(60)),
1612
- }
1713
+ Self::default()
1814
}

0 commit comments

Comments
 (0)