From: cloudwalk Date: Mon, 25 May 2020 13:59:09 +0000 (+0000) Subject: Don't continue loading image if we already have it cached. Fix mapshot caching X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=38adc57602a2d9a03c6f6f8d2e5cc91c14a6bd9e;p=xonotic%2Fdarkplaces.git Don't continue loading image if we already have it cached. Fix mapshot caching 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 --- diff --git a/jpeg.c b/jpeg.c index 939751fb..8eeb6d7b 100644 --- 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