From f9e969a3391e1c0622e35ceaf5dc541b7f149c5d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Nov 2018 10:55:57 -0800 Subject: Use a standard mutex for the event callback lock --- OpenAL32/alState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alState.cpp') 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 _{context->EventCbLock}; - ALbitfieldSOFT enabledevts{ATOMIC_LOAD(&context->EnabledEvts, almemory_order_relaxed)}; + std::lock_guard _{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); -- cgit v1.2.3