How to set Display properties?
Doctor Cop

I am trying to find a way to set Display size according to screen size.
Different monitors should be able to support it.

Is there a already something which I can use, if not then how can I achieve something like this on my own.

Peter Hull

Probably you want al_get_monitor_info.

e.g.

#SelectExpand
1#include <cstdio> 2#include <allegro5/allegro.h> 3 4int main(int, char* []) { 5 al_init(); 6 int c = al_get_num_video_adapters(); 7 for (int i = 0; i < c; ++i) { 8 ALLEGRO_MONITOR_INFO info; 9 if (al_get_monitor_info(i, &info)) { 10 printf("%d. (%d, %d)-(%d, %d)\n", i, 11 info.x1, info.y1, 12 info.x2, info.y2); 13 } else { 14 printf("%d. no info\n", i); 15 } 16 } 17 return 0; 18}

[edit] or maybe al_get_display_mode if you want to know what fullscreen modes your monitor will support.

Doctor Cop

Thanks!

roger levy

.

Thread #617832. Printed from Allegro.cc