diff --git a/app/Display/ScreenControl.cs b/app/Display/ScreenControl.cs index 5043f056..29fa2f31 100644 --- a/app/Display/ScreenControl.cs +++ b/app/Display/ScreenControl.cs @@ -6,7 +6,7 @@ public class ScreenControl { public const int MAX_REFRESH = 1000; - + public static int MIN_RATE = AppConfig.Get("min_rate", 60); public void AutoScreen(bool force = false) { @@ -15,7 +15,7 @@ public void AutoScreen(bool force = false) if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online) SetScreen(MAX_REFRESH, 1); else - SetScreen(60, 0); + SetScreen(MIN_RATE, 0); } else { @@ -29,7 +29,7 @@ public void ToggleScreenRate() var refreshRate = ScreenNative.GetRefreshRate(laptopScreen); if (refreshRate < 0) return; - ScreenNative.SetRefreshRate(laptopScreen, refreshRate > 60 ? 60 : ScreenNative.GetMaxRefreshRate(laptopScreen)); + ScreenNative.SetRefreshRate(laptopScreen, refreshRate > MIN_RATE ? MIN_RATE : ScreenNative.GetMaxRefreshRate(laptopScreen)); InitScreen(); } diff --git a/app/Settings.cs b/app/Settings.cs index 2a93d067..79beb708 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -850,7 +850,7 @@ private void Button120Hz_MouseHover(object? sender, EventArgs e) private void Button60Hz_MouseHover(object? sender, EventArgs e) { - labelTipScreen.Text = Properties.Strings.MinRefreshTooltip; + labelTipScreen.Text = Properties.Strings.MinRefreshTooltip.Replace("60", ScreenControl.MIN_RATE.ToString()); } private void ButtonScreen_MouseLeave(object? sender, EventArgs e) @@ -860,7 +860,7 @@ private void ButtonScreen_MouseLeave(object? sender, EventArgs e) private void ButtonScreenAuto_MouseHover(object? sender, EventArgs e) { - labelTipScreen.Text = Properties.Strings.AutoRefreshTooltip; + labelTipScreen.Text = Properties.Strings.AutoRefreshTooltip.Replace("60", ScreenControl.MIN_RATE.ToString()); } private void ButtonUltimate_MouseHover(object? sender, EventArgs e) @@ -1215,7 +1215,7 @@ private void Button120Hz_Click(object? sender, EventArgs e) private void Button60Hz_Click(object? sender, EventArgs e) { AppConfig.Set("screen_auto", 0); - screenControl.SetScreen(60, 0); + screenControl.SetScreen(ScreenControl.MIN_RATE, 0); } @@ -1246,16 +1246,18 @@ public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, { buttonScreenAuto.Activated = true; } - else if (frequency == 60) + else if (frequency == ScreenControl.MIN_RATE) { button60Hz.Activated = true; } - else if (frequency > 60) + else if (frequency > ScreenControl.MIN_RATE) { button120Hz.Activated = true; } - if (maxFrequency > 60) + button60Hz.Text = ScreenControl.MIN_RATE + "Hz"; + + if (maxFrequency > ScreenControl.MIN_RATE) { button120Hz.Text = maxFrequency.ToString() + "Hz" + (overdriveSetting ? " + OD" : ""); panelScreen.Visible = true;