]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Don't continue loading image if we already have it cached. Fix mapshot caching
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 May 2020 13:59:09 +0000 (13:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 May 2020 13:59:09 +0000 (13:59 +0000)
From Slava: "Previously engine wasn't using cached mapshots, so it was reloading
mapshot everytime."

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12574 d7cf8633-e32d-0410-b094-e92efae38249

jpeg.c

diff --git a/jpeg.c b/jpeg.c
index 939751fb4394f22a1ca222a819ec7cbb5b5e76c6..8eeb6d7b008fc41640ec3240c052abee0a8547af 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -1065,6 +1065,7 @@ qboolean Image_Compress(const char *imagename, size_t maxsize, void **buf, size_
        {
                *size = i->compressed_size;
                *buf = i->compressed;
+        return (*buf != NULL);
        }
 
        // load the image