Skip to content

Commit f000518

Browse files
committed
🎨 publish: refactoring & fixing gaming mode 11
1 parent a0ce695 commit f000518

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

  • crates/prunex-core/src/gaming

‎crates/prunex-core/src/gaming/mod.rs‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,8 @@ pub fn activate(cfg: &GamingModeConfig) -> ActivateReport {
362362
} else {
363363
// Build the exclude set: registered games (boosted_pids)
364364
// + every PID we've already suspended so far.
365-
let mut exclude: Vec<u32> = Vec::with_capacity(
366-
snapshot.boosted_pids.len() + snapshot.suspended_pids.len(),
367-
);
365+
let mut exclude: Vec<u32> =
366+
Vec::with_capacity(snapshot.boosted_pids.len() + snapshot.suspended_pids.len());
368367
exclude.extend(&snapshot.boosted_pids);
369368
exclude.extend(&snapshot.suspended_pids);
370369
let result = platform::flush_working_sets(&exclude);
@@ -1335,11 +1334,9 @@ mod platform {
13351334
// close on the token via the let-binding scope.
13361335
unsafe {
13371336
let mut token = HANDLE::default();
1338-
if let Err(e) = OpenProcessToken(
1339-
GetCurrentProcess(),
1340-
TOKEN_ADJUST_PRIVILEGES,
1341-
&mut token,
1342-
) {
1337+
if let Err(e) =
1338+
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &mut token)
1339+
{
13431340
return Err(format!("OpenProcessToken: {}", e));
13441341
}
13451342
let priv_name: Vec<u16> = "SeProfileSingleProcessPrivilege"

0 commit comments

Comments
 (0)