Skip to content

Commit 888f1ca

Browse files
committed
Amd Oled Saver check UI tweaks #4977
1 parent d2d98ee commit 888f1ca

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

app/Display/AmdDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Microsoft.Win32;
22
using Ryzen;
3+
using System.Diagnostics;
34

45
namespace GHelper.Display
56
{
@@ -12,7 +13,6 @@ public static class AmdDisplay
1213

1314
public static bool IsOledPowerOptimizationOnBattery()
1415
{
15-
1616
if (!AppConfig.IsOLED()) return false;
1717
//if (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Offline) return false;
1818
if (!RyzenControl.IsAMD()) return false;

app/Display/VisualControl.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ public static void SetGamut(int mode = -1)
272272

273273
public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int whiteBalance = DefaultColorTemp, bool init = false)
274274
{
275+
Task.Run(async () =>
276+
{
277+
if (AmdDisplay.IsOledPowerOptimizationOnBattery()) Program.settingsForm.VisualiseAmdOled(true);
278+
});
279+
275280
if (mode == SplendidCommand.None) return;
276281
if ((mode == SplendidCommand.Default || mode == SplendidCommand.VivoNormal) && whiteBalance == DefaultColorTemp && init) return; // Skip default setting on init
277282
if (mode == SplendidCommand.Disabled && !RyzenControl.IsAMD() && init) return; // Skip disabled setting for Intel devices

app/Settings.cs

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

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

157156
buttonSilent.Click += ButtonSilent_Click;

0 commit comments

Comments
 (0)