(svn r22827) -Codechange: pass the/a more proper sub directory when opening (some) files instead of the default one

This commit is contained in:
rubidium
2011-08-24 13:53:34 +00:00
parent 8e5f433b22
commit b4edc30c64
5 changed files with 8 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ static bool OpenPNGFile(const char *filename, uint32 id, bool mask)
/* Add path separator after 'sprites' if not present */
const char *sep = (filename[0] == PATHSEPCHAR) ? "" : PATHSEP;
snprintf(png_file, sizeof(png_file), "sprites%s%s" PATHSEP "%d%s.png", sep, filename, id, mask ? "m" : "");
if (FioCheckFileExists(png_file)) {
if (FioCheckFileExists(png_file, NEWGRF_DIR)) {
FioOpenFile(PNG_SLOT, png_file, NEWGRF_DIR);
return true;
}