return true;
// Load the DLL
- return Sys_LoadLibrary (dllnames, &zlib_dll, zlibfuncs);
+ return Sys_LoadDependency (dllnames, &zlib_dll, zlibfuncs);
#endif
}
{
const char *separator, *backslash, *colon, *dot;
+ dot = strrchr(in, '.');
+ if (dot == NULL)
+ return "";
+
separator = strrchr(in, '/');
backslash = strrchr(in, '\\');
if (!separator || separator < backslash)
if (!separator || separator < colon)
separator = colon;
- dot = strrchr(in, '.');
- if (dot == NULL || (separator && (dot < separator)))
+ if (separator && (dot < separator))
return "";
return dot + 1;
}
}
- Host_SaveConfig();
+ Host_SaveConfig(CONFIGFILENAME);
fs_numgamedirs = numgamedirs;
for (i = 0;i < fs_numgamedirs;i++)
if (cls.demoplayback)
{
- CL_Disconnect_f(&cmd_client);
+ CL_Disconnect();
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_local);
// restart the video subsystem after the config is executed
- Cbuf_InsertText(&cmd_client, "\nloadconfig\nvid_restart\n\n");
+ Cbuf_InsertText(cmd_local, "\nloadconfig\nvid_restart\n\n");
return true;
}
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)
{
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;
return false;
}
+/*
+====================
+FS_SanitizePath
+
+Sanitize path (replace non-portable characters
+with portable ones in-place, etc)
+====================
+*/
+void FS_SanitizePath(char *path)
+{
+ for (; *path; path++)
+ if (*path == '\\')
+ *path = '/';
+}
/*
====================