aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-21 09:07:02 -0800
committerChris Robinson <[email protected]>2018-11-21 09:07:02 -0800
commit9f2a77f78801da760df582900ec862fff6438a09 (patch)
tree5a8bdbbf8519aaca1bb92c836b165fad64b60b39 /Alc/alc.cpp
parent8f43f737ba5f0ed32a37498f6787c34257a3f796 (diff)
Use RAII when handling the mixer's FPU state
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 5c46b950..d9fa549a 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2241,7 +2241,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
* allocated with the appropriate size.
*/
update_failed = AL_FALSE;
- START_MIXER_MODE();
+ FPUCtl mixer_mode{};
context = device->ContextList.load();
while(context)
{
@@ -2354,7 +2354,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
context = context->next.load(std::memory_order_relaxed);
}
- END_MIXER_MODE();
+ mixer_mode.leave();
if(update_failed)
return ALC_INVALID_DEVICE;