Fix Windows compilation of lightmap_optimizer
This commit is contained in:
parent
3642f0c4c4
commit
24a11d295b
1 changed files with 9 additions and 7 deletions
|
@ -35,6 +35,7 @@
|
|||
#ifdef NL_OS_WINDOWS
|
||||
# include <windows.h>
|
||||
#else
|
||||
# define strnicmp NLMISC::strnicmp
|
||||
# include <dirent.h> /* for directories functions */
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
|
@ -72,7 +73,8 @@ void dir (const std::string &sFilter, std::vector<std::string> &sAllFiles, bool
|
|||
char sCurDir[MAX_PATH];
|
||||
sAllFiles.clear ();
|
||||
GetCurrentDirectory (MAX_PATH, sCurDir);
|
||||
hFind = FindFirstFile ("*"+sFilter.c_str(), &findData);
|
||||
std::string sFilterAsx = std::string("*") + sFilter;
|
||||
hFind = FindFirstFile (sFilterAsx.c_str(), &findData);
|
||||
while (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DWORD res = GetFileAttributes(findData.cFileName);
|
||||
|
@ -626,7 +628,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
outString(string("ERROR: lightmaps ")+sTmp2+"*.tga not all the same size\n");
|
||||
for (k = 0; k < (sint32)AllLightmapNames.size(); ++k)
|
||||
{
|
||||
if (NLMISC::strnicmp(AllLightmapNames[k].c_str(), sTmp2.c_str(), sTmp2.size()) == 0)
|
||||
if (strnicmp(AllLightmapNames[k].c_str(), sTmp2.c_str(), sTmp2.size()) == 0)
|
||||
{
|
||||
for (j = k+1; j < (sint32)AllLightmapNames.size(); ++j)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue