Video adapter of a display
roger levy

How do you get the video adapter number in use by a given display?

Edgar Reynaldo

Each adapter represents a monitor.

You can get the primary display by searching for the monitor at 0,0.

To get a specific monitor, you need it's coordinates.

See al_get_monitor_info for details.

roger levy

How would I get the needed information from an ALLEGRO_DISPLAY?

Edgar Reynaldo

You don't. The adapter set is the one specified by al_set_new_display_adapter, which defaults to 0.

Rather, just call al_get_new_display_adapter and al_get_monitor_info.

roger levy

I am not sure that's true because my program is starting on my secondary display.

Edgar Reynaldo

Adapter 0 is not guaranteed to be the primary display.

roger levy

I see. Thanks.

Thread #617836. Printed from Allegro.cc