maybe fix Empty current session not having effect after a while

This commit is contained in:
2025-03-27 11:27:01 +00:00
parent 9bc8ba0dc3
commit 774606a7b0
+2 -1
View File
@@ -2,7 +2,7 @@ use crate::{features, gui::App, util::Countdown};
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
use sysinfo::System; use sysinfo::System;
use windows::Win32::{ use windows::Win32::{
Foundation::{HANDLE, NTSTATUS}, Foundation::{CloseHandle, HANDLE, NTSTATUS},
System::Threading::{OpenProcess, PROCESS_SUSPEND_RESUME}, System::Threading::{OpenProcess, PROCESS_SUSPEND_RESUME},
}; };
@@ -58,5 +58,6 @@ pub fn activate(app: &mut App) {
pub fn deactivate(app: &mut App) { pub fn deactivate(app: &mut App) {
unsafe { unsafe {
let _ = NtResumeProcess(app.game_handle); let _ = NtResumeProcess(app.game_handle);
let _ = CloseHandle(app.game_handle);
} }
} }