diff options
author | Chris Robinson <[email protected]> | 2016-09-10 07:55:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-09-10 07:55:33 -0700 |
commit | f993fd0cefe5dd04c2c37d4c1cde191dfbf2c882 (patch) | |
tree | 17b6bd0e2725ae553744d499d6151943ce855891 /Alc | |
parent | ba449ccce5246031f481bf84b9dce4237553f628 (diff) |
Don't warn if the desired default HRTF is already first
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/hrtf.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |