[fix] fast launch from tray not working

This commit is contained in:
Purp1e
2025-03-28 13:22:26 +08:00
parent dbedf25f0c
commit 1d23c29ba8
3 changed files with 16 additions and 8 deletions

View File

@@ -16,7 +16,14 @@ pub fn greet(name: &str) -> Result<String, String> {
#[tauri::command]
pub fn launch_game(steam_path: &str, launch_option: &str, server: &str) -> Result<String, String> {
wrap_err!(steam::launch_game(steam_path, launch_option, server));
println!("{}: launching game on server: {}, with launch Option {}", steam_path, server, launch_option);
// wrap_err!(steam::launch_game(steam_path, launch_option, server));
// 如果有错误,打印出来
if let Err(e) = steam::launch_game(steam_path, launch_option, server) {
println!("Error: {}", e);
return Err(e.to_string());
}
// steam::launch_game(steam_path, launch_option, server);
Ok(format!(
"Launching game on server: {}, with launch Option {}",