summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-04-27 12:06:19 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-04-27 12:07:31 +0100
commitc4fb8c93630402641f43c07725280fba9a47264b (patch)
tree828bf69719c1637237e0392c73a6d15a48dd7deb /wrappers
parentef26cb8eb5b983513a9276ee7c3aabff3f8baea5 (diff)
d3d9trace: Ignore D3DLOCK_READONLY for buffers.
https://github.com/apitrace/apitrace/issues/435
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/d3d9trace.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/wrappers/d3d9trace.py b/wrappers/d3d9trace.py
index 7e7072fc..5f111979 100644
--- a/wrappers/d3d9trace.py
+++ b/wrappers/d3d9trace.py
@@ -100,7 +100,12 @@ class D3D9Tracer(DllTracer):
else:
# FIXME: handle recursive locks
assert method.getArgByName('Level') is None
- print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
+ if method.name == 'Lock':
+ # Ignore D3DLOCK_READONLY for buffers.
+ # https://github.com/apitrace/apitrace/issues/435
+ print ' if (SUCCEEDED(_result)) {'
+ else:
+ print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
print ' } else {'
print ' m_pbData = NULL;'