X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fd3d9retrace.py;h=7030f868f17b3a98a27d0e3048f7077f412f640c;hb=c94328ae7d1371db8a3d7711895fd6e1501d4b7c;hp=44104ce616e4676038ecabf43d8b2dfa23115920;hpb=cc9abd7172f230546e3deaa01c023cd3063d7ad2;p=apitrace diff --git a/retrace/d3d9retrace.py b/retrace/d3d9retrace.py index 44104ce..7030f86 100644 --- a/retrace/d3d9retrace.py +++ b/retrace/d3d9retrace.py @@ -43,6 +43,20 @@ class D3DRetracer(Retracer): Retracer.retraceApi(self, api) + def invokeFunction(self, function): + if function.name in ('Direct3DCreate9', 'Direct3DCreate9Ex'): + print 'if (retrace::debug && !g_szD3D9DllName) {' + print ' /* ' + print ' * XXX: D3D9D only works for simple things, it often introduces errors' + print ' * on complex traces, or traces which use unofficial D3D9 features.' + print ' */' + print ' if (0) {' + print ' g_szD3D9DllName = "d3d9d.dll";' + print ' }' + print '}' + + Retracer.invokeFunction(self, function) + def invokeInterfaceMethod(self, interface, method): # keep track of the last used device for state dumping if interface.name in ('IDirect3DDevice9', 'IDirect3DDevice9Ex'):