Like the title says, does al_set_new_display_adapter affect the results of al_get_display_mode? I want to know the available modes for each adapter there is. That way I can detect my HDTV resolution programmatically through the HDMI cable, as well as other monitors.
Cookies are on standby.
Yes, look here: https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2895
int adapter = al_get_new_display_adapter(); if (adapter < 0) adapter = 0; if (!_al_pixel_format_is_real(allegro_formats[j]) || _al_pixel_format_has_alpha(allegro_formats[j])) continue; num_modes = _al_d3d->GetAdapterModeCount(adapter, (D3DFORMAT)d3d_formats[j]);
So it does uses the current adapter when listing the available modes.
I'm going to say "yes", but that's just a guess. The simplest way to test would be to quickly write in some debug code which outputs the results of al_get_num_video_adapters() so you know how many adapters you can set to (in case the entirety of the desktop space counts as one), then simply set one of those adapters and report the result of al_get_num_display_modes() for each one. If the results differ for each video adapter, the answer to your question is yes. If not, the answer is no.
EDIT: Nevermind. Better answer posted above while I was writing this post.
Looks like _al_wgl_get_display_mode enumerates them every time, but it totally ignores the adapter entirely. So you can't rely on it with OpenGL.
I'm not sure where the comment in _al_wgl_get_num_display_modes is coming from, but you can get a list of the display devices on Windows by using EnumDisplayDevices. You don't have to create a window to do it either. So this function could easily be altered to use a specific adapter. EnumDisplayDevices returns a DEVMODE object with the number of bits per pixel, but it doesn't tell you the layout of the rgb structure.
OpenGL will use the adapter you set with al_set_new_display_adapter when you create a display, but right now there is now way to enumerate display modes on anything but the default display.
Unless I'm missing something, which I very well could be. :/