mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 05:10:20 +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;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue