diff --git a/crates/bevy_gilrs/src/gilrs_system.rs b/crates/bevy_gilrs/src/gilrs_system.rs index e0e111cb4d..331bccb0ca 100644 --- a/crates/bevy_gilrs/src/gilrs_system.rs +++ b/crates/bevy_gilrs/src/gilrs_system.rs @@ -18,17 +18,20 @@ use gilrs::{ev::filter::axis_dpad_to_button, EventType, Filter}; pub fn gilrs_event_startup_system( #[cfg(target_arch = "wasm32")] mut gilrs: NonSendMut, #[cfg(not(target_arch = "wasm32"))] mut gilrs: ResMut, - mut connection_events: EventWriter, + mut events: EventWriter, ) { for (id, gamepad) in gilrs.0.get().gamepads() { let info = GamepadInfo { name: gamepad.name().into(), }; - connection_events.send(GamepadConnectionEvent { - gamepad: convert_gamepad_id(id), - connection: GamepadConnection::Connected(info), - }); + events.send( + GamepadConnectionEvent { + gamepad: convert_gamepad_id(id), + connection: GamepadConnection::Connected(info), + } + .into(), + ); } }