commit a066000012f92f0e98610a6ae975af9f67f242d0
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sun Oct 21 20:00:54 2018 -0400
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Sun Oct 21 20:00:54 2018 -0400
music: Show message about filename-based substs.
We already show a message if substitutions are loaded from a config
file, so show a similar message as well if substitutions are found
based on filenames.
---
src/i_sdlmusic.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c
index 2cfb45aa..9e0c3ac7 100644
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -943,6 +943,7 @@ static void LoadSubstituteConfigs(void)
{
char *musicdir;
char *path;
+ unsigned int old_music_len;
unsigned int i;
// We can configure the path to music packs using the music_pack_path
@@ -978,6 +979,8 @@ static void LoadSubstituteConfigs(void)
subst_music_len);
}
+ old_music_len = subst_music_len;
+
// Add entries from known filenames list. We add this after those from the
// configuration files, so that the entries here can be overridden.
for (i = 0; i < arrlen(known_filenames); ++i)
@@ -986,6 +989,12 @@ static void LoadSubstituteConfigs(void)
known_filenames[i].filename);
}
+ if (subst_music_len > old_music_len)
+ {
+ printf("Configured %i music substitutions based on filename.\n",
+ subst_music_len - old_music_len);
+ }
+
free(musicdir);
}