[fix] some vconfig not applied -> stable release

This commit is contained in:
Purp1e
2025-03-27 18:02:51 +08:00
parent 7ec20984c4
commit faec03afb1
3 changed files with 17 additions and 16 deletions

View File

@@ -480,7 +480,7 @@ pub fn set_cs2_video(file_path: &str, data: VideoConfig) -> Result<()> {
let file_content = fs::read_to_string(file_path)?;
// 定义正则表达式匹配模式
let re = Regex::new(r#""(setting\.\w+)"\s+"\d+""#).unwrap();
let re = Regex::new(r#""(setting\.\w+)"\s+"-?\d+""#).unwrap();
// 替换字段值
let updated_content = re.replace_all(&file_content, |caps: &regex::Captures| {