diff --git a/src/device.rs b/src/device.rs index e3cca6a..2618e49 100644 --- a/src/device.rs +++ b/src/device.rs @@ -50,7 +50,7 @@ pub fn output_device() -> Result> { Ok(device) } -pub fn input_devices(device_opts: &Vec) -> Result, Box> { +pub fn input_devices(device_opts: &Vec, ignore_opts: &Vec) -> Result, Box> { let mut path_devices = list_devices()?; let mut paths: Vec = path_devices.keys().map(|e| e.clone()).collect(); paths.sort_by(|a, b| device_index(a).partial_cmp(&device_index(b)).unwrap()); @@ -65,22 +65,30 @@ pub fn input_devices(device_opts: &Vec) -> Result, Box abort(&format!("Failed to load config '{}': {}", filename, e)), }; - let input_devices = match input_devices(&args.opt_strs("device")) { + let input_devices = match input_devices(&args.opt_strs("device"), &args.opt_strs("ignore")) { Ok(input_devices) => input_devices, Err(e) => abort(&format!("Failed to prepare input devices: {}", e)), };