denormals: fix inverted logic in ma_device_{disable,restore}_denormals

It was only disabling denormals when "noDisableDenormals" was set, which
is the opposite of what was intended.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
Steven Noonan
2021-07-19 18:51:17 -07:00
committed by David Reid
parent 9bafb7fc2c
commit 92f3644011
+2 -2
View File
@@ -14903,7 +14903,7 @@ static MA_INLINE unsigned int ma_device_disable_denormals(ma_device* pDevice)
{ {
MA_ASSERT(pDevice != NULL); MA_ASSERT(pDevice != NULL);
if (pDevice->noDisableDenormals) { if (!pDevice->noDisableDenormals) {
return ma_disable_denormals(); return ma_disable_denormals();
} else { } else {
return 0; return 0;
@@ -14914,7 +14914,7 @@ static MA_INLINE void ma_device_restore_denormals(ma_device* pDevice, unsigned i
{ {
MA_ASSERT(pDevice != NULL); MA_ASSERT(pDevice != NULL);
if (pDevice->noDisableDenormals) { if (!pDevice->noDisableDenormals) {
ma_restore_denormals(prevState); ma_restore_denormals(prevState);
} else { } else {
/* Do nothing. */ /* Do nothing. */