mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
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:
committed by
David Reid
parent
9bafb7fc2c
commit
92f3644011
+2
-2
@@ -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. */
|
||||||
|
|||||||
Reference in New Issue
Block a user