Reset resolution to default as it will pick highest refresh rate

Make Resolution change to be experimental features
This commit is contained in:
Kamil Trzciński 2022-11-18 16:15:34 +01:00
parent c89a59ab0b
commit e5fd135b30
7 changed files with 47 additions and 7 deletions

View file

@ -4,6 +4,9 @@
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PowerControl.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PowerControl.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<PowerControl.Settings>
@ -19,12 +22,19 @@
<setting name="MenuRightKey" serializeAs="String">
<value>Ctrl+Win+Numpad6</value>
</setting>
</PowerControl.Settings>
</applicationSettings>
<userSettings>
<PowerControl.Settings>
<setting name="EnableNeptuneController" serializeAs="String">
<value>True</value>
</setting>
<setting name="EnableVolumeControls" serializeAs="String">
<value>True</value>
</setting>
<setting name="EnableExperimentalFeatures" serializeAs="String">
<value>False</value>
</setting>
</PowerControl.Settings>
</applicationSettings>
</userSettings>
</configuration>

View file

@ -147,7 +147,7 @@ namespace PowerControl
}
}
if (ActiveOption == null)
if (ActiveOption == null && Options.Count > 0)
ActiveOption = Options.First();
onUpdateToolStrip();

View file

@ -54,6 +54,11 @@ namespace PowerControl
{
Name = "Resolution",
ApplyDelay = 1000,
ResetValue = () => {
if (!Settings.Default.EnableExperimentalFeatures)
return null;
return Helpers.PhysicalMonitorBrightnessController.GetAllResolutions().Last();
},
OptionsValues = delegate()
{
var resolutions = Helpers.PhysicalMonitorBrightnessController.GetAllResolutions();
@ -63,6 +68,8 @@ namespace PowerControl
},
CurrentValue = delegate()
{
if (!Settings.Default.EnableExperimentalFeatures)
return null;
return Helpers.PhysicalMonitorBrightnessController.GetResolution();
},
ApplyValue = delegate(object selected)

View file

@ -59,22 +59,40 @@ namespace PowerControl {
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool EnableNeptuneController {
get {
return ((bool)(this["EnableNeptuneController"]));
}
set {
this["EnableNeptuneController"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool EnableVolumeControls {
get {
return ((bool)(this["EnableVolumeControls"]));
}
set {
this["EnableVolumeControls"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool EnableExperimentalFeatures {
get {
return ((bool)(this["EnableExperimentalFeatures"]));
}
set {
this["EnableExperimentalFeatures"] = value;
}
}
}
}

View file

@ -14,11 +14,14 @@
<Setting Name="MenuRightKey" Type="System.String" Scope="Application">
<Value Profile="(Default)">Ctrl+Win+Numpad6</Value>
</Setting>
<Setting Name="EnableNeptuneController" Type="System.Boolean" Scope="Application">
<Setting Name="EnableNeptuneController" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="EnableVolumeControls" Type="System.Boolean" Scope="Application">
<Setting Name="EnableVolumeControls" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="EnableExperimentalFeatures" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -83,11 +83,12 @@ and provides an easily accessible controls.
Uninstall MSI Afterburner and any other OSD software.
There are currently 4 configurable settings:
There are currently configurable settings:
- Volume
- Brightness
- Refresh Rate
- Resolution (requires enabling `EnableExperimentalFeatures` in `appconfig`)
- FPS Limit (requires: RTSS > Setup > Enable Framelimit)
- TDP
- SMT (Each core of AMD has 2 threads, this allows to enable/disable second threads)

View file

@ -15,5 +15,6 @@
- Press `3 dots + L4 + R4 + L5 + R5` to reset (TDP, Refresh Rate, FPS limit) to default
- Allow to disable SMT (second threads of each physical cores)
- Fix PowerControl crash on startup (introduced with SMT)
- Allow to change resolution (Experimental feature)
If you found it useful buy me [Ko-fi](https://ko-fi.com/ayufan).