Re: [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 ]


Evert Glebbeek wrote:
> On Tuesday 01 March 2005 14:13, Andrei Ellman wrote:
>
>> 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).
>
>
>
> Do you have any idea what causes this? It sounds like a DirectX/driver issue to me...

Sorry for taking so long to get back to you on this one. Anyway, in the meantime, I have tested it with Allegro 4.2 beta 3, and the problem still shows up, so it looks like the patch for detecting Direct X versions 8 and 9 did not have any effect on this problem.
To re-cap, on Windows 2000 which is using Direct X 9.0c, 
get_gfx_mode_list() returns an incomplete list of graphics modes, yet it 
is possible to set a mode of a higher resolution than the highest 
resolution on the list for a particular GFX driver. On my machine with a 
Matrox Marvel G400TV Graphics card, I can set a 1600x1200 graphics-mode 
with GFX_DIRECTX_ACCEL, GFX_DIRECTX_SOFT and GFX_DIRECTX_SAFE, yet when 
I query get_gfx_mode_list() with these same drivers, the highest mode 
returned is 1280x1024. This is also true when I select these three 
drivers in the graphics mode selector (the list of modes only goes up to 
1280 x 1024), however, when I select GFX_DIRECTX_OVL, 1600x1200 does 
appear in the graphics mode selector, but GFX_DIRECTX_OVL does not work 
for me at all.
Meanwhile when I run the same program in Windows 98 (even if it was 
compiled with the version of Allegro I have on Windows 2000), the list 
returned by get_gfx_mode_list() is complete (AFAIK) and goes all the way 
up to 1920x1440. I have Direct X 8.1 on my Windows 98 installation.
To make things even more interesting, on Windows 98 if I'm in the 
graphics mode selector and GFX_AUTODETECT is selected, the list of 
resolutions only goes up to 1600 x 1200, but if I select either 
GFX_DIRECTX_ACCEL, GFX_DIRECTX_SOFT, GFX_DIRECTX_SAFE, or 
GFX_DIRECTX_OVL, it goes up to 1920x1440.
Anyway, I've attatched an improved version of my test-program (this one 
actually lets you select one of the magic drivers such as 
GFX_AUTODETECT), and the output under both W98 and W2K
My only theory as to what's causing it is that somewhere in the 
transition from DirectX 8.1 to 9.0, the way the list of available 
graphics modes should be queried has changed, and the Allegro DirectX 
driver does not take this change into account. Any Direct X gurus care 
to look into this?

AE.

Attachment: gfxmodestest.rar
Description: Binary data



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