mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
minimize/maximize on game open/close
This commit is contained in:
@@ -37,6 +37,7 @@ fn main() {
|
||||
req_get,
|
||||
get_bg_file,
|
||||
base64_decode,
|
||||
is_game_running,
|
||||
system_helpers::run_command,
|
||||
system_helpers::run_program,
|
||||
system_helpers::run_jar,
|
||||
@@ -91,6 +92,14 @@ fn process_watcher() {
|
||||
});
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn is_game_running() -> bool {
|
||||
// Grab the game process name
|
||||
let proc = WATCH_GAME_PROCESS.lock().unwrap().to_string();
|
||||
|
||||
return !&proc.is_empty();
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn enable_process_watcher(process: String) {
|
||||
*WATCH_GAME_PROCESS.lock().unwrap() = process;
|
||||
|
||||
Reference in New Issue
Block a user