This commit is contained in:
Vaxry 2025-12-18 13:52:37 +07:00 committed by GitHub
commit 986c19a66d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -589,6 +589,9 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
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
// TODO: clean this up lol
if (!force && DELTALESSTHAN(m_pixelSize.x, RULE->resolution.x, 1) /* ↓ */
@ -836,9 +839,13 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
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);
m_failedModeRetries++;
g_pEventLoopManager->doLater([] { g_pConfigManager->m_wantsMonitorReload = true; });
return true;
}
m_failedModeRetries = 0;
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

View file

@ -128,8 +128,9 @@ class CMonitor {
std::optional<Vector2D> m_forceSize;
SP<Aquamarine::SOutputMode> m_currentMode;
SP<Aquamarine::CSwapchain> m_cursorSwapchain;
uint32_t m_drmFormat = DRM_FORMAT_INVALID;
uint32_t m_prevDrmFormat = DRM_FORMAT_INVALID;
uint32_t m_drmFormat = DRM_FORMAT_INVALID;
uint32_t m_prevDrmFormat = DRM_FORMAT_INVALID;
uint32_t m_failedModeRetries = 0;
CMonitorZoomController m_zoomController;