mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 14:53:48 +00:00
PowerControl: Update and expose UserProfiles that can persist per-game settings
This commit is contained in:
parent
3252e799cb
commit
2d5f8c498f
11 changed files with 436 additions and 200 deletions
|
|
@ -33,7 +33,7 @@ namespace PowerControl
|
|||
DateTime? neptuneDeviceNextKey;
|
||||
System.Windows.Forms.Timer neptuneTimer;
|
||||
|
||||
ProfilesController profilesController;
|
||||
ProfilesController? profilesController;
|
||||
|
||||
SharedData<PowerControlSetting> sharedData = SharedData<PowerControlSetting>.CreateNew();
|
||||
|
||||
|
|
@ -113,7 +113,6 @@ namespace PowerControl
|
|||
osdTimer.Enabled = true;
|
||||
|
||||
profilesController = new ProfilesController();
|
||||
profilesController.Initialize();
|
||||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuUpKey, () =>
|
||||
{
|
||||
|
|
@ -222,6 +221,10 @@ namespace PowerControl
|
|||
notifyIcon.Icon = Resources.traffic_light_outline_red;
|
||||
}
|
||||
|
||||
var watchedProfiles = profilesController?.WatchedProfiles ?? new string[0];
|
||||
if (watchedProfiles.Any())
|
||||
notifyIcon.Text += ". Profile: " + string.Join(", ", watchedProfiles);
|
||||
|
||||
updateOSD();
|
||||
}
|
||||
|
||||
|
|
@ -381,6 +384,7 @@ namespace PowerControl
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
using (profilesController) { }
|
||||
components.Dispose();
|
||||
osdClose();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue