From: José Fonseca Date: Fri, 3 Feb 2012 19:06:31 +0000 (+0000) Subject: Try all interfaces when wrapping REFIIDs. X-Git-Tag: 2.0_alpha^2~311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccf250c000bc13dd4958e010d6ba0de92c01fe72;p=tools%2Fapitrace.git Try all interfaces when wrapping REFIIDs. --- diff --git a/d3d8trace.py b/d3d8trace.py index 1da3feb..af87c2d 100644 --- a/d3d8trace.py +++ b/d3d8trace.py @@ -40,6 +40,8 @@ class D3D8Tracer(DllTracer): if __name__ == '__main__': + print '#define INITGUID' + print print '#include ' print '#include ' print '#include "d3dshader.hpp"' diff --git a/d3d9trace.py b/d3d9trace.py index ae4acd0..4f40194 100644 --- a/d3d9trace.py +++ b/d3d9trace.py @@ -70,6 +70,8 @@ class D3D9Tracer(DllTracer): if __name__ == '__main__': + print '#define INITGUID' + print print '#include "trace_writer_local.hpp"' print '#include "os.hpp"' print diff --git a/trace.py b/trace.py index 831af98..bd97772 100644 --- a/trace.py +++ b/trace.py @@ -542,9 +542,11 @@ class Tracer: def wrapIid(self, riid, out): print ' if (%s && *%s) {' % (out.name, out.name) print ' if (*%s == m_pInstance) {' % (out.name,) + print ' AddRef();' + print ' m_pInstance->Release();' print ' *%s = this;' % (out.name,) print ' }' - for iface in self.api.interfaces: + for iface in self.api.getAllInterfaces(): print r' else if (%s == IID_%s) {' % (riid.name, iface.name) print r' *%s = new Wrap%s((%s *) *%s);' % (out.name, iface.name, iface.name, out.name) print r' }'