diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-05-31 17:01:54 +0300 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2014-02-19 16:10:53 -0800 |
commit | 00c795e99fe29ecd56e05e915e508c7af0ac39ad (patch) | |
tree | 90f2fb832b65917efea00d43d2986f9d54186f17 | |
parent | 8f9b993342fddfceaa1afbec2996ce10038f10d7 (diff) |
xrandr: Use floating point for VTotal when calculating refresh rate
Interlaced modes generally have an odd VTotal, so we lose half a line
from VTotal when we divide by two. That causes the final refresh rate
to be slightly off. Make VTotal a double to avoid the problem.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-rw-r--r-- | xrandr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -543,7 +543,7 @@ static double mode_refresh (XRRModeInfo *mode_info) { double rate; - unsigned int vTotal = mode_info->vTotal; + double vTotal = mode_info->vTotal; if (mode_info->modeFlags & RR_DoubleScan) { /* doublescan doubles the number of lines */ |