Skip to content

Commit

Permalink
make use features and fix some things
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover authored May 15, 2024
1 parent b8b351e commit 7a018ac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- run: cargo clippy
- run: cargo clippy --features advanced,invisibility
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ impl Default for Basic {
#[allow(dead_code)]
use_controller: false,
#[allow(dead_code)]
use_pen: false,
#[allow(dead_code)]
use_touch: false,
#[allow(dead_code)]
do_screenshots: true,
#[allow(dead_code)]
do_tts: true,
Expand Down
2 changes: 1 addition & 1 deletion src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub async fn main_logic(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut En
WeightedIndex::new(options.iter().map(|item| item.1)).unwrap();
match options[index.sample(&mut rng)].0 {
"keyboard" => keyboard(enigo, &mut rng),
"gamepad" => gamepad(gamepadobj.unwrap(), &mut rng),
"gamepad" => gamepad(&mut gamepadobj.unwrap(), &mut rng),
"mouse" => mouse(enigo, &mut rng),
"quote" => quote(tts, &mut rng),
"screenshot" => screenshot(tts),
Expand Down
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ mod config;
mod func;
mod lists;
mod model;
use ansi_term::Color;
use std::fs::*;
use enigo::*;
use config::*;
Expand All @@ -16,7 +15,7 @@ use tts::*;
async fn main() {
let options: Vec<(&str, usize)> = get_options(get_config().await).await;

println!("\n Starting Jerry...");
println!("\nStarting Jerry...");
println!("Jerry has been started!\n");

if metadata("screenshots").is_err() {
Expand Down
2 changes: 2 additions & 0 deletions src/model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#[cfg(feature = "advanced")]

use windows::Gaming::Input::GamepadButtons;
use windows::UI::Input::Preview::Injection::InjectedInputGamepadInfo;
use windows::UI::Input::Preview::Injection::InputInjector;
Expand Down

0 comments on commit 7a018ac

Please sign in to comment.