aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-05 12:46:02 -0700
committerChris Robinson <[email protected]>2017-04-05 12:46:02 -0700
commit37f666fbabad7db69a0604e4d38181d79c0dbc05 (patch)
tree0841a0be567e90d20041c4666eed7584a3d8e009 /Alc/hrtf.c
parent2eaa10fc213dd60b197129da17b431b3d7e9f1d5 (diff)
Fix an incorrect message
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r--Alc/hrtf.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 4394cf56..47db6bcf 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -633,21 +633,24 @@ static void AddFileEntry(vector_EnumeratedHrtf *list, const_al_string filename)
}
#undef MATCH_FNAME
- TRACE("Skipping load of already-loaded file %s\n", alstr_get_cstr(filename));
- goto skip_load;
+ break;
}
loaded_entry = loaded_entry->next;
}
- loaded_entry = al_calloc(DEF_ALIGN,
- offsetof(struct HrtfEntry, filename[alstr_length(filename)+1])
- );
- loaded_entry->next = LoadedHrtfs;
- loaded_entry->handle = NULL;
- strcpy(loaded_entry->filename, alstr_get_cstr(filename));
- LoadedHrtfs = loaded_entry;
+ if(!loaded_entry)
+ {
+ TRACE("Got new file \"%s\"\n", alstr_get_cstr(filename));
+
+ loaded_entry = al_calloc(DEF_ALIGN,
+ offsetof(struct HrtfEntry, filename[alstr_length(filename)+1])
+ );
+ loaded_entry->next = LoadedHrtfs;
+ loaded_entry->handle = NULL;
+ strcpy(loaded_entry->filename, alstr_get_cstr(filename));
+ LoadedHrtfs = loaded_entry;
+ }
-skip_load:
/* TODO: Get a human-readable name from the HRTF data (possibly coming in a
* format update). */
name = strrchr(alstr_get_cstr(filename), '/');