Changeset - r14632:2ebcc5e64329
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2010-02-23 15:51:26
rubidium@openttd.org
(svn r19219) -Fix: having OpenMSX's files in a subdirectory did not work as it should.
1 file changed with 13 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/music.cpp
Show inline comments
 
@@ -70,7 +70,19 @@ bool MusicSet::FillSetDetails(IniFile *i
 
				continue;
 
			}
 

	
 
			IniItem *item = names->GetItem(filename, false);
 
			IniItem *item = NULL;
 
			/* As we possibly add a path to the filename and we compare
 
			 * on the filename with the path as in the .obm, we need to
 
			 * keep stripping path elements until we find a match. */
 
			for (const char *p = filename; p != NULL; p = strchr(p, PATHSEPCHAR)) {
 
				/* Remove possible double path separator characters from
 
				 * the beginning, so we don't start reading e.g. root. */
 
				while (*p == PATHSEPCHAR) p++;
 

	
 
				item = names->GetItem(p, false);
 
				if (item != NULL && !StrEmpty(item->value)) break;
 
			}
 

	
 
			if (item == NULL || StrEmpty(item->value)) {
 
				DEBUG(grf, 0, "Base music set song name missing: %s", filename);
 
				return false;
0 comments (0 inline, 0 general)