static SetupFileHash *artworkinfo_cache_old = NULL;
static SetupFileHash *artworkinfo_cache_new = NULL;
static SetupFileHash *optional_tokens_hash = NULL;
+static SetupFileHash *missing_file_hash = NULL;
static boolean use_artworkinfo_cache = TRUE;
static boolean update_artworkinfo_cache = FALSE;
// file functions
// ----------------------------------------------------------------------------
+static void WarnUsingFallback(char *filename)
+{
+ if (getHashEntry(missing_file_hash, filename) == NULL)
+ {
+ setHashEntry(missing_file_hash, filename, "");
+
+ Warn("cannot find artwork file '%s' (using fallback)", filename);
+ }
+}
+
static char *getLevelClassDescription(TreeInfo *ti)
{
int position = ti->sort_priority / 100;
{
free(filename);
- Warn("cannot find artwork file '%s' (using fallback)", basename);
+ WarnUsingFallback(basename);
// 6th try: look for fallback artwork in old default artwork directory
// (needed to prevent errors when trying to access unused artwork files)
{
free(filename);
- Warn("cannot find artwork file '%s' (using fallback)", basename);
+ WarnUsingFallback(basename);
// 6th try: look for fallback artwork in old default artwork directory
// (needed to prevent errors when trying to access unused artwork files)
{
free(filename);
- Warn("cannot find artwork file '%s' (using fallback)", basename);
+ WarnUsingFallback(basename);
// 6th try: look for fallback artwork in old default artwork directory
// (needed to prevent errors when trying to access unused artwork files)
return success;
}
+void InitMissingFileHash(void)
+{
+ if (missing_file_hash == NULL)
+ freeSetupFileHash(missing_file_hash);
+
+ missing_file_hash = newSetupFileHash();
+}
+
void InitTapeDirectory(char *level_subdir)
{
boolean new_tape_dir = !directoryExists(getTapeDir(level_subdir));