]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - jpeg.c
added Print versions of Printf functions and made all calls that do not need formatin...
[xonotic/darkplaces.git] / jpeg.c
diff --git a/jpeg.c b/jpeg.c
index 26c8318ee9bad5177550d4326ec765770c819916..c979fb14f48681494ad7af49c034281c22453f6f 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -414,7 +414,7 @@ qboolean JPEG_OpenLibrary (void)
        // Load the DLL
        if (! (jpeg_dll = Sys_LoadLibrary (dllname)))
        {
-               Con_Printf ("Can't find %s. JPEG support disabled\n", dllname);
+               Con_DPrintf("Can't find %s. JPEG support disabled\n", dllname);
                return false;
        }
 
@@ -422,12 +422,12 @@ qboolean JPEG_OpenLibrary (void)
        for (func = jpegfuncs; func && func->name != NULL; func++)
                if (!(*func->funcvariable = (void *) Sys_GetProcAddress (jpeg_dll, func->name)))
                {
-                       Con_Printf ("missing function \"%s\" - broken JPEG library!\n", func->name);
+                       Con_Printf("missing function \"%s\" - broken JPEG library!\n", func->name);
                        JPEG_CloseLibrary ();
                        return false;
                }
 
-       Con_Printf ("%s loaded. JPEG support enabled\n", dllname);
+       Con_DPrintf("%s loaded. JPEG support enabled\n", dllname);
        return true;
 }
 
@@ -678,7 +678,7 @@ qboolean JPEG_SaveImage_preflipped (const char *filename, int width, int height,
        // No DLL = no JPEGs
        if (!jpeg_dll)
        {
-               Con_Print("You need the libjpeg library to save JPEG images\n");
+               Con_Print("You need the libjpeg library to save JPEG images\n");
                return false;
        }
 
@@ -700,7 +700,7 @@ qboolean JPEG_SaveImage_preflipped (const char *filename, int width, int height,
        cinfo.in_color_space = JCS_RGB;
        cinfo.input_components = 3;
        qjpeg_set_defaults (&cinfo);
-       qjpeg_set_quality (&cinfo, 90, TRUE);  // 90% quality; FIXME: use a cvar
+       qjpeg_set_quality (&cinfo, scr_screenshot_jpeg_quality.value * 100, TRUE);
        qjpeg_start_compress (&cinfo, true);
 
        // Compress each scanline