diff --git a/ColorControl.UI/Components/Pages/Nvidia/NvidiaDriverSettings.razor b/ColorControl.UI/Components/Pages/Nvidia/NvidiaDriverSettings.razor index 9f96b61..4b6f486 100644 --- a/ColorControl.UI/Components/Pages/Nvidia/NvidiaDriverSettings.razor +++ b/ColorControl.UI/Components/Pages/Nvidia/NvidiaDriverSettings.razor @@ -150,13 +150,10 @@ protected async Task LoadDriverSettings() { - if (DriverSettings == null) + DriverSettings = await _rpcClientService.CallAsync>("NvService", "GetDriverSettings", CurrentProfileName); + if (DriverSettings != null) { - DriverSettings = await _rpcClientService.CallAsync>("NvService", "GetDriverSettings", CurrentProfileName); - if (DriverSettings != null) - { - DriverSettings.ForEach(s => s.ValueChanged = false); - } + DriverSettings.ForEach(s => s.ValueChanged = false); } if (DriverSettings != null) diff --git a/Shared/Contracts/NVIDIA/NvHdrSettings.cs b/Shared/Contracts/NVIDIA/NvHdrSettings.cs index 373ab08..23bf8fb 100644 --- a/Shared/Contracts/NVIDIA/NvHdrSettings.cs +++ b/Shared/Contracts/NVIDIA/NvHdrSettings.cs @@ -1,11 +1,14 @@ -using System.Text.Json.Serialization; +using System.ComponentModel; +using System.Text.Json.Serialization; namespace ColorControl.Shared.Contracts.NVIDIA { public enum NvOutputMode { Default = 0, + [Description("HDR10")] Hdr10 = 1, + [Description("HDR10+")] Hdr10Plus = 2 } diff --git a/Shared/Contracts/NVIDIA/NvPreset.cs b/Shared/Contracts/NVIDIA/NvPreset.cs index d59715d..e4d5074 100644 --- a/Shared/Contracts/NVIDIA/NvPreset.cs +++ b/Shared/Contracts/NVIDIA/NvPreset.cs @@ -142,7 +142,7 @@ namespace ColorControl.Shared.Contracts.NVIDIA applyColorData = keepChanges && applyColorData || colorData.IsDifferent(currentSettings.colorData); applyDithering = keepChanges && applyDithering || (ditheringEnabled != currentSettings.ditheringEnabled || ditheringMode != currentSettings.ditheringMode || ditheringBits != currentSettings.ditheringBits); - applyHDR = keepChanges && applyHDR || (HDREnabled != currentSettings.HDREnabled || toggleHDR || SDRBrightness != currentSettings.SDRBrightness); + applyHDR = keepChanges && applyHDR || (HDREnabled != currentSettings.HDREnabled || toggleHDR || SDRBrightness != currentSettings.SDRBrightness || HdrSettings.OutputMode != currentSettings.HdrSettings.OutputMode); DisplayConfig.ApplyResolution = keepChanges && DisplayConfig.ApplyResolution || (DisplayConfig.Resolution.IsDifferent(currentSettings.DisplayConfig.Resolution) || DisplayConfig.Scaling != currentSettings.DisplayConfig.Scaling || DisplayConfig.Rotation != currentSettings.DisplayConfig.Rotation || DisplayConfig.IsPrimary != null && DisplayConfig.IsPrimary != currentSettings.DisplayConfig.IsPrimary); DisplayConfig.ApplyRefreshRate = keepChanges && DisplayConfig.ApplyRefreshRate || !DisplayConfig.RefreshRate.Equals(currentSettings.DisplayConfig.RefreshRate);