Skip to content

Commit

Permalink
--option
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed Jul 28, 2023
1 parent ef097c7 commit 1de50e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,19 @@ pub fn core_main() -> Option<Vec<String>> {
}
}
return None;
} else if args[0] == "--option" {
if crate::platform::is_installed()
&& crate::platform::check_super_user_permission().unwrap_or_default()
{
if args.len() == 2 {
let options = crate::ipc::get_options();
my_println!("{}", options.get(&args[1]).unwrap_or(&"".to_owned()));
} else if args.len() == 3 {
crate::ipc::set_option(&args[1], &args[2]);
}
} else {
my_println!("Installation and administrative privileges required!");
}
} else if args[0] == "--check-hwcodec-config" {
#[cfg(feature = "hwcodec")]
scrap::hwcodec::check_config();
Expand Down

0 comments on commit 1de50e8

Please sign in to comment.