diff options
author | Chris Robinson <[email protected]> | 2018-11-20 10:55:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-20 10:55:57 -0800 |
commit | f9e969a3391e1c0622e35ceaf5dc541b7f149c5d (patch) | |
tree | bb730c98c215906f446cf8f4e59ab4f224be229b /OpenAL32/alState.cpp | |
parent | 191ea90de3994f9e98377ea9318c4c7b6885179c (diff) |
Use a standard mutex for the event callback lock
Diffstat (limited to 'OpenAL32/alState.cpp')
-rw-r--r-- | OpenAL32/alState.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alState.cpp b/OpenAL32/alState.cpp index 2901baa2..95a4fd92 100644 --- a/OpenAL32/alState.cpp +++ b/OpenAL32/alState.cpp @@ -664,8 +664,8 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value) static constexpr ALCchar msg[] = "alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound"; const ALsizei msglen = (ALsizei)strlen(msg); - std::lock_guard<almtx_t> _{context->EventCbLock}; - ALbitfieldSOFT enabledevts{ATOMIC_LOAD(&context->EnabledEvts, almemory_order_relaxed)}; + std::lock_guard<std::mutex> _{context->EventCbLock}; + ALbitfieldSOFT enabledevts{context->EnabledEvts.load(std::memory_order_relaxed)}; if((enabledevts&EventType_Deprecated) && context->EventCb) (*context->EventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, msglen, msg, context->EventParam); |