Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover committed May 16, 2024
1 parent f06a6e9 commit 483f9cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ pub async fn main_logic(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut En
}

#[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 Expand Up @@ -287,6 +286,7 @@ pub async fn main_logic(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut En
gamepad.inject();
}

#[cfg(feature = "advanced")]
fn pen(pen: &mut PenInjector, rng: &mut rand::rngs::ThreadRng) {
let lists: Vec<(Vec<(&str, usize)>, usize)> = vec![
(PEN_BUTTONS.to_vec(), 5),
Expand Down Expand Up @@ -328,6 +328,7 @@ pub async fn main_logic(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut En
pen.inject();
}

#[cfg(feature = "advanced")]
pub async fn main_logic_adv(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut Enigo, gamepadobj: &mut GamepadInjector, penobj: &mut PenInjector) {
let mut rng: rand::prelude::ThreadRng = thread_rng();

Expand All @@ -347,5 +348,4 @@ pub async fn main_logic_adv(options: &[(&str, usize)], tts: &mut Tts, enigo: &mu
}

sleep(Duration::from_millis(1500)).await;
}
}
4 changes: 2 additions & 2 deletions src/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ pub static PEN_BUTTONS: [(&str, usize); 3] = [
];

#[allow(dead_code)]
pub static PEN_MOVE: [(&str, usize); 2] = [
pub static PEN_MOVE: [(&str, usize); 3] = [
("XY_Move", 2),
("X_Move", 1),
("Y_Move", 1)
];

#[allow(dead_code)]
pub static PEN_SPECIAL: [(&str, usize); 4] = [
pub static PEN_SPECIAL: [(&str, usize); 3] = [
("Pressure", 1),
("Tilt", 1),
("Rotation", 1)
Expand Down

0 comments on commit 483f9cc

Please sign in to comment.