mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 09:11:28 +10:00
feat(process manager): Game kill tauri command
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -17,3 +17,13 @@ pub fn launch_game(
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn kill_game(
|
||||
game_id: String,
|
||||
state: tauri::State<'_, Mutex<AppState>>,
|
||||
) -> Result<(), String> {
|
||||
let state_lock = state.lock().unwrap();
|
||||
let mut process_manager_lock = state_lock.process_manager.lock().unwrap();
|
||||
process_manager_lock.terminate_child(game_id).map_err(|x| x.to_string())
|
||||
}
|
||||
Reference in New Issue
Block a user