feat: simplify and change configuration (#279)

*breaking change*
this changes the configuration syntax, allowing for an unlimited amount of configured clients.
Also a first step towards enabling a "save config" feature.
This commit is contained in:
Ferdinand Schober
2025-03-15 18:45:19 +01:00
committed by GitHub
parent 2f6a3629ad
commit 92f652df2e
10 changed files with 226 additions and 245 deletions

View File

@@ -8,7 +8,7 @@ use std::time::{Duration, Instant};
const FREQUENCY_HZ: f64 = 1.0;
const RADIUS: f64 = 100.0;
#[derive(Args, Debug, Eq, PartialEq)]
#[derive(Args, Clone, Debug, Eq, PartialEq)]
pub struct TestEmulationArgs {
#[arg(long)]
mouse: bool,
@@ -21,7 +21,7 @@ pub struct TestEmulationArgs {
pub async fn run(config: Config, _args: TestEmulationArgs) -> Result<(), InputEmulationError> {
log::info!("running input emulation test");
let backend = config.emulation_backend.map(|b| b.into());
let backend = config.emulation_backend().map(|b| b.into());
let mut emulation = InputEmulation::new(backend).await?;
emulation.create(0).await;