mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
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
2 changed files with 9 additions and 7 deletions
|
@ -332,8 +332,9 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
|||
return FS_NOTFOUND;
|
||||
}
|
||||
|
||||
boolean preparefilemenu(void)
|
||||
boolean preparefilemenu(boolean samedepth)
|
||||
{
|
||||
(void)samedepth;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -388,8 +389,9 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
|||
return FS_NOTFOUND;
|
||||
}
|
||||
|
||||
boolean preparefilemenu(void)
|
||||
boolean preparefilemenu(boolean samedepth)
|
||||
{
|
||||
(void)samedepth;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
@ -504,7 +506,7 @@ char exttable[NUM_EXT_TABLE][5] = {
|
|||
|
||||
char filenamebuf[MAX_WADFILES][MAX_WADPATH];
|
||||
|
||||
boolean preparefilemenu(boolean samemenu)
|
||||
boolean preparefilemenu(boolean samedepth)
|
||||
{
|
||||
DIR *dirhandle;
|
||||
struct dirent *dent;
|
||||
|
@ -512,7 +514,7 @@ boolean preparefilemenu(boolean samemenu)
|
|||
size_t pos = 0, folderpos = 0, numfolders = 0;
|
||||
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
|
||||
|
||||
for (; sizedirmenu > 0; sizedirmenu--)
|
||||
|
@ -567,7 +569,7 @@ boolean preparefilemenu(boolean samemenu)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (menudepthleft != menudepth-1)
|
||||
if (menudepthleft != menudepth-1) // Make room for UP... entry
|
||||
{
|
||||
numfolders++;
|
||||
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...");
|
||||
|
||||
menupath[menupathindex[menudepthleft]] = 0;
|
||||
|
|
|
@ -78,6 +78,6 @@ typedef enum
|
|||
REFRESHDIR_MAX = 16
|
||||
} refreshdir_enum;
|
||||
|
||||
boolean preparefilemenu(boolean samemenu);
|
||||
boolean preparefilemenu(boolean samedepth);
|
||||
|
||||
#endif // __FILESRCH_H__
|
||||
|
|
Loading…
Reference in a new issue