Commit 2c1a09d6 authored by David Reid's avatar David Reid

Make device state retrieval explicitly atomic.

parent 7a745d1d
...@@ -5488,7 +5488,10 @@ static MA_INLINE void ma_device__set_state(ma_device* pDevice, ma_uint32 newStat ...@@ -5488,7 +5488,10 @@ static MA_INLINE void ma_device__set_state(ma_device* pDevice, ma_uint32 newStat
/* A helper for getting the state of the device. */ /* A helper for getting the state of the device. */
static MA_INLINE ma_uint32 ma_device__get_state(ma_device* pDevice) static MA_INLINE ma_uint32 ma_device__get_state(ma_device* pDevice)
{ {
return pDevice->state; ma_uint32 state;
ma_atomic_exchange_32(&state, pDevice->state);
return state;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment