Ensure package plugins get their packages loaded/purged at appropriate times, without needing an extra fs_restart.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6101 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e89cc4dc5a
commit
df1e916717
1 changed files with 8 additions and 2 deletions
|
@ -16,7 +16,7 @@ void FS_BeginManifestUpdates(void);
|
||||||
static void QDECL fs_game_callback(cvar_t *var, char *oldvalue);
|
static void QDECL fs_game_callback(cvar_t *var, char *oldvalue);
|
||||||
static void COM_InitHomedir(ftemanifest_t *man);
|
static void COM_InitHomedir(ftemanifest_t *man);
|
||||||
hashtable_t filesystemhash;
|
hashtable_t filesystemhash;
|
||||||
static qboolean com_fschanged = true;
|
static qboolean com_fschanged = true, com_fsneedreload;
|
||||||
qboolean com_installer = false;
|
qboolean com_installer = false;
|
||||||
qboolean fs_readonly;
|
qboolean fs_readonly;
|
||||||
int waitingformanifest;
|
int waitingformanifest;
|
||||||
|
@ -38,6 +38,7 @@ static int fs_referencetype;
|
||||||
int fs_finds;
|
int fs_finds;
|
||||||
void COM_CheckRegistered (void);
|
void COM_CheckRegistered (void);
|
||||||
void Mods_FlushModList(void);
|
void Mods_FlushModList(void);
|
||||||
|
static void FS_ReloadPackFilesFlags(unsigned int reloadflags);
|
||||||
static qboolean Sys_SteamHasFile(char *basepath, int basepathlen, char *steamdir, char *fname);
|
static qboolean Sys_SteamHasFile(char *basepath, int basepathlen, char *steamdir, char *fname);
|
||||||
searchpathfuncs_t *FS_OpenPackByExtension(vfsfile_t *f, searchpathfuncs_t *parent, const char *filename, const char *pakname);
|
searchpathfuncs_t *FS_OpenPackByExtension(vfsfile_t *f, searchpathfuncs_t *parent, const char *filename, const char *pakname);
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ int FS_RegisterFileSystemType(void *module, const char *extension, searchpathfun
|
||||||
searchpathformats[i].OpenNew = OpenNew;
|
searchpathformats[i].OpenNew = OpenNew;
|
||||||
searchpathformats[i].loadscan = loadscan;
|
searchpathformats[i].loadscan = loadscan;
|
||||||
com_fschanged = true;
|
com_fschanged = true;
|
||||||
|
com_fsneedreload = true;
|
||||||
|
|
||||||
return i+1;
|
return i+1;
|
||||||
}
|
}
|
||||||
|
@ -92,6 +94,7 @@ void FS_UnRegisterFileSystemType(int idx)
|
||||||
searchpathformats[idx-1].OpenNew = NULL;
|
searchpathformats[idx-1].OpenNew = NULL;
|
||||||
searchpathformats[idx-1].module = NULL;
|
searchpathformats[idx-1].module = NULL;
|
||||||
com_fschanged = true;
|
com_fschanged = true;
|
||||||
|
com_fsneedreload = true;
|
||||||
|
|
||||||
//FS_Restart will be needed
|
//FS_Restart will be needed
|
||||||
}
|
}
|
||||||
|
@ -1385,6 +1388,8 @@ static void FS_RebuildFSHash(qboolean domutex)
|
||||||
if (domutex && !Sys_LockMutex(fs_thread_mutex))
|
if (domutex && !Sys_LockMutex(fs_thread_mutex))
|
||||||
return; //amg!
|
return; //amg!
|
||||||
|
|
||||||
|
if (com_fsneedreload)
|
||||||
|
FS_ReloadPackFilesFlags(~0);
|
||||||
|
|
||||||
if (!filesystemhash.numbuckets)
|
if (!filesystemhash.numbuckets)
|
||||||
{
|
{
|
||||||
|
@ -1416,6 +1421,7 @@ static void FS_RebuildFSHash(qboolean domutex)
|
||||||
}
|
}
|
||||||
|
|
||||||
com_fschanged = false;
|
com_fschanged = false;
|
||||||
|
com_fsneedreload = false;
|
||||||
|
|
||||||
if (domutex)
|
if (domutex)
|
||||||
Sys_UnlockMutex(fs_thread_mutex);
|
Sys_UnlockMutex(fs_thread_mutex);
|
||||||
|
|
Loading…
Reference in a new issue