mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-27 02:29:48 +01:00
change Preferred mode to use highest refreshrate
This commit is contained in:
parent
8b11a2e1b1
commit
d51c7ca135
1 changed files with 6 additions and 0 deletions
|
@ -962,6 +962,9 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
|
|||
Debug::log(ERR, "Custom resolution FAILED, falling back to preferred");
|
||||
|
||||
const auto PREFERREDMODE = wlr_output_preferred_mode(pMonitor->output);
|
||||
wl_list_for_each(mode, &pMonitor->output->modes, link) {
|
||||
if(mode > pMonitorRule-refreshRate)
|
||||
pMonitorRule->refreshRate = mode;
|
||||
|
||||
if (!PREFERREDMODE) {
|
||||
Debug::log(ERR, "Monitor %s has NO PREFERRED MODE, and an INVALID one was requested: %ix%i@%2f",
|
||||
|
@ -990,6 +993,9 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
|
|||
}
|
||||
} else {
|
||||
const auto PREFERREDMODE = wlr_output_preferred_mode(pMonitor->output);
|
||||
wl_list_for_each(mode, &pMonitor->output->modes, link) {
|
||||
if(mode > pMonitorRule-refreshRate)
|
||||
pMonitorRule->refreshRate = mode;
|
||||
|
||||
if (!PREFERREDMODE) {
|
||||
Debug::log(ERR, "Monitor %s has NO PREFERRED MODE",
|
||||
|
|
Loading…
Reference in a new issue