aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-11 08:44:52 -0800
committerChris Robinson <[email protected]>2018-01-11 08:44:52 -0800
commit15ad5245bfa498dff729d2bb1cd91fad161cc806 (patch)
treeb5f0d36fe916d81e498c7c18278ed7b40f7cf00d /Alc/helpers.c
parent8aa9e35f8c743c1336142a0a49eaeee19a6d33d3 (diff)
Move the FPU mode declarations to a separate header
Also don't use inheritance with FPUCtl.
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r--Alc/helpers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 0f69b29e..238569d6 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -109,6 +109,7 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x
#include "alMain.h"
#include "alu.h"
#include "cpu_caps.h"
+#include "fpu_modes.h"
#include "atomic.h"
#include "uintmap.h"
#include "vector.h"
@@ -295,7 +296,7 @@ void FillCPUCaps(int capfilter)
void SetMixerFPUMode(FPUCtl *ctl)
{
#ifdef HAVE_FENV_H
- fegetenv(STATIC_CAST(fenv_t, ctl));
+ fegetenv(&ctl->flt_env);
#ifdef _WIN32
/* HACK: A nasty bug in MinGW-W64 causes fegetenv and fesetenv to not save
* and restore the FPU rounding mode, so we have to do it manually. Don't
@@ -348,7 +349,7 @@ void SetMixerFPUMode(FPUCtl *ctl)
void RestoreFPUMode(const FPUCtl *ctl)
{
#ifdef HAVE_FENV_H
- fesetenv(STATIC_CAST(fenv_t, ctl));
+ fesetenv(&ctl->flt_env);
#ifdef _WIN32
fesetround(ctl->round_mode);
#endif