mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 12:45:59 +01:00
parent
68fd32c810
commit
6bd3397141
1 changed files with 6 additions and 1 deletions
|
@ -467,11 +467,16 @@ COutputConfigurationHead::COutputConfigurationHead(SP<CZwlrOutputConfigurationHe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w <= 0 || h <= 0 || refresh <= 100) {
|
if (w <= 0 || h <= 0 || refresh < 0) {
|
||||||
resource->error(ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_CUSTOM_MODE, "Invalid mode");
|
resource->error(ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_CUSTOM_MODE, "Invalid mode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (refresh == 0) {
|
||||||
|
LOGM(LOG, " | configHead for {}: refreshRate 0, using old refresh rate of {:.2f}Hz", pMonitor->szName, pMonitor->refreshRate);
|
||||||
|
refresh = std::round(pMonitor->refreshRate * 1000.F);
|
||||||
|
}
|
||||||
|
|
||||||
state.committedProperties |= OUTPUT_HEAD_COMMITTED_CUSTOM_MODE;
|
state.committedProperties |= OUTPUT_HEAD_COMMITTED_CUSTOM_MODE;
|
||||||
state.customMode = {{w, h}, (uint32_t)refresh};
|
state.customMode = {{w, h}, (uint32_t)refresh};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue