Disable Visual Modes when HDR is acrtive https://github.com/seerge/g-helper/issues/2301

This commit is contained in:
Serge
2024-03-26 22:24:28 +01:00
parent 0960a8db2b
commit e082932e1d
4 changed files with 363 additions and 284 deletions

View File

@@ -46,8 +46,11 @@ namespace GHelper.Display
if (overdrive >= 0) if (overdrive >= 0)
{ {
if (AppConfig.IsNoOverdrive()) overdrive = 0; if (AppConfig.IsNoOverdrive()) overdrive = 0;
if (!AppConfig.IsOLED()) Program.acpi.DeviceSet(AsusACPI.ScreenOverdrive, overdrive, "ScreenOverdrive"); if (!AppConfig.IsOLED() && overdrive != Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive))
{
Program.acpi.DeviceSet(AsusACPI.ScreenOverdrive, overdrive, "ScreenOverdrive");
}
} }
if (miniled >= 0) if (miniled >= 0)
@@ -112,9 +115,10 @@ namespace GHelper.Display
{ {
Logger.WriteLine($"Miniled: {miniled1} {miniled2}"); Logger.WriteLine($"Miniled: {miniled1} {miniled2}");
AppConfig.Set("miniled", miniled); AppConfig.Set("miniled", miniled);
hdr = ScreenCCD.GetHDRStatus();
} }
hdr = ScreenCCD.GetHDRStatus();
bool screenEnabled = (frequency >= 0); bool screenEnabled = (frequency >= 0);
AppConfig.Set("frequency", frequency); AppConfig.Set("frequency", frequency);

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly> <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.162</AssemblyVersion> <AssemblyVersion>0.163</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

634
app/Settings.Designer.cs generated

File diff suppressed because it is too large Load Diff

View File

@@ -1203,6 +1203,9 @@ namespace GHelper
buttonMiniled.Visible = false; buttonMiniled.Visible = false;
} }
tableVisual.Visible = !hdr;
labelVisual.Visible = hdr;
} }
private void ButtonQuit_Click(object? sender, EventArgs e) private void ButtonQuit_Click(object? sender, EventArgs e)