mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 13:49:48 +01:00
renderer: don't access hdrMetadata optional if it has no value (#8987)
This commit is contained in:
parent
75727e7c17
commit
5fa2594659
1 changed files with 3 additions and 2 deletions
|
@ -1466,8 +1466,9 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
||||||
|
|
||||||
static auto PHDR = CConfigValue<Hyprlang::INT>("experimental:hdr");
|
static auto PHDR = CConfigValue<Hyprlang::INT>("experimental:hdr");
|
||||||
|
|
||||||
Debug::log(TRACE, "ColorManagement supportsBT2020 {}, supportsPQ {}", pMonitor->output->parsedEDID.supportsBT2020, pMonitor->output->parsedEDID.hdrMetadata->supportsPQ);
|
const bool SUPPORTSPQ = pMonitor->output->parsedEDID.hdrMetadata.has_value() ? pMonitor->output->parsedEDID.hdrMetadata->supportsPQ : false;
|
||||||
if (pMonitor->output->parsedEDID.supportsBT2020 && pMonitor->output->parsedEDID.hdrMetadata->supportsPQ) {
|
Debug::log(TRACE, "ColorManagement supportsBT2020 {}, supportsPQ {}", pMonitor->output->parsedEDID.supportsBT2020, SUPPORTSPQ);
|
||||||
|
if (pMonitor->output->parsedEDID.supportsBT2020 && SUPPORTSPQ) {
|
||||||
if (pMonitor->activeWorkspace && pMonitor->activeWorkspace->m_bHasFullscreenWindow && pMonitor->activeWorkspace->m_efFullscreenMode == FSMODE_FULLSCREEN) {
|
if (pMonitor->activeWorkspace && pMonitor->activeWorkspace->m_bHasFullscreenWindow && pMonitor->activeWorkspace->m_efFullscreenMode == FSMODE_FULLSCREEN) {
|
||||||
const auto WINDOW = pMonitor->activeWorkspace->getFullscreenWindow();
|
const auto WINDOW = pMonitor->activeWorkspace->getFullscreenWindow();
|
||||||
const auto SURF = WINDOW->m_pWLSurface->resource();
|
const auto SURF = WINDOW->m_pWLSurface->resource();
|
||||||
|
|
Loading…
Reference in a new issue