Move the incompatible backend warning

This commit is contained in:
Federico Terzi 2020-03-08 20:17:47 +01:00
parent 43a82872d3
commit 69001c6546
2 changed files with 5 additions and 1 deletions

View File

@ -326,6 +326,11 @@ impl ConfigSet {
let default_file = config_dir.join(DEFAULT_CONFIG_FILE_NAME);
let default = Configs::load_config(default_file.as_path())?;
// Check that a compatible backend is used, otherwise warn the user
if cfg!(not(target_os = "linux")) && default.backend == BackendType::Auto {
eprintln!("Warning: Using Auto backend is only supported on Linux, falling back to Inject backend.");
}
// Analyze which config files has to be loaded
let mut target_files = Vec::new();

View File

@ -200,7 +200,6 @@ impl <'a, S: KeyboardManager, C: ClipboardManager, M: ConfigManager<'a>, U: UIMa
&BackendType::Clipboard
}
}else{
warn!("Using Auto backend is only supported on Linux, falling back to Inject backend.");
&BackendType::Inject
}
}else{