Skip to content

Commit

Permalink
Small improvements in UWP code
Browse files Browse the repository at this point in the history
  • Loading branch information
thexai committed Jan 14, 2020
1 parent ce7e374 commit 2698a89
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions xbmc/platform/win32/WIN32Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,8 +1259,7 @@ bool CWIN32Util::ToggleWindowsHDR()
if (mode.ColorSpace() == newColorSp &&
mode.ResolutionHeightInRawPixels() == current.ResolutionHeightInRawPixels() &&
mode.ResolutionWidthInRawPixels() == current.ResolutionWidthInRawPixels() &&
mode.StereoEnabled() == false && mode.RefreshRate() < (current.RefreshRate() + 0.1) &&
mode.RefreshRate() > (current.RefreshRate() - 0.1))
mode.StereoEnabled() == false && abs(mode.RefreshRate() - current.RefreshRate()) < 0.01)
{
if (current.ColorSpace() == HdmiDisplayColorSpace::BT2020) // HDR is ON
{
Expand Down Expand Up @@ -1375,12 +1374,11 @@ int CWIN32Util::GetWindowsHDRStatus()
if (CServiceBroker::IsServiceManagerUp())
CLog::LogF(LOGDEBUG, "CurrentAdvancedColorKind() = HDR, return status = {0:d}", status);
}
else if (advancedColorInfo.IsAdvancedColorKindAvailable(AdvancedColorKind::HighDynamicRange))
else if (advancedColorInfo.MaxLuminanceInNits() >= 400.0f)
{
status = 1;
if (CServiceBroker::IsServiceManagerUp())
CLog::LogF(LOGDEBUG, "IsAdvancedColorKindAvailable(HDR) = true, return status = {0:d}",
status);
CLog::LogF(LOGDEBUG, "MaxLuminanceInNits() >= 400, return status = {0:d}", status);
}
}
}
Expand Down

0 comments on commit 2698a89

Please sign in to comment.