mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-25 05:08:21 -06:00
use xinput, invert y
This commit is contained in:
parent
88b115732b
commit
00839d6b2e
|
@ -17,4 +17,4 @@ shipyard = { version = "0.6", features = ["thread_local"] }
|
|||
nohash-hasher = "0.2.0"
|
||||
anyhow = "1.0"
|
||||
flume = "0.10"
|
||||
gilrs = "0.10"
|
||||
gilrs = { version = "0.10", default_features = false, features = ["xinput"] }
|
||||
|
|
|
@ -100,7 +100,7 @@ fn update_input_state_gamepad (
|
|||
) {
|
||||
if let Some(Some(gamepad)) = active_gamepad.0.map(|id| gilrs.0.connected_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));
|
||||
let right_stick = vec2(gamepad.value(Axis::RightStickX), -gamepad.value(Axis::RightStickY));
|
||||
inputs.movement += left_stick;
|
||||
inputs.look += right_stick;
|
||||
inputs.action_a |= gamepad.is_pressed(Button::South);
|
||||
|
|
Loading…
Reference in a new issue