mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- fixed Linux IWAD search thanks to a suggestion by Chris on the forum. Moved the search macros to i_system.h for both platforms. Neither are compatible with the other. This can be improved upon later, but for now, at least the major compile issue is fixed.
This commit is contained in:
parent
b8c0e78c91
commit
b7d26b3fa1
3 changed files with 9 additions and 9 deletions
|
@ -414,12 +414,6 @@ 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 *handle;
|
||||
|
@ -432,18 +426,18 @@ void FIWadManager::AddIWADCandidates(const char *dir)
|
|||
{
|
||||
if (!(I_FindAttr(&findstate) & FA_DIREC))
|
||||
{
|
||||
auto p = strrchr(ENTRYNAME, '.');
|
||||
auto p = strrchr(FS_ENTRYNAME, '.');
|
||||
if (p != nullptr)
|
||||
{
|
||||
// special IWAD extension.
|
||||
if (!stricmp(p, ".iwad") || !stricmp(p, ".ipk3") || !stricmp(p, "ipk7"))
|
||||
{
|
||||
mFoundWads.Push(FFoundWadInfo{ slasheddir + ENTRYNAME, "", -1 });
|
||||
mFoundWads.Push(FFoundWadInfo{ slasheddir + FS_ENTRYNAME, "", -1 });
|
||||
}
|
||||
}
|
||||
for (auto &name : mIWadNames)
|
||||
{
|
||||
if (!stricmp(name, ENTRYNAME))
|
||||
if (!stricmp(name, FS_ENTRYNAME))
|
||||
{
|
||||
mFoundWads.Push(FFoundWadInfo{ slasheddir + name, "", -1 });
|
||||
}
|
||||
|
|
|
@ -178,4 +178,7 @@ static inline char *strlwr(char *str)
|
|||
return str;
|
||||
}
|
||||
|
||||
// for the IWAD handling
|
||||
#define FS_ENTRYNAME findstate.namelist[findstate.current]->d_name
|
||||
|
||||
#endif
|
||||
|
|
|
@ -193,4 +193,7 @@ int I_FindClose (void *handle);
|
|||
#define FA_DIREC 0x00000010
|
||||
#define FA_ARCH 0x00000020
|
||||
|
||||
// for the IWAD handling
|
||||
#define FS_ENTRYNAME findstate.Name
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue