Skip to content

Commit

Permalink
Clean up COM_FindFile debug prints a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Jul 21, 2024
1 parent df88e3e commit 9efccb6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Quake/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1908,13 +1908,19 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file,
}
}

if (strcmp(COM_FileGetExtension(filename), "pcx") != 0
&& strcmp(COM_FileGetExtension(filename), "tga") != 0
&& strcmp(COM_FileGetExtension(filename), "lit") != 0
&& strcmp(COM_FileGetExtension(filename), "vis") != 0
&& strcmp(COM_FileGetExtension(filename), "ent") != 0)
Con_DPrintf ("FindFile: can't find %s\n", filename);
else Con_DPrintf2("FindFile: can't find %s\n", filename);
if (developer.value)
{
const char *ext = COM_FileGetExtension (filename);

if (strcmp(ext, "pcx") != 0 &&
strcmp(ext, "tga") != 0 &&
strcmp(ext, "lit") != 0 &&
strcmp(ext, "vis") != 0 &&
strcmp(ext, "ent") != 0)
Con_DPrintf ("FindFile: can't find %s\n", filename);
else
Con_DPrintf2 ("FindFile: can't find %s\n", filename);
}

if (handle)
*handle = -1;
Expand Down

0 comments on commit 9efccb6

Please sign in to comment.