From 2939aa4c43c94c540e40cf2972610476c736c478 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 24 Feb 2024 11:39:50 +0100 Subject: [PATCH] Added OLED model detection --- app/AppConfig.cs | 2 +- app/Display/ScreenControl.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 2e161389..4795a636 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -391,7 +391,7 @@ public static class AppConfig public static bool IsOLED() { - return ContainsModel("OLED") || IsSlash() || ContainsModel("GA402RK"); + return ContainsModel("OLED") || IsSlash() || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("K360") || ContainsModel("X150"); } public static bool IsStrix() diff --git a/app/Display/ScreenControl.cs b/app/Display/ScreenControl.cs index 148f31cb..4220f4a4 100644 --- a/app/Display/ScreenControl.cs +++ b/app/Display/ScreenControl.cs @@ -47,9 +47,9 @@ namespace GHelper.Display } } - public void SetGamma(int brightness = 100, int contrast = 100) + public void SetGamma(int brightness = 100) { - var bright = (float)(brightness) / 100; + var bright = Math.Round((float)brightness / 200 + 0.5, 2); var screenName = ScreenNative.FindLaptopScreen(); if (screenName is null) return;