d3d9: Hold the lock in methods implemented in device.c.