Use d3dx9.dll if available.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 14 Nov 2010 20:47:54 +0000 (20:47 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 4 Dec 2010 10:49:17 +0000 (10:49 +0000)
d3dshader.py

index f48997f..24372e2 100644 (file)
@@ -58,13 +58,13 @@ typedef HRESULT
     if(firsttime) {
         if(!hD3DXModule) {
             unsigned release;
-            unsigned version;
+            int version;
             for(release = 0; release <= 1; ++release) {
                 /* Version 41 corresponds to Mar 2009 version of DirectX Runtime / SDK */ 
-                for(version = 41; version >= 24; --version) {
+                for(version = 41; version >= 0; --version) {
                     char filename[256];
                     _snprintf(filename, sizeof(filename), 
-                              "d3dx9%s_%u.dll", release ? "" : "d", version);
+                              "d3dx9%s%s%u.dll", release ? "" : "d", version ? "_" : "", version);
                     hD3DXModule = LoadLibraryA(filename);
                     if(hD3DXModule)
                         goto found;