mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 17:10:04 +01:00
Merge 4d8f43accd into f88deb928a
This commit is contained in:
commit
986c19a66d
2 changed files with 10 additions and 2 deletions
|
|
@ -589,6 +589,9 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
||||||
force = true;
|
force = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_failedModeRetries > 0 /* 0 = success */ && m_failedModeRetries < 5 /* Arbitrary number I chose as reasonable */)
|
||||||
|
force = true;
|
||||||
|
|
||||||
// Check if the rule isn't already applied
|
// Check if the rule isn't already applied
|
||||||
// TODO: clean this up lol
|
// TODO: clean this up lol
|
||||||
if (!force && DELTALESSTHAN(m_pixelSize.x, RULE->resolution.x, 1) /* ↓ */
|
if (!force && DELTALESSTHAN(m_pixelSize.x, RULE->resolution.x, 1) /* ↓ */
|
||||||
|
|
@ -836,9 +839,13 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
Debug::log(ERR, "Monitor {} has NO FALLBACK MODES, and an INVALID one was requested: {:X0}@{:.2f}Hz", m_name, RULE->resolution, RULE->refreshRate);
|
Debug::log(ERR, "Monitor {} has NO FALLBACK MODES, and an INVALID one was requested: {:X0}@{:.2f}Hz", m_name, RULE->resolution, RULE->refreshRate);
|
||||||
|
m_failedModeRetries++;
|
||||||
|
g_pEventLoopManager->doLater([] { g_pConfigManager->m_wantsMonitorReload = true; });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_failedModeRetries = 0;
|
||||||
|
|
||||||
m_vrrActive = m_output->state->state().adaptiveSync // disabled here, will be tested in CConfigManager::ensureVRR()
|
m_vrrActive = m_output->state->state().adaptiveSync // disabled here, will be tested in CConfigManager::ensureVRR()
|
||||||
|| m_createdByUser; // wayland backend doesn't allow for disabling adaptive_sync
|
|| m_createdByUser; // wayland backend doesn't allow for disabling adaptive_sync
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ class CMonitor {
|
||||||
SP<Aquamarine::CSwapchain> m_cursorSwapchain;
|
SP<Aquamarine::CSwapchain> m_cursorSwapchain;
|
||||||
uint32_t m_drmFormat = DRM_FORMAT_INVALID;
|
uint32_t m_drmFormat = DRM_FORMAT_INVALID;
|
||||||
uint32_t m_prevDrmFormat = DRM_FORMAT_INVALID;
|
uint32_t m_prevDrmFormat = DRM_FORMAT_INVALID;
|
||||||
|
uint32_t m_failedModeRetries = 0;
|
||||||
|
|
||||||
CMonitorZoomController m_zoomController;
|
CMonitorZoomController m_zoomController;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue