mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- fixed Linux and macOS implementations of I_FindAttr()
At the moment, we assume that dirent struct has d_type member, and DT_DIR is defined This is true for supported versions of macOS, and Linux with glibc https://forum.zdoom.org/viewtopic.php?t=66945
This commit is contained in:
parent
07bc5d233e
commit
8a0581481b
2 changed files with 2 additions and 16 deletions
|
@ -254,14 +254,7 @@ int I_FindClose(void* const handle)
|
||||||
int I_FindAttr(findstate_t* const fileinfo)
|
int I_FindAttr(findstate_t* const fileinfo)
|
||||||
{
|
{
|
||||||
dirent* const ent = fileinfo->namelist[fileinfo->current];
|
dirent* const ent = fileinfo->namelist[fileinfo->current];
|
||||||
bool isdir;
|
return (ent->d_type & DT_DIR) ? FA_DIREC : 0;
|
||||||
|
|
||||||
if (DirEntryExists(ent->d_name, &isdir))
|
|
||||||
{
|
|
||||||
return isdir ? FA_DIREC : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -366,14 +366,7 @@ int I_FindClose (void *handle)
|
||||||
int I_FindAttr(findstate_t* const fileinfo)
|
int I_FindAttr(findstate_t* const fileinfo)
|
||||||
{
|
{
|
||||||
dirent* const ent = fileinfo->namelist[fileinfo->current];
|
dirent* const ent = fileinfo->namelist[fileinfo->current];
|
||||||
bool isdir;
|
return (ent->d_type & DT_DIR) ? FA_DIREC : 0;
|
||||||
|
|
||||||
if (DirEntryExists(ent->d_name, &isdir))
|
|
||||||
{
|
|
||||||
return isdir ? FA_DIREC : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_PutInClipboard (const char *str)
|
void I_PutInClipboard (const char *str)
|
||||||
|
|
Loading…
Reference in a new issue