Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional virtual gamepad creation #15

Open
github-actions bot opened this issue Aug 21, 2021 · 0 comments
Open

Conditional virtual gamepad creation #15

github-actions bot opened this issue Aug 21, 2021 · 0 comments

Comments

@github-actions
Copy link

Only create if option is enabled

Line: 49

gyromouse//src/engine.rs

Lines 46 to 56 in 19c6b3b

gyro: Gyro::new(&settings, calibration),
settings,
#[cfg(feature = "vgamepad")]
// TODO: Conditional virtual gamepad creation
// Only create if option is enabled
gamepad: virtual_gamepad::new(virtual_gamepad::GamepadType::DS4)
.map(|vg| -> Box<dyn virtual_gamepad::Backend> { Box::new(vg) })
.map_err(|e| {
eprintln!("Error initializing the virtual gamepad: {}", e);
e
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants