feat(app): game detection for the performance stages
- while the services run the app looks at the foreground window every 2 s (Windows): the person's notGames and games lists first, never a browser, video player, the desktop, Discord, a launcher's own window or this app; a program under a Steam, Epic, Riot or Battle.net game folder, exclusive full screen, or a window covering a monitor without title bar or border whose process uses at least 10% of the GPU's 3D engine (the M0 rule) is a game - game mode stays until that game's process ends, also behind other windows; the dashboard shows "게임 모드: 켜짐 (name, reason)" and the game log tab its changes - a 게임 모드 settings screen (detection on/off, the two lists) - checked on the win-ci VM: a program in a Steam game folder turned it on after 1.4 s and off 2.0 s after it ended Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -274,7 +274,8 @@ impl Controller {
|
||||
view["error"] = json!(error);
|
||||
view["system"] = json!(self.system().await);
|
||||
view["llm"] = self.host.llm();
|
||||
view["performance"] = Value::Null; // game detection comes in M7
|
||||
view["game"] = status.get("game").cloned().unwrap_or(Value::Null);
|
||||
view["performance"] = Value::Null; // the performance stages come next in M7
|
||||
view
|
||||
}
|
||||
|
||||
@@ -362,6 +363,7 @@ impl Running for crate::services::Services {
|
||||
.map(|(id, name)| json!({"id": id.to_string(), "name": name})).collect::<Vec<_>>(),
|
||||
"missed": crate::dashboard::missed_view(&missed, now),
|
||||
"browser": self.browser.view(),
|
||||
"game": self.game.view(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user