summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-07-15 10:36:38 -0400
committerAdam Jackson <ajax@redhat.com>2008-07-15 10:36:38 -0400
commit9111944b292355f7478b4ae75bead8dc25edbbcb (patch)
treeeaa29fab5788c29eb97fad6c7ff32befd858038b
parent3f3f66de669caf3606eec8c5f8d405a283cbf12d (diff)
Bug #16674: Make sure RANDR reports refresh as 0 if pixel clock is 0.
-rw-r--r--hw/xfree86/common/xf86RandR.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index f30674f72..10ec37070 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -55,6 +55,8 @@ xf86RandRModeRefresh (DisplayModePtr mode)
{
if (mode->VRefresh)
return (int) (mode->VRefresh + 0.5);
+ else if (mode->Clock == 0)
+ return 0;
else
return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
}