mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-09 20:30:15 +01:00
Bug #16674: Make sure RANDR reports refresh as 0 if pixel clock is 0.
This commit is contained in:
parent
3f3f66de66
commit
9111944b29
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue