]> git.cworth.org Git - apitrace/blobdiff - wrappers/d3d9trace.py
common: Add more comments.
[apitrace] / wrappers / d3d9trace.py
index c1cadb67e49b10d39d6619992d6fb6acceb73977..f3236e729b64d34c5e400aeb7855a894f49ffdbe 100644 (file)
@@ -25,6 +25,7 @@
 
 
 from dlltrace import DllTracer
+from specs.stdapi import API
 from specs.d3d9 import d3d9, D3DSHADER9
 
 import specs.d3d9dxva2
@@ -83,17 +84,8 @@ if __name__ == '__main__':
     print '#include "d3d9shader.hpp"'
     print '#include "dxvaint.h"'
     print
-    print '''
-static inline size_t
-_declCount(const D3DVERTEXELEMENT9 *pVertexElements) {
-    size_t count = 0;
-    if (pVertexElements) {
-        while (pVertexElements[count++].Stream != 0xff)
-            ;
-    }
-    return count;
-}
-'''
-    tracer = D3D9Tracer('d3d9.dll')
-    tracer.traceModule(d3d9)
 
+    api = API()
+    api.addModule(d3d9)
+    tracer = D3D9Tracer()
+    tracer.traceApi(api)