Improved HDR detection

This commit is contained in:
Serge
2024-03-27 23:56:13 +01:00
parent 66a1774d78
commit c77a87f435

View File

@@ -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;
}
}