-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrackerManager.cs
More file actions
48 lines (47 loc) · 2.08 KB
/
TrackerManager.cs
File metadata and controls
48 lines (47 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
namespace GameTaskPlugin
{
/// <summary>
/// TrackerManager — Reserved for future advanced tracking support.
///
/// CURRENT STATE:
/// GameTask currently relies entirely on Playnite's official built-in
/// tracking system (TrackingMode.ProcessName), configured in ActionManager.
/// This means playtime is recorded automatically as long as the game's
/// main executable is correctly set via ActionManager or PathManager.
///
/// WHY THIS CLASS EXISTS:
/// Some games launch through intermediate launchers or splash screens,
/// making process-name tracking unreliable. This module is reserved as
/// the integration point for more advanced strategies in the future.
///
/// FOR FUTURE CONTRIBUTORS — possible tracking approaches to explore:
///
/// 1. Child process detection:
/// Monitor child processes spawned by the main executable.
/// Useful when a launcher starts the real game as a subprocess.
/// See: System.Diagnostics.Process.GetProcessById / ManagementObjectSearcher (WMI).
///
/// 2. Window title tracking:
/// Poll for a window with a known title instead of a process name.
/// Useful when the process name is generic (e.g. "GameService.exe").
/// See: Win32 API FindWindow / EnumWindows via P/Invoke.
///
/// 3. File access monitoring:
/// Detect when a game-specific save file or config is being written,
/// as a proxy signal that the game is running.
///
/// Integration point:
/// When implemented, this class should expose Start(Game) and Stop(Game)
/// methods, called from GameTaskPlugin.OnGameStarted / OnGameStopped.
/// Playnite SDK events: OnGameStarted, OnGameStopped, OnGameStarting.
/// </summary>
public class TrackerManager
{
private readonly Logger logger;
public TrackerManager(Logger logger)
{
this.logger = logger;
logger.Log("TrackerManager loaded. Using official Playnite tracking only.");
}
}
}