renderer/cm: allow gamma 2.2 instead of sRGB EOTF (#12094)

This commit is contained in:
Dominick DiMaggio 2025-10-29 08:53:42 -04:00 committed by GitHub
parent ce9787b3f4
commit ff50dc36e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 15 deletions

View file

@ -1555,9 +1555,10 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
if (*PAUTOHDR && !(pMonitor->inHDR() && configuredHDR)) {
// modify or restore monitor image description for auto-hdr
// FIXME ok for now, will need some other logic if monitor image description can be modified some other way
const auto targetCM = wantHDR ? (*PAUTOHDR == 2 ? NCMType::CM_HDR_EDID : NCMType::CM_HDR) : pMonitor->m_cmType;
const auto targetCM = wantHDR ? (*PAUTOHDR == 2 ? NCMType::CM_HDR_EDID : NCMType::CM_HDR) : pMonitor->m_cmType;
const auto targetSDREOTF = pMonitor->m_sdrEotf;
Debug::log(INFO, "[CM] Auto HDR: changing monitor cm to {}", sc<uint8_t>(targetCM));
pMonitor->applyCMType(targetCM);
pMonitor->applyCMType(targetCM, targetSDREOTF);
pMonitor->m_previousFSWindow.reset(); // trigger CTM update
}
Debug::log(INFO, wantHDR ? "[CM] Updating HDR metadata from monitor" : "[CM] Restoring SDR mode");