mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1157 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9b7c2b2c4e
commit
7e15a10908
2 changed files with 16 additions and 8 deletions
|
@ -5791,13 +5791,13 @@ void uninitengine(void)
|
||||||
if (cachefilehandle > -1) Bclose(cachefilehandle);
|
if (cachefilehandle > -1) Bclose(cachefilehandle);
|
||||||
if (cacheindexptr != NULL) Bfclose(cacheindexptr);
|
if (cacheindexptr != NULL) Bfclose(cacheindexptr);
|
||||||
datextures = &firstcacheindex;
|
datextures = &firstcacheindex;
|
||||||
do
|
while (datextures->next)
|
||||||
{
|
{
|
||||||
index = datextures;
|
index = datextures;
|
||||||
datextures = datextures->next;
|
datextures = datextures->next;
|
||||||
|
if (index != &firstcacheindex)
|
||||||
Bfree(index);
|
Bfree(index);
|
||||||
}
|
}
|
||||||
while (datextures->next);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -740,20 +740,23 @@ void polymost_glreset()
|
||||||
cachefilehandle = openfrompath(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
cachefilehandle = openfrompath(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||||
|
|
||||||
if (cachefilehandle < 0)
|
if (cachefilehandle < 0)
|
||||||
|
{
|
||||||
|
glusetexcache = 0;
|
||||||
initprintf("Unable to open cache file!\n");
|
initprintf("Unable to open cache file!\n");
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
datextures = &firstcacheindex;
|
datextures = &firstcacheindex;
|
||||||
do
|
while (datextures->next)
|
||||||
{
|
{
|
||||||
i += datextures->len;
|
i += datextures->len;
|
||||||
datextures = datextures->next;
|
datextures = datextures->next;
|
||||||
}
|
}
|
||||||
while (datextures->next);
|
|
||||||
datextures = &firstcacheindex;
|
datextures = &firstcacheindex;
|
||||||
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
||||||
|
Blseek(cachefilehandle, 0, BSEEK_SET);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,19 +943,24 @@ void polymost_glinit()
|
||||||
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||||
|
|
||||||
if (cachefilehandle < 0)
|
if (cachefilehandle < 0)
|
||||||
|
{
|
||||||
initprintf("Unable to open cache file!\n");
|
initprintf("Unable to open cache file!\n");
|
||||||
|
glusetexcache = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
datextures = &firstcacheindex;
|
datextures = &firstcacheindex;
|
||||||
do
|
while (datextures->next)
|
||||||
{
|
{
|
||||||
i += datextures->len;
|
i += datextures->len;
|
||||||
datextures = datextures->next;
|
datextures = datextures->next;
|
||||||
}
|
}
|
||||||
while (datextures->next);
|
|
||||||
datextures = &firstcacheindex;
|
datextures = &firstcacheindex;
|
||||||
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
||||||
|
Blseek(cachefilehandle, 0, BSEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void invalidatecache(void)
|
void invalidatecache(void)
|
||||||
|
|
Loading…
Reference in a new issue