]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fs.c
cmd: Dynamically allocate the command interpreters
[xonotic/darkplaces.git] / fs.c
diff --git a/fs.c b/fs.c
index 58e9de4ba2828ebd21d5868778db6375682e86f4..87c5df4accacaa479f96ab0e2ebf5e4ca565fa84 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -535,7 +535,7 @@ static qbool PK3_OpenLibrary (void)
                return true;
 
        // Load the DLL
-       return Sys_LoadLibrary (dllnames, &zlib_dll, zlibfuncs);
+       return Sys_LoadDependency (dllnames, &zlib_dll, zlibfuncs);
 #endif
 }
 
@@ -1574,15 +1574,15 @@ qbool FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qbool compl
 
        if (cls.demoplayback)
        {
-               CL_Disconnect_f(&cmd_client);
+               CL_Disconnect_f(cmd_client);
                cls.demonum = 0;
        }
 
        // unload all sounds so they will be reloaded from the new files as needed
-       S_UnloadAllSounds_f(&cmd_client);
+       S_UnloadAllSounds_f(cmd_client);
 
        // restart the video subsystem after the config is executed
-       Cbuf_InsertText(&cmd_client, "\nloadconfig\nvid_restart\n\n");
+       Cbuf_InsertText(cmd_client, "\nloadconfig\nvid_restart\n\n");
 
        return true;
 }
@@ -1823,7 +1823,7 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
                break;
        case USERDIRMODE_MYGAMES:
                if (!shfolder_dll)
-                       Sys_LoadLibrary(shfolderdllnames, &shfolder_dll, shfolderfuncs);
+                       Sys_LoadDependency(shfolderdllnames, &shfolder_dll, shfolderfuncs);
                mydocsdir[0] = 0;
                if (qSHGetFolderPath && qSHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdir) == S_OK)
                {
@@ -1849,9 +1849,9 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
                return -1;
        case USERDIRMODE_SAVEDGAMES:
                if (!shell32_dll)
-                       Sys_LoadLibrary(shell32dllnames, &shell32_dll, shell32funcs);
+                       Sys_LoadDependency(shell32dllnames, &shell32_dll, shell32funcs);
                if (!ole32_dll)
-                       Sys_LoadLibrary(ole32dllnames, &ole32_dll, ole32funcs);
+                       Sys_LoadDependency(ole32dllnames, &ole32_dll, ole32funcs);
                if (qSHGetKnownFolderPath && qCoInitializeEx && qCoTaskMemFree && qCoUninitialize)
                {
                        savedgamesdir[0] = 0;