From c77a87f435d7e1e3db8152205526b8b913779c42 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Wed, 27 Mar 2024 23:56:13 +0100 Subject: [PATCH] Improved HDR detection --- app/Display/ScreenCCD.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Display/ScreenCCD.cs b/app/Display/ScreenCCD.cs index f1ab8e82..7535e989 100644 --- a/app/Display/ScreenCCD.cs +++ b/app/Display/ScreenCCD.cs @@ -6,7 +6,7 @@ namespace GHelper.Display public class ScreenCCD { - public static bool GetHDRStatus(bool log = false) + public static bool GetHDRStatus(bool log = true) { var err = GetDisplayConfigBufferSizes(QDC.QDC_ONLY_ACTIVE_PATHS, out var pathCount, out var modeCount); if (err != 0) @@ -46,8 +46,8 @@ namespace GHelper.Display info.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED || info.monitorFriendlyDeviceName == internalName) { - if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled); - return colorInfo.advancedColorEnabled; + if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled + " " + colorInfo.bitsPerColorChannel + " " + colorInfo.value + " " + colorInfo.wideColorEnforced); + return colorInfo.advancedColorEnabled && colorInfo.bitsPerColorChannel > 8; } }