mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-16 06:31:26 +03:00
scrap: check hwconfig in another process
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -70,6 +70,15 @@ fn main() {
|
||||
}
|
||||
if args.is_empty() {
|
||||
std::thread::spawn(move || start_server(false));
|
||||
#[cfg(feature = "hwcodec")]
|
||||
if let Ok(exe) = std::env::current_exe() {
|
||||
std::thread::spawn(move || {
|
||||
std::process::Command::new(exe)
|
||||
.arg("--check-hwcodec-config")
|
||||
.status()
|
||||
.ok()
|
||||
});
|
||||
}
|
||||
} else {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
@@ -104,6 +113,10 @@ fn main() {
|
||||
"".to_owned()
|
||||
));
|
||||
return;
|
||||
} else if args[0] == "--check-hwcodec-config" {
|
||||
#[cfg(feature = "hwcodec")]
|
||||
ipc::check_hwcodec_config();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if args[0] == "--remove" {
|
||||
|
||||
Reference in New Issue
Block a user