diff options
author | Julien Cristau <jcristau@debian.org> | 2008-07-15 10:36:38 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-07-15 10:36:38 -0400 |
commit | 9111944b292355f7478b4ae75bead8dc25edbbcb (patch) | |
tree | eaa29fab5788c29eb97fad6c7ff32befd858038b | |
parent | 3f3f66de669caf3606eec8c5f8d405a283cbf12d (diff) |
Bug #16674: Make sure RANDR reports refresh as 0 if pixel clock is 0.
-rw-r--r-- | hw/xfree86/common/xf86RandR.c | 2 |
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); } |