On 28 November 2014 at 11:16, Stefan Dösinger <stefan at codeweavers.com> wrote: > + if (!device->d3d_parent->extended && InterlockedCompareExchange(&device->device_state, > + D3D9_DEVICE_STATE_LOST, D3D9_DEVICE_STATE_LOST) == D3D9_DEVICE_STATE_LOST) Do you need the InterlockedCompareExchange()?