mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- fix linux compile
This commit is contained in:
parent
f3d31e055f
commit
b8c0e78c91
1 changed files with 10 additions and 4 deletions
|
@ -414,6 +414,12 @@ void FIWadManager::CollectSearchPaths()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define ENTRYNAME findstate.Name
|
||||||
|
#else
|
||||||
|
#define ENTRYNAME findstate.namelist[0]->d_name
|
||||||
|
#endif
|
||||||
|
|
||||||
void FIWadManager::AddIWADCandidates(const char *dir)
|
void FIWadManager::AddIWADCandidates(const char *dir)
|
||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
|
@ -426,18 +432,18 @@ void FIWadManager::AddIWADCandidates(const char *dir)
|
||||||
{
|
{
|
||||||
if (!(I_FindAttr(&findstate) & FA_DIREC))
|
if (!(I_FindAttr(&findstate) & FA_DIREC))
|
||||||
{
|
{
|
||||||
auto p = strrchr(findstate.Name, '.');
|
auto p = strrchr(ENTRYNAME, '.');
|
||||||
if (p != nullptr)
|
if (p != nullptr)
|
||||||
{
|
{
|
||||||
// special IWAD extension.
|
// special IWAD extension.
|
||||||
if (!stricmp(p, ".iwad") || !stricmp(p, ".ipk3") || !stricmp(p, "ipk7"))
|
if (!stricmp(p, ".iwad") || !stricmp(p, ".ipk3") || !stricmp(p, "ipk7"))
|
||||||
{
|
{
|
||||||
mFoundWads.Push(FFoundWadInfo{ slasheddir + findstate.Name, "", -1 });
|
mFoundWads.Push(FFoundWadInfo{ slasheddir + ENTRYNAME, "", -1 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto &name : mIWadNames)
|
for (auto &name : mIWadNames)
|
||||||
{
|
{
|
||||||
if (!stricmp(name, findstate.Name))
|
if (!stricmp(name, ENTRYNAME))
|
||||||
{
|
{
|
||||||
mFoundWads.Push(FFoundWadInfo{ slasheddir + name, "", -1 });
|
mFoundWads.Push(FFoundWadInfo{ slasheddir + name, "", -1 });
|
||||||
}
|
}
|
||||||
|
@ -744,4 +750,4 @@ const FIWADInfo *FIWadManager::FindIWAD(TArray<FString> &wadfiles, const char *i
|
||||||
}
|
}
|
||||||
I_SetIWADInfo();
|
I_SetIWADInfo();
|
||||||
return iwad_info;
|
return iwad_info;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue