aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alListener.h
diff options
context:
space:
mode:
authorMinmin Gong <gongminmin@msn.com>2019-02-04 19:59:19 -0800
committerMinmin Gong <gongminmin@msn.com>2019-02-04 20:03:18 -0800
commit41b9d473a2753fea2deeb1f1f8f241fd53270c3d (patch)
tree5e4905e795ae0d566e0f64b0cc368d7422652e87 /OpenAL32/Include/alListener.h
parentc25433986ae52e65fc5549c487be6d074d9b0bb9 (diff)
Fix compiling problems on VS2019 with vc142 toolset
Msvc142 in VS2019 preview 2 doesn't allow std::atomic_flag to be initialized by a bool. Call test_and_set in the constructors instead.
Diffstat (limited to 'OpenAL32/Include/alListener.h')
-rw-r--r--OpenAL32/Include/alListener.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenAL32/Include/alListener.h b/OpenAL32/Include/alListener.h
index 0aa28a46..7b5b8b20 100644
--- a/OpenAL32/Include/alListener.h
+++ b/OpenAL32/Include/alListener.h
@@ -30,7 +30,7 @@ struct ALlistener {
std::array<ALfloat,3> OrientUp{{0.0f, 1.0f, 0.0f}};
ALfloat Gain{1.0f};
- std::atomic_flag PropsClean{true};
+ std::atomic_flag PropsClean;
/* Pointer to the most recent property values that are awaiting an update.
*/
@@ -50,6 +50,8 @@ struct ALlistener {
ALboolean SourceDistanceModel;
DistanceModel mDistanceModel;
} Params;
+
+ ALlistener() { PropsClean.test_and_set(); }
};
void UpdateListenerProps(ALCcontext *context);