renderer: add quirks:prefer_hdr to fix HDR activation for some clients (#12436)
This commit is contained in:
parent
2cadc8abab
commit
3cf0280b11
5 changed files with 40 additions and 0 deletions
|
|
@ -557,6 +557,10 @@ void CWLSurfaceResource::commitState(SSurfaceState& state) {
|
|||
}
|
||||
|
||||
SImageDescription CWLSurfaceResource::getPreferredImageDescription() {
|
||||
static const auto PFORCE_HDR = CConfigValue<Hyprlang::INT>("quirks:prefer_hdr");
|
||||
if (*PFORCE_HDR == 1 || (*PFORCE_HDR == 2 && m_hlSurface && m_hlSurface->getWindow() && m_hlSurface->getWindow()->m_class == "gamescope"))
|
||||
return g_pCompositor->getHDRImageDescription();
|
||||
|
||||
auto parent = m_self;
|
||||
if (parent->m_role->role() == SURFACE_ROLE_SUBSURFACE) {
|
||||
auto subsurface = sc<CSubsurfaceRole*>(parent->m_role.get())->m_subsurface.lock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue