[fix] function call

This commit is contained in:
Purp1e
2025-03-13 00:25:09 +08:00
parent c4100120a4
commit d7234ddae9
10 changed files with 758 additions and 376 deletions

View File

@@ -46,7 +46,6 @@ fn main() {
.plugin(tauri_plugin_dialog::init())
// .plugin(tauri_plugin_store::Builder::default().build())
// .plugin(tauri_plugin_updater::Builder::new().build())
.invoke_handler(tauri::generate_handler![on_button_clicked])
.setup(|app| {
// Tray
#[cfg(all(desktop))]

View File

@@ -12,6 +12,14 @@ pub fn launch_game(
launch_option: &str,
server: &str,
) -> Result<(), Box<dyn Error>> {
// 判断路径是否存在
if !std::path::Path::new("/etc/hosts").exists() {
return Err(Box::new(std::io::Error::new(
std::io::ErrorKind::NotFound,
"Steam path not found",
)));
}
let mut opt = launch_option.replace("\n", " ");
if server == "perfectworld" {