aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-10 07:55:33 -0700
committerChris Robinson <[email protected]>2016-09-10 07:55:33 -0700
commitf993fd0cefe5dd04c2c37d4c1cde191dfbf2c882 (patch)
tree17b6bd0e2725ae553744d499d6151943ce855891 /Alc/hrtf.c
parentba449ccce5246031f481bf84b9dce4237553f628 (diff)
Don't warn if the desired default HRTF is already first
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r--Alc/hrtf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 92a1acea..34070792 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -1051,16 +1051,16 @@ vector_HrtfEntry EnumerateHrtf(const_al_string devname)
/* Find the preferred HRTF and move it to the front of the list. */
#define FIND_ENTRY(i) (al_string_cmp_cstr((i)->name, defaulthrtf) == 0)
VECTOR_FIND_IF(iter, const HrtfEntry, list, FIND_ENTRY);
- if(iter != VECTOR_END(list) && iter != VECTOR_BEGIN(list))
+#undef FIND_ENTRY
+ if(iter == VECTOR_END(list))
+ WARN("Failed to find default HRTF \"%s\"\n", defaulthrtf);
+ else if(iter != VECTOR_BEGIN(list))
{
HrtfEntry entry = *iter;
memmove(&VECTOR_ELEM(list,1), &VECTOR_ELEM(list,0),
(iter-VECTOR_BEGIN(list))*sizeof(HrtfEntry));
VECTOR_ELEM(list,0) = entry;
}
- else
- WARN("Failed to find default HRTF \"%s\"\n", defaulthrtf);
-#undef FIND_ENTRY
}
return list;