Re: [AD] patch for detecting DX8,9 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
On Tuesday 22 February 2005 06:54, AJ wrote:
attached is a patch for detecting directX versions 8 and 9.
made for 4.1.18
The attached patch is a slightly reworked version of the original (which
didn't apply for me for some reason). I have mainly replaced the blocks of
ifs with select/case blocks, which I think are easier to read (and
intended for the purpose).
I have a few questions though:
+ case 0x0001032A:
+ case 0x00010371:
+ dx_version = 0x801; /* 8.1 */
Is this really correct? Are there two possible return values for DX 8.1? If
so, why? Also, why 0x801 rather than 0x810, as you did for the other ones?
typo, correct it to 0x810
+ case 0x00010385:
+ dx_version = 0x81a; /* 8.1a */
+ break;
+ case 0x00010385:
+ dx_version = 0x81b; /* 8.1b */
+ break;
+ case 0x00020386:
+ dx_version = 0x820; /* 8.2 */
+ break;
There's a duplicate value here. What would be the correct values?
from MSDN doc:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/setup/reference/functions/directxsetupgetversion.asp
DirectX 8.1a 0x00010385
DirectX 8.1b 0x00010385
it is a duplicate, just set dx_version=0x81a;
yet that would suggest to uses of dx8.1b that it is wrong... not sure
which is safest to return.???