aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-19 03:42:00 -0700
committerChris Robinson <[email protected]>2017-09-19 03:42:00 -0700
commitbc386af5c5607f0d7a7ed911d5975fc9758c7110 (patch)
tree104b28a7705d1a0c0ebebdff549bc10210c66f2a /OpenAL32/Include/alMain.h
parent4ca8b4080a2a0a434a35179a869e23c288bb7451 (diff)
Manually save and restore the FPU rounding mode on Windows
Apparently there is a bug with at least MinGW-W64 where fegetenv and fesetenv do not properly save and restore the FPU rounding mode, resulting in the rounding mode remaining as round-to-zero after certain function calls. I do not know if this also affects MSVC, but better safe than sorry for now.
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f24eb000..614c3b43 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -901,6 +901,9 @@ void ALCcontext_ProcessUpdates(ALCcontext *context);
typedef struct {
#ifdef HAVE_FENV_H
DERIVE_FROM_TYPE(fenv_t);
+#ifdef _WIN32
+ int round_mode;
+#endif
#else
int state;
#endif