clear hwcodec config rather than remove

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-07-16 09:59:46 +08:00
parent 314d7f4387
commit ec34470284
2 changed files with 5 additions and 8 deletions

View File

@@ -81,10 +81,7 @@ const CHARS: &[char] = &[
'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
];
pub const RENDEZVOUS_SERVERS: &[&str] = &[
"rs-ny.rustdesk.com",
"rs-sg.rustdesk.com",
];
pub const RENDEZVOUS_SERVERS: &[&str] = &["rs-ny.rustdesk.com", "rs-sg.rustdesk.com"];
pub const RS_PUB_KEY: &str = match option_env!("RS_PUB_KEY") {
Some(key) if !key.is_empty() => key,
@@ -1350,8 +1347,8 @@ impl HwCodecConfig {
Config::store_(self, "_hwcodec");
}
pub fn remove() {
std::fs::remove_file(Config::file_("_hwcodec")).ok();
pub fn clear() {
HwCodecConfig::default().store();
}
/// refresh current global HW_CODEC_CONFIG, usually uesd after HwCodecConfig::remove()