Skip to content

Commit

Permalink
add fixes that were (for some reason) not pushed from computer
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover committed May 16, 2024
1 parent 53a0f2f commit 18a2a61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ fn keyboard(enigo: &mut Enigo, rng: &mut rand::rngs::ThreadRng) {
}
}

#[cfg(feature = "advanced")]
fn gamepad(gamepad: &mut GamepadInjector, rng: &mut rand::rngs::ThreadRng) {
let lists: Vec<(Vec<(&str, usize)>, usize)> = vec![
(GAMEPAD_BUTTONS.to_vec(), 5),
Expand Down
10 changes: 6 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ async fn main() {
let mut gamepad = GamepadInjector::new();

#[cfg(feature = "advanced")]
loop {
main_logic_adv(&options, &mut tts, &mut enigo).await;
{
loop {
main_logic_adv(&options, &mut tts, &mut enigo, &mut gamepad).await;
}
}
#[not(cfg(feature = "advanced"))]
#[allow(unreachable_code)]
loop {
main_logic(&options, &mut tts, &mut enigo, &mut gamepad).await;
main_logic(&options, &mut tts, &mut enigo).await;
}
}

0 comments on commit 18a2a61

Please sign in to comment.