ensure game isn't suspended when we close

This commit is contained in:
2025-04-08 09:24:01 +01:00
parent e84d1347fd
commit 99bc15b5ed
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -58,7 +58,9 @@ pub fn activate(app: &mut App) {
pub fn deactivate(app: &mut App) {
unsafe {
let _ = NtResumeProcess(app.game_handle);
let _ = CloseHandle(app.game_handle);
if !app.game_handle.is_invalid() {
let _ = NtResumeProcess(app.game_handle);
let _ = CloseHandle(app.game_handle);
}
}
}