Skip to content

Commit 6ba27a2

Browse files
committed
AMD Oled Power Optimization notification #4977 #5048
1 parent a21a271 commit 6ba27a2

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

app/Display/VisualControl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ private static int RunSplendid(SplendidCommand command, int? param1 = null, int?
370370
if (AmdDisplay.IsOledPowerOptimizationOnBattery())
371371
{
372372
Logger.WriteLine("Skipping command due to AMD OLED Power Optimization flag");
373+
Program.settingsForm.VisualiseAmdOled(true);
373374
return 1;
374375
}
375376

app/Settings.Designer.cs

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Settings.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ public SettingsForm()
149149
buttonEnergySaver.ForeColor = SystemColors.ControlLightLight;
150150
buttonEnergySaver.Click += ButtonEnergySaver_Click;
151151

152+
buttonAmdOled.BackColor = colorTurbo;
153+
buttonAmdOled.ForeColor = SystemColors.ControlLightLight;
154+
buttonAmdOled.Click += ButtonAmdOled_Click;
155+
152156
buttonSilent.Click += ButtonSilent_Click;
153157
buttonBalanced.Click += ButtonBalanced_Click;
154158
buttonTurbo.Click += ButtonTurbo_Click;
@@ -291,6 +295,11 @@ public SettingsForm()
291295
InitVisual();
292296
}
293297

298+
private void ButtonAmdOled_Click(object? sender, EventArgs e)
299+
{
300+
ProcessHelper.RunCMD(@"C:\Program Files\AMD\CNext\CNext\RadeonSoftware.exe","");
301+
}
302+
294303
private void LabelBattery_Click(object? sender, EventArgs e)
295304
{
296305
HardwareControl.chargeWatt = !HardwareControl.chargeWatt;
@@ -495,6 +504,14 @@ public void VisualiseBrightness()
495504
});
496505
}
497506

507+
public void VisualiseAmdOled(bool status = false)
508+
{
509+
Invoke(delegate
510+
{
511+
buttonAmdOled.Visible = status;
512+
});
513+
}
514+
498515
public void VisualiseDisabled()
499516
{
500517
comboGamut.Enabled = comboColorTemp.Enabled = (SplendidCommand)AppConfig.Get("visual") != SplendidCommand.Disabled;

0 commit comments

Comments
 (0)