]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
DDS: properly count miplevels for 1x1 textures too when DDS saving
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 Sep 2011 04:56:31 +0000 (04:56 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 Sep 2011 04:56:31 +0000 (04:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11369 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c

index e7d44437a93f1ba10372f9a659d25c4cc0d0c531..00a9c33d7e9355257bf27ca78e1df05669a5e3b0 100644 (file)
@@ -1941,7 +1941,7 @@ int R_SaveTextureDDSFile(rtexture_t *rt, const char *filename, qboolean skipunco
        mipinfo[0][0] = glt->tilewidth;
        mipinfo[0][1] = glt->tileheight;
        mipmaps = 1;
-       if (glt->flags & TEXF_MIPMAP)
+       if ((glt->flags & TEXF_MIPMAP) && !(glt->tilewidth == 1 && glt->tilewidth == 1))
        {
                for (mip = 1;mip < 16;mip++)
                {