Fix cross-platform preparefilemenu's function signatures, and rename the one input it takes over-all to make more sense.
This commit is contained in:
parent
ca038e8fb6
commit
09b659c67a
|
@ -332,8 +332,9 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||||
return FS_NOTFOUND;
|
return FS_NOTFOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean preparefilemenu(void)
|
boolean preparefilemenu(boolean samedepth)
|
||||||
{
|
{
|
||||||
|
(void)samedepth;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,8 +389,9 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||||
return FS_NOTFOUND;
|
return FS_NOTFOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean preparefilemenu(void)
|
boolean preparefilemenu(boolean samedepth)
|
||||||
{
|
{
|
||||||
|
(void)samedepth;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -504,7 +506,7 @@ char exttable[NUM_EXT_TABLE][5] = {
|
||||||
|
|
||||||
char filenamebuf[MAX_WADFILES][MAX_WADPATH];
|
char filenamebuf[MAX_WADFILES][MAX_WADPATH];
|
||||||
|
|
||||||
boolean preparefilemenu(boolean samemenu)
|
boolean preparefilemenu(boolean samedepth)
|
||||||
{
|
{
|
||||||
DIR *dirhandle;
|
DIR *dirhandle;
|
||||||
struct dirent *dent;
|
struct dirent *dent;
|
||||||
|
@ -512,7 +514,7 @@ boolean preparefilemenu(boolean samemenu)
|
||||||
size_t pos = 0, folderpos = 0, numfolders = 0;
|
size_t pos = 0, folderpos = 0, numfolders = 0;
|
||||||
char *tempname = NULL;
|
char *tempname = NULL;
|
||||||
|
|
||||||
if (samemenu && dirmenu && dirmenu[dir_on[menudepthleft]])
|
if (samedepth && dirmenu && dirmenu[dir_on[menudepthleft]])
|
||||||
tempname = Z_StrDup(dirmenu[dir_on[menudepthleft]]+DIR_STRING); // don't need to I_Error if can't make - not important, just QoL
|
tempname = Z_StrDup(dirmenu[dir_on[menudepthleft]]+DIR_STRING); // don't need to I_Error if can't make - not important, just QoL
|
||||||
|
|
||||||
for (; sizedirmenu > 0; sizedirmenu--)
|
for (; sizedirmenu > 0; sizedirmenu--)
|
||||||
|
@ -567,7 +569,7 @@ boolean preparefilemenu(boolean samemenu)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menudepthleft != menudepth-1)
|
if (menudepthleft != menudepth-1) // Make room for UP... entry
|
||||||
{
|
{
|
||||||
numfolders++;
|
numfolders++;
|
||||||
sizedirmenu++;
|
sizedirmenu++;
|
||||||
|
@ -655,7 +657,7 @@ boolean preparefilemenu(boolean samemenu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menudepthleft != menudepth-1)
|
if (menudepthleft != menudepth-1) // now for UP... entry
|
||||||
dirmenu[0] = Z_StrDup("\1\5UP...");
|
dirmenu[0] = Z_StrDup("\1\5UP...");
|
||||||
|
|
||||||
menupath[menupathindex[menudepthleft]] = 0;
|
menupath[menupathindex[menudepthleft]] = 0;
|
||||||
|
|
|
@ -78,6 +78,6 @@ typedef enum
|
||||||
REFRESHDIR_MAX = 16
|
REFRESHDIR_MAX = 16
|
||||||
} refreshdir_enum;
|
} refreshdir_enum;
|
||||||
|
|
||||||
boolean preparefilemenu(boolean samemenu);
|
boolean preparefilemenu(boolean samedepth);
|
||||||
|
|
||||||
#endif // __FILESRCH_H__
|
#endif // __FILESRCH_H__
|
||||||
|
|
Loading…
Reference in New Issue