mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-27 01:05:59 +01:00
parent
d9937fcdba
commit
4eecb8bffc
1 changed files with 9 additions and 10 deletions
|
@ -2081,10 +2081,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
|
||||||
if (m->vrrActive) {
|
if (m->vrrActive) {
|
||||||
wlr_output_enable_adaptive_sync(m->output, 0);
|
wlr_output_enable_adaptive_sync(m->output, 0);
|
||||||
|
|
||||||
if (!wlr_output_commit(m->output)) {
|
if (!wlr_output_commit(m->output))
|
||||||
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
|
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
m->vrrActive = false;
|
m->vrrActive = false;
|
||||||
return;
|
return;
|
||||||
} else if (USEVRR == 1) {
|
} else if (USEVRR == 1) {
|
||||||
|
@ -2096,10 +2095,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
|
||||||
wlr_output_enable_adaptive_sync(m->output, 0);
|
wlr_output_enable_adaptive_sync(m->output, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wlr_output_commit(m->output)) {
|
if (!wlr_output_commit(m->output))
|
||||||
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
|
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
m->vrrActive = true;
|
m->vrrActive = true;
|
||||||
return;
|
return;
|
||||||
} else if (USEVRR == 2) {
|
} else if (USEVRR == 2) {
|
||||||
|
@ -2111,7 +2109,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
|
||||||
if (!PWORKSPACE)
|
if (!PWORKSPACE)
|
||||||
return; // ???
|
return; // ???
|
||||||
|
|
||||||
if (PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
|
const auto WORKSPACEFULL = PWORKSPACE->m_bHasFullscreenWindow && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL;
|
||||||
|
|
||||||
|
if (WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
|
||||||
wlr_output_enable_adaptive_sync(m->output, 1);
|
wlr_output_enable_adaptive_sync(m->output, 1);
|
||||||
|
|
||||||
if (!wlr_output_test(m->output)) {
|
if (!wlr_output_test(m->output)) {
|
||||||
|
@ -2119,17 +2119,16 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
|
||||||
wlr_output_enable_adaptive_sync(m->output, 0);
|
wlr_output_enable_adaptive_sync(m->output, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wlr_output_commit(m->output)) {
|
if (!wlr_output_commit(m->output))
|
||||||
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
|
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
|
||||||
}
|
|
||||||
} else if (!PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
|
} else if (!WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
|
||||||
wlr_output_enable_adaptive_sync(m->output, 0);
|
wlr_output_enable_adaptive_sync(m->output, 0);
|
||||||
|
|
||||||
if (!wlr_output_commit(m->output)) {
|
if (!wlr_output_commit(m->output))
|
||||||
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
|
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (pMonitor) {
|
if (pMonitor) {
|
||||||
|
|
Loading…
Reference in a new issue