Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Karlos on March 04, 2003, 02:23:32 PM
-
Hi all,
I got another RTFM question :-P
Does anybody know how to determine the horizontal / vertical refresh rates of a given display from C? I've been rumaging through the RKMS's, Includes & Autodocs and can't seem to find what I need.
I especially need the vertical refresh rate to determine the maximum safe locking time for direct video access / rendering under cybergraphx.
I know the info must be stored away in an intuition or graphics library structure somewhere. After all, you can see the refresh rates in the screenmode preferences window...
Thanks,
K
-
*bump*
:-)
-
Does anybody know how to determine the horizontal / vertical refresh rates of a given display from C?
See getmodeidrate.c (http://www.iki.fi/sintonen/src/misc/getmodeidrate.c).
-
Thanks! :-)
-edit-
BTW, whats the significance of the constants 280 and 5 in the
moninfo.TotalColorClocks * 280 * moninfo.TotalRows / 1000) + 5;
expression? Is there any likelyhood that theyre hardware dependent? Sorry if that turns out to be a really stupid question, don't have RKM to hand at the mo :-)
-
from graphics/displayinfo.h:
/* scanline width in 280 ns units */
That +5 is just for proper rounding.
These are not hw dependant constants.
-
Thanks again ;-)#
-edit-
Worked a treat...