X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fd3d9trace.py;h=df39927f787a7854a233eb4689d9e39698aca4b7;hb=82715be6c3d6bf058c9eca236bf30d26cc7fd22f;hp=c82d525993aae1ae0a76344c329d89db21d039be;hpb=6c77bd02ffd5a976e946ad518d73d910ddeb0b32;p=apitrace diff --git a/wrappers/d3d9trace.py b/wrappers/d3d9trace.py index c82d525..df39927 100644 --- a/wrappers/d3d9trace.py +++ b/wrappers/d3d9trace.py @@ -41,6 +41,7 @@ class D3D9Tracer(DllTracer): def enumWrapperInterfaceVariables(self, interface): variables = DllTracer.enumWrapperInterfaceVariables(self, interface) + # Add additional members to track locks if interface.getMethodByName('Lock') is not None or \ interface.getMethodByName('LockRect') is not None or \ interface.getMethodByName('LockBox') is not None: @@ -60,19 +61,12 @@ class D3D9Tracer(DllTracer): DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method) if method.name in ('Lock', 'LockRect', 'LockBox'): + # FIXME: handle recursive locks print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {' - print ' _LockedSize = _getLockSize(_this, %s);' % ', '.join(method.argNames()[:-1]) - if method.name == 'Lock': - # FIXME: handle recursive locks - print ' m_pbData = *ppbData;' - elif method.name == 'LockRect': - print ' m_pbData = pLockedRect->pBits;' - elif method.name == 'LockBox': - print ' m_pbData = pLockedVolume->pBits;' - else: - raise NotImplementedError + print ' _getLockInfo(_this, %s, m_pbData, _LockedSize);' % ', '.join(method.argNames()[:-1]) print ' } else {' print ' m_pbData = NULL;' + print ' _LockedSize = 0;' print ' }' @@ -83,8 +77,8 @@ if __name__ == '__main__': print '#include "os.hpp"' print print '#include "d3d9imports.hpp"' - print '#include "d3dsize.hpp"' - print '#include "d3dshader.hpp"' + print '#include "d3d9size.hpp"' + print '#include "d3d9shader.hpp"' print print ''' static inline size_t