Skip to content

Commit d2d98ee

Browse files
committed
Amd Oled Saver check UI tweaks #4977
1 parent 6ba27a2 commit d2d98ee

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

app/Display/AmdDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static bool IsOledPowerOptimizationOnBattery()
1414
{
1515

1616
if (!AppConfig.IsOLED()) return false;
17-
if (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Offline) return false;
17+
//if (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Offline) return false;
1818
if (!RyzenControl.IsAMD()) return false;
1919

2020
try

app/Display/VisualControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ private static int RunSplendid(SplendidCommand command, int? param1 = null, int?
371371
{
372372
Logger.WriteLine("Skipping command due to AMD OLED Power Optimization flag");
373373
Program.settingsForm.VisualiseAmdOled(true);
374-
return 1;
374+
return 0;
375375
}
376376

377377
if (isSplenddid)

app/Settings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public SettingsForm()
151151

152152
buttonAmdOled.BackColor = colorTurbo;
153153
buttonAmdOled.ForeColor = SystemColors.ControlLightLight;
154+
buttonAmdOled.Visible = AmdDisplay.IsOledPowerOptimizationOnBattery();
154155
buttonAmdOled.Click += ButtonAmdOled_Click;
155156

156157
buttonSilent.Click += ButtonSilent_Click;
@@ -298,6 +299,7 @@ public SettingsForm()
298299
private void ButtonAmdOled_Click(object? sender, EventArgs e)
299300
{
300301
ProcessHelper.RunCMD(@"C:\Program Files\AMD\CNext\CNext\RadeonSoftware.exe","");
302+
activateCheck = true;
301303
}
302304

303305
private void LabelBattery_Click(object? sender, EventArgs e)
@@ -621,6 +623,7 @@ private void SettingsForm_Focused(object? sender, EventArgs e)
621623
if (activateCheck)
622624
{
623625
buttonEnergySaver.Visible = PowerNative.GetBatterySaverStatus();
626+
buttonAmdOled.Visible = AmdDisplay.IsOledPowerOptimizationOnBattery();
624627
activateCheck = false;
625628
}
626629
}

0 commit comments

Comments
 (0)