Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Calling al_get_monitor_info() before al_create_display() allowed

This thread is locked; no one can reply to it. rss feed Print
Calling al_get_monitor_info() before al_create_display() allowed
Frank Drebin
Member #2,987
December 2002
avatar

Is is valid to call:

ALLEGRO_MONITOR_INFO info;
al_get_monitor_info(0,&info);
printf("%i x %i",info.x2-info.x1,info.y2-info.y1);

to get the desktop resolution before the call to al_create_display()?

Edgar Reynaldo
Member #8,592
May 2007
avatar

Frank Drebin
Member #2,987
December 2002
avatar

It seems to work (and the documentation doesn't say I have to). So I guess the answer is yes ;D

Edgar Reynaldo
Member #8,592
May 2007
avatar

GullRaDriel
Member #3,861
September 2003
avatar

LMAO how Ed is making user cross checking allegro5 ^^

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Go to: