# keep track of the last used device for state dumping
if interface.name in ('IDirect3DDevice9', 'IDirect3DDevice9Ex'):
if method.name == 'Release':
# keep track of the last used device for state dumping
if interface.name in ('IDirect3DDevice9', 'IDirect3DDevice9Ex'):
if method.name == 'Release':