[AD] get_gfx_mode_list() returns incorrect list of modes under DirectX 9.0c under Windows 2000

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi,

I have found a bug in the Windows version of get_gfx_mode_list() in Allegro when running under DirectX 9.0c on Windows 2000. I am using a Matrox Marvel G400TV Graphics card.

Under Windows 2000, get_gfx_mode_list() only reports modes that go up to 1280x1024 (32bpp), even though it is possible for me to set a 1600x1200 (32bpp) mode (and some other modes not on the list) with set_gfx_mode(). However, when I run the same test-program under Windows 98 (which only has DirectX 8.1), get_gfx_mode_list() lists several modes up to 1920 x 1440 (32bpp).

I have tested it under 4.0.3 (W2K mingw32/cygwin), 4.1.11 (W2K MSVC), 4.1.11 (W98 MSVC), 4.1.18 (W2K MSVC), 4.1.18 (W98 MSVC) and 4.1.18 (W98 DJGPP). I even tried running the version built by MSVC on Windows 98 under Windows 2000, and vice-versa.

I built Allegro from the sources for each of the builds above. However, On Windows 2000, I only have the DirectX 8.0 SDK installed. I also have the Direct X 8.0 SDK installed on Windows 98. When building for Cygwin, I used the direct-x headers in dx70_mgw.zip

Incidentally, under DJGPP, get_gfx_mode_list() only seems to work when the driver is the standard VGA driver. If I select another driver, get_gfx_mode_list() returns 0. This happens both when running under a Windows 98 DOS-Box and from a DOS session without Windows.

Anyway, included is a zip containing my test-program and the output for various platforms/builds. What it does is to set a graphics mode (this is either hard-coded, or gfx_mode_select_ex() is called depending on whether TEUSEMODESELECTOR is #defined or not). It then lists all the modes as found by get_gfx_mode_list(), and writes them to a file called modelist.txt (if the file already exists, it is appended).


AE.

PS. I sent the files a a series of GZs instead of a single ZIP because sf.net is blocking mail with the ZIP extension.

Attachment: gfxmodestest.c.gz
Description: Binary data

Attachment: modelist.4.0.3.MinGW32.txt.gz
Description: Binary data

Attachment: modelist.4.1.11.MSVC_2K.txt.gz
Description: Binary data

Attachment: modelist.4.1.18.DJGPP.txt.gz
Description: Binary data

Attachment: modelist.4.1.18.MSVC_2K.txt.gz
Description: Binary data

Attachment: MODELIST.4.1.11.MSVC_98.TXT.gz
Description: Binary data

Attachment: MODELIST.4.1.18.MSVC_98.TXT.gz
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/