Skip to content

Commit

Permalink
common: Slightly expand some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
res2k committed Jul 21, 2024
1 parent 24f2248 commit 6bd3c6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/HDR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ static Status GetDisplayHDRStatus(const DISPLAYCONFIG_MODE_INFO& mode)
if (!getColorInfo2.highDynamicRangeSupported)
return Status::Unsupported;

// Only DISPLAYCONFIG_ADVANCED_COLOR_MODE_HDR is true HDR.
return getColorInfo2.activeColorMode == DISPLAYCONFIG_ADVANCED_COLOR_MODE_HDR ? Status::On : Status::Off;
}

Expand Down Expand Up @@ -100,7 +101,9 @@ static std::optional<Status> SetDisplayHDRStatus(const DISPLAYCONFIG_MODE_INFO&
if (GetDisplayHDRStatus(mode) == Status::Unsupported)
return std::nullopt;

// Try SET_HDR_STATE first (available on Windows 11 24H2)
/* Try SET_HDR_STATE first, if available (on Windows 11 >= 24H2).
* This seems to work better with ACM enabled (in which case "advanced color" is always
* enabled and changing it doesn't do much.) */
DISPLAYCONFIG_SET_HDR_STATE setHdrState = {};
setHdrState.header.type = DISPLAYCONFIG_DEVICE_INFO_SET_HDR_STATE;
setHdrState.header.size = sizeof(setHdrState);
Expand Down

0 comments on commit 6bd3c6c

Please sign in to comment.