PowerControl: Expose all settings and apply them in order

Since some settings impact others, the application will
apply them in a correct order with a fixed delay.

This additionally exposes all settings, just some of them
are not persisted on create, only on change.
This commit is contained in:
Kamil Trzciński 2023-01-10 11:12:31 +01:00
parent 12de2267bf
commit 2ff2864f23
11 changed files with 115 additions and 32 deletions

View file

@ -33,12 +33,20 @@ namespace PowerControl.Options
{
var selectedResolution = new DisplayResolutionController.DisplayResolution(selected);
DisplayResolutionController.SetResolution(selectedResolution);
return DisplayResolutionController.GetResolution().ToString();
},
Impacts =
{
RefreshRate.Instance,
FPSLimit.Instance
},
AfterApply = () =>
{
// force refresh Refresh Rate
RefreshRate.Instance.Update();
// force reset and refresh of FPS limit
FPSLimit.Instance.Reset();
FPSLimit.Instance.Update();
return DisplayResolutionController.GetResolution().ToString();
}
};
}