[mythtv-users] Setting specific xrandr mode based on the file's refresh rate
Jean-Yves Avenard
jyavenard at gmail.com
Tue Feb 17 04:13:45 UTC 2009
Hi
2009/2/17 Boleslaw Ciesielski <bolek-mythtv at curl.com>:
> See the source for xrandr utility (xrandr.c). I think it has everything you
> need. In fact
I have to admit I didn't check too much on how to do so..
>
> xrandr --verbose
>
> displays a list of modelines with the fake refresh rates. The real refresh
> rates can be computed from the fields in XRRModeInfo. There is even a
> function that does just that:
>
> /* v refresh frequency in Hz */
> static float
> mode_refresh (XRRModeInfo *mode_info)
> {
> float rate;
>
> if (mode_info->hTotal && mode_info->vTotal)
> rate = ((float) mode_info->dotClock /
> ((float) mode_info->hTotal * (float) mode_info->vTotal));
> else
> rate = 0;
> return rate;
> }
Excellent, I will update my mods to automatically compute the refresh
rates without having to use an external custom file..
Jean-Yves
More information about the mythtv-users
mailing list