hyprctl: include color management presets and sdr information (#12019)
* move string parsing for eCMType to its own namespace, similar to how `src/protocols/types/ContentType.cpp` is done * expose cm type and sdr settings in `hyprctl monitors`, format floats to .2f
This commit is contained in:
parent
117e38db35
commit
34812c33db
9 changed files with 104 additions and 54 deletions
|
|
@ -1506,7 +1506,7 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
|
||||
static bool needsHDRupdate = false;
|
||||
|
||||
const bool configuredHDR = (pMonitor->m_cmType == CM_HDR_EDID || pMonitor->m_cmType == CM_HDR);
|
||||
const bool configuredHDR = (pMonitor->m_cmType == NCMType::CM_HDR_EDID || pMonitor->m_cmType == NCMType::CM_HDR);
|
||||
bool wantHDR = configuredHDR;
|
||||
|
||||
const auto FS_WINDOW = pMonitor->inFullscreenMode() ? pMonitor->m_activeWorkspace->getFullscreenWindow() : nullptr;
|
||||
|
|
@ -1555,7 +1555,7 @@ 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 ? CM_HDR_EDID : CM_HDR) : pMonitor->m_cmType;
|
||||
const auto targetCM = wantHDR ? (*PAUTOHDR == 2 ? NCMType::CM_HDR_EDID : NCMType::CM_HDR) : pMonitor->m_cmType;
|
||||
Debug::log(INFO, "[CM] Auto HDR: changing monitor cm to {}", sc<uint8_t>(targetCM));
|
||||
pMonitor->applyCMType(targetCM);
|
||||
pMonitor->m_previousFSWindow.reset(); // trigger CTM update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue