PowerControl: Update and expose UserProfiles that can persist per-game settings

This commit is contained in:
Kamil Trzciński 2023-01-05 23:35:31 +01:00
parent 3252e799cb
commit 2d5f8c498f
11 changed files with 436 additions and 200 deletions

View file

@ -5,6 +5,7 @@ namespace PowerControl.Menu
public IList<string> Options { get; set; } = new List<string>();
public string? SelectedOption { get; private set; }
public string? ActiveOption { get; set; }
public string? ProfileOption { get; set; }
public int ApplyDelay { get; set; }
public bool CycleOptions { get; set; } = true;
public string? PersistentKey;
@ -175,6 +176,14 @@ namespace PowerControl.Menu
if (SelectedOption != null && ActiveOption != SelectedOption)
output += " (active: " + optionText(ActiveOption) + ")";
if (ProfileOption != null)
{
if (ProfileOption != ActiveOption && ProfileOption != SelectedOption)
output += " (profile: " + optionText(ProfileOption) + ")";
else
output += " [P]";
}
return output;
}