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
This commit is contained in:
parent
d0ed3ab379
commit
41178347c1
@ -110,8 +110,9 @@ struct WinitAppRunnerState<T: Event> {
|
|||||||
|
|
||||||
impl<T: Event> WinitAppRunnerState<T> {
|
impl<T: Event> WinitAppRunnerState<T> {
|
||||||
fn new(mut app: App) -> Self {
|
fn new(mut app: App) -> Self {
|
||||||
|
app.add_event::<T>();
|
||||||
#[cfg(feature = "custom_cursor")]
|
#[cfg(feature = "custom_cursor")]
|
||||||
app.add_event::<T>().init_resource::<CustomCursorCache>();
|
app.init_resource::<CustomCursorCache>();
|
||||||
|
|
||||||
let event_writer_system_state: SystemState<(
|
let event_writer_system_state: SystemState<(
|
||||||
EventWriter<WindowResized>,
|
EventWriter<WindowResized>,
|
||||||
|
Loading…
Reference in New Issue
Block a user