diff options
author | Chris Robinson <[email protected]> | 2011-09-29 04:03:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-29 04:03:18 -0700 |
commit | f4925a0e6a1988a4274ab1c8928ba88f70b6c39a (patch) | |
tree | c61285d90931c5202243cc2ced271462921f0434 /OpenAL32/alState.c | |
parent | b6b3ca6e6ffab6aa943c760be1290954190ae66e (diff) |
Use inline functions to set/restore the FPU mode for mixer updates
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r-- | OpenAL32/alState.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index 1cb52689..c50df9e6 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -587,17 +587,9 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void) ALeffectslot **slot, **slot_end; int fpuState; - LockContext(Context); -#if defined(HAVE_FESETROUND) - fpuState = fegetround(); - fesetround(FE_TOWARDZERO); -#elif defined(HAVE__CONTROLFP) - fpuState = _controlfp(0, 0); - (void)_controlfp(_RC_CHOP, _MCW_RC); -#else - (void)fpuState; -#endif + fpuState = SetMixerFPUMode(); + LockContext(Context); Context->DeferUpdates = AL_TRUE; /* Make sure all pending updates are performed */ @@ -630,11 +622,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void) } UnlockContext(Context); -#if defined(HAVE_FESETROUND) - fesetround(fpuState); -#elif defined(HAVE__CONTROLFP) - _controlfp(fpuState, _MCW_RC); -#endif + RestoreFPUMode(fpuState); } ALCcontext_DecRef(Context); |