Welcome, Guest. Please login or register.

Author Topic: Display info  (Read 2391 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Display info
« 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
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Display info
« Reply #1 on: March 05, 2003, 10:20:17 AM »
*bump*

:-)
int p; // A
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Display info
« Reply #2 on: March 05, 2003, 11:14:06 AM »
Quote
Does anybody know how to determine the horizontal / vertical refresh rates of a given display from C?

See getmodeidrate.c.
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Display info
« Reply #3 on: March 05, 2003, 11:48:41 AM »
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 :-)

int p; // A
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Display info
« Reply #4 on: March 05, 2003, 12:52:11 PM »
from graphics/displayinfo.h:

/* scanline width in 280 ns units    */

That +5 is just for proper rounding.
These are not hw dependant constants.
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Display info
« Reply #5 on: March 05, 2003, 01:25:47 PM »
Thanks again ;-)#

-edit-

Worked a treat...
int p; // A