Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » A5 question about display adapters

This thread is locked; no one can reply to it. rss feed Print
 1   2 
A5 question about display adapters
Don Freeman
Member #5,110
October 2004
avatar

bool al_get_display_resolution( int &w, int &h )
{
   ALLEGRO_DISPLAY *display = al_get_current_display();
   if ( !display )
      return false;
   w = al_get_display_width(display);
   h = al_get_display_height(display);
   return true;
}

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Matthew Leverton
Supreme Loser
January 1999
avatar

He doesn't want the current resolution. He wants the resolution before setting the display.

Evert
Member #794
November 2000
avatar

Shouldn't the native resolution typically be the maximum resolution supported by the display?

jmasterx
Member #11,410
October 2009

Evert said:

Shouldn't the native resolution typically be the maximum resolution supported by the display?

Not always with CRTs, but for LCDs && LEDs I'd say so. But theres always that small bunch that still use CRTs ;)

Because with CRTs sometimes higher resolutions were supported at a cost of a headache-causing 60 Hz refresh rate.

Thomas Fjellstrom
Member #476
June 2000
avatar

jmasterx said:

Because with CRTs sometimes higher resolutions were supported at a cost of a headache-causing 60 Hz refresh rate.

Indeed, if you were trying to set a decent mode on a CRT, you'd want to skip any of the modes that only show up as 60hz, unless ALL of the modes are only 60hz... That'd be one crappy CRT.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Arthur Kalliokoski
Second in Command
February 2005
avatar

I thought the limit on refresh rate was to keep down the clock rates for pixel sets? If the low res refresh rates were the same as the high res rates, the clocks per pixel would be much lower, so you could boost the refresh rate without making it impossible for the transistorized circuits to change color from one pixel to the next.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Thomas Fjellstrom
Member #476
June 2000
avatar

I thought the limit on refresh rate was to keep down the clock rates for pixel sets?

I don't know about you, but if I set a CRT to 60hz, it gives me awful headaches. The flickering is just too much.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Arthur Kalliokoski
Second in Command
February 2005
avatar

Back in the day, 60hz was fine, because that's all you had! Never had an EGA monitor? n00bs!

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Evert
Member #794
November 2000
avatar

Back in the day, 60hz was fine, because that's all you had!

For lower resolution modes, it was ok. For higher resolutions, not so much.

Thomas Fjellstrom
Member #476
June 2000
avatar

Evert said:

For lower resolution modes, it was ok. For higher resolutions, not so much.

I guess it depends on what you mean by "lower resolutions". My old 15" CRT back in the day gave me insane headaches at 1024x768.

My newer 20"+ CRTs all do modes higher than 1600x1200, but I dare not set them, for there madness lies.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Evert
Member #794
November 2000
avatar

I guess it depends on what you mean by "lower resolutions". My old 15" CRT back in the day gave me insane headaches at 1024x768.

640x480 or 800x600 is what I was thinking of when I said that, which is what my CRT could do at >60Hz in the mid to late 90s. My last one did 1024x768 at 85Hz or something like that, which was also fine.

 1   2 


Go to: