From 1f8c6ea223e404d1ce0c71c205112ab7ce1e5eed Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 30 Jan 2023 04:23:28 +0100 Subject: [PATCH] maybe this will work? --- kubi/src/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubi/src/input.rs b/kubi/src/input.rs index 3957d38..3e763de 100644 --- a/kubi/src/input.rs +++ b/kubi/src/input.rs @@ -98,7 +98,7 @@ fn update_input_state_gamepad ( active_gamepad: UniqueView, mut inputs: UniqueViewMut, ) { - if let Some(Some(gamepad)) = active_gamepad.0.map(|id| gilrs.0.connected_gamepad(id)) { + if let Some(gamepad) = active_gamepad.0.map(|id| gilrs.0.gamepad(id)) { let left_stick = vec2(gamepad.value(Axis::LeftStickX), gamepad.value(Axis::LeftStickY)); let right_stick = vec2(gamepad.value(Axis::RightStickX), -gamepad.value(Axis::RightStickY)); inputs.movement += left_stick;