Skip to content

Commit 4117834

Browse files
IceSentrymockersf
authored andcommitted
Add WakeUp event to App (#19212)
# Objective - The WakeUp event is never added to the app. If you need to use that event you currently need to add it yourself. ## Solution - Add the WakeUp event to the App in the WinitPlugin ## Testing - I tested the window_setting example and it compiled and worked
1 parent d0ed3ab commit 4117834

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_winit/src/state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ struct WinitAppRunnerState<T: Event> {
110110

111111
impl<T: Event> WinitAppRunnerState<T> {
112112
fn new(mut app: App) -> Self {
113+
app.add_event::<T>();
113114
#[cfg(feature = "custom_cursor")]
114-
app.add_event::<T>().init_resource::<CustomCursorCache>();
115+
app.init_resource::<CustomCursorCache>();
115116

116117
let event_writer_system_state: SystemState<(
117118
EventWriter<WindowResized>,

0 commit comments

Comments
 (0)