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 e7d4443..00a9c33 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++)
                {