ensure game isn't suspended when we close
This commit is contained in:
@@ -58,7 +58,9 @@ pub fn activate(app: &mut App) {
|
||||
|
||||
pub fn deactivate(app: &mut App) {
|
||||
unsafe {
|
||||
if !app.game_handle.is_invalid() {
|
||||
let _ = NtResumeProcess(app.game_handle);
|
||||
let _ = CloseHandle(app.game_handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,6 +340,8 @@ impl Drop for App {
|
||||
let mut config_file = File::create(config_path).unwrap();
|
||||
let json = serde_json::to_string_pretty(&persistent_state).unwrap();
|
||||
config_file.write_all(json.as_bytes()).unwrap();
|
||||
//
|
||||
features::empty_session::deactivate(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user