]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - jpeg.c
Updated a few entries in the todo file
[xonotic/darkplaces.git] / jpeg.c
diff --git a/jpeg.c b/jpeg.c
index 964b170c4c5a6b107d7bed05e1c0d930c58bb0d8..45a2c32b56040932b2e501eca6bf62d383cf6c83 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -395,25 +395,25 @@ Try to load the JPEG DLL
 */
 qboolean JPEG_OpenLibrary (void)
 {
-       const char* dllname;
-
-       // Already loaded?
-       if (jpeg_dll)
-               return true;
-
-// TODO: make Sys_LoadLibrary support multiple names
+       const char* dllnames [] =
+       {
 #ifdef WIN32
-       dllname = "libjpeg.dll";
-#elif defined(__FreeBSD__)
-       dllname = "libjpeg.so";
+               "libjpeg.dll",
 #elif defined(MACOSX)
-       dllname = "libjpeg.62.dylib";
+               "libjpeg.62.dylib",
 #else
-       dllname = "libjpeg.so.62";
+               "libjpeg.so.62",
+               "libjpeg.so",
 #endif
+               NULL
+       };
+
+       // Already loaded?
+       if (jpeg_dll)
+               return true;
 
        // Load the DLL
-       if (! Sys_LoadLibrary (dllname, &jpeg_dll, jpegfuncs))
+       if (! Sys_LoadLibrary (dllnames, &jpeg_dll, jpegfuncs))
        {
                Con_Printf ("JPEG support disabled\n");
                return false;
@@ -671,7 +671,7 @@ qboolean JPEG_SaveImage_preflipped (const char *filename, int width, int height,
        }
 
        // Open the file
-       file = FS_Open (filename, "wb", true);
+       file = FS_Open (filename, "wb", true, false);
        if (!file)
                return false;