mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
backends/x11: Make zero comparisons earlier and easier to reason about
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3062>
This commit is contained in:
parent
b3d0d84823
commit
150b110726
@ -92,12 +92,12 @@ calculate_xrandr_refresh_rate (XRRModeInfo *xmode)
|
||||
float h_total;
|
||||
float v_total;
|
||||
|
||||
if (xmode->hTotal == 0 || xmode->vTotal == 0)
|
||||
return 0.0;
|
||||
|
||||
h_total = (float) xmode->hTotal;
|
||||
v_total = (float) xmode->vTotal;
|
||||
|
||||
if (h_total == 0.0 || v_total == 0.0)
|
||||
return 0.0;
|
||||
|
||||
if (xmode->modeFlags & RR_DoubleScan)
|
||||
v_total *= 2.0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user