mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
filesystem: massively rework how scanning game directories work
* No more conversion from liblist.gam to gameinfo.txt. We are using liblist.gam directly now. gameinfo.txt being native format to Xash3D not only remains, it takes priority over liblist.gam. * Quake game directories now don't receive autogenerated gameinfo.txt. * Empty directories don't get gameinfo.txt either, finally making it easier to support HD addon folders. * If user still wishes to generate gameinfo.txt, there is now command fs_make_gameinfo that creates gameinfo.txt for currently running game. * No more creating empty folders for RoDir. They are now created on demand.
This commit is contained in:
@@ -134,7 +134,7 @@ static void FS_PopulateDirEntries( dir_t *dir, const char *path )
|
||||
}
|
||||
|
||||
stringlistinit( &list );
|
||||
listdirectory( &list, path );
|
||||
listdirectory( &list, path, false );
|
||||
if( !list.numstrings )
|
||||
{
|
||||
dir->numentries = DIRENTRY_EMPTY_DIRECTORY;
|
||||
@@ -225,7 +225,7 @@ static int FS_MaybeUpdateDirEntries( dir_t *dir, const char *path, const char *e
|
||||
int ret;
|
||||
|
||||
stringlistinit( &list );
|
||||
listdirectory( &list, path );
|
||||
listdirectory( &list, path, false );
|
||||
|
||||
if( list.numstrings == 0 ) // empty directory
|
||||
{
|
||||
@@ -421,7 +421,7 @@ static void FS_Search_DIR( searchpath_t *search, stringlist_t *list, const char
|
||||
}
|
||||
|
||||
stringlistinit( &dirlist );
|
||||
listdirectory( &dirlist, netpath );
|
||||
listdirectory( &dirlist, netpath, false );
|
||||
|
||||
Q_strncpy( temp, basepath, sizeof( temp ));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user