debug gamepad button

This commit is contained in:
2025-03-19 23:14:29 +01:00
parent 6c2525cc1c
commit b4013b4eb0

View File

@@ -149,10 +149,6 @@ fn mouse_click(mut events: EventReader<MouseButtonInput>, mut commands: Commands
fn gamepad_connections(mut evr_gamepad: EventReader<GamepadEvent>) {
for ev in evr_gamepad.read() {
// we only care about connection events
let GamepadEvent::Connection(ev_conn) = ev else {
continue;
};
match ev {
GamepadEvent::Connection(connection) => match &connection.connection {
GamepadConnection::Connected {
@@ -162,11 +158,11 @@ fn gamepad_connections(mut evr_gamepad: EventReader<GamepadEvent>) {
} => {
info!(
"New gamepad connected: {:?}, name: {name}, vendor: {vendor_id:?}, product: {product_id:?}",
ev_conn.gamepad
connection.gamepad,
);
}
GamepadConnection::Disconnected => {
info!("Lost connection with gamepad: {:?}", ev_conn.gamepad);
info!("Lost connection with gamepad: {:?}", connection.gamepad);
}
},
GamepadEvent::Button(gamepad_button_changed_event) => {