From 92f3644011b887d0e7c6ecc82cb7a3cbf6db7783 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Mon, 19 Jul 2021 18:51:17 -0700 Subject: [PATCH] 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 --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 68ab8d93..0b01bdee 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -14903,7 +14903,7 @@ static MA_INLINE unsigned int ma_device_disable_denormals(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); - if (pDevice->noDisableDenormals) { + if (!pDevice->noDisableDenormals) { return ma_disable_denormals(); } else { return 0; @@ -14914,7 +14914,7 @@ static MA_INLINE void ma_device_restore_denormals(ma_device* pDevice, unsigned i { MA_ASSERT(pDevice != NULL); - if (pDevice->noDisableDenormals) { + if (!pDevice->noDisableDenormals) { ma_restore_denormals(prevState); } else { /* Do nothing. */