mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1158 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7e15a10908
commit
52cf05a012
1 changed files with 13 additions and 7 deletions
|
@ -733,16 +733,17 @@ void polymost_glreset()
|
||||||
cacheindexptr = Bfopen(tempbuf, "at");
|
cacheindexptr = Bfopen(tempbuf, "at");
|
||||||
if (!cacheindexptr)
|
if (!cacheindexptr)
|
||||||
{
|
{
|
||||||
|
glusetexcache = 0;
|
||||||
initprintf("Unable to open cache index!\n");
|
initprintf("Unable to open cache index!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cachefilehandle = openfrompath(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_CREAT|BO_APPEND|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||||
|
|
||||||
if (cachefilehandle < 0)
|
if (cachefilehandle < 0)
|
||||||
{
|
{
|
||||||
glusetexcache = 0;
|
glusetexcache = 0;
|
||||||
initprintf("Unable to open cache file!\n");
|
initprintf("Unable to open cache file! %s\n",strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -920,7 +921,7 @@ void polymost_glinit()
|
||||||
bglEnableClientState(GL_VERTEX_ARRAY);
|
bglEnableClientState(GL_VERTEX_ARRAY);
|
||||||
bglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
bglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
if (cachefilehandle != -1)
|
if (cachefilehandle > -1)
|
||||||
Bclose(cachefilehandle);
|
Bclose(cachefilehandle);
|
||||||
|
|
||||||
if (cacheindexptr)
|
if (cacheindexptr)
|
||||||
|
@ -937,14 +938,15 @@ void polymost_glinit()
|
||||||
cacheindexptr = Bfopen(tempbuf, "at");
|
cacheindexptr = Bfopen(tempbuf, "at");
|
||||||
if (!cacheindexptr)
|
if (!cacheindexptr)
|
||||||
{
|
{
|
||||||
|
glusetexcache = 0;
|
||||||
initprintf("Unable to open cache index!\n");
|
initprintf("Unable to open cache index!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_CREAT|BO_APPEND|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! %s\n",strerror(errno));
|
||||||
glusetexcache = 0;
|
glusetexcache = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -980,13 +982,17 @@ void invalidatecache(void)
|
||||||
cacheindexptr = Bfopen(tempbuf, "wt");
|
cacheindexptr = Bfopen(tempbuf, "wt");
|
||||||
if (!cacheindexptr)
|
if (!cacheindexptr)
|
||||||
{
|
{
|
||||||
|
glusetexcache = 0;
|
||||||
initprintf("Unable to open cache index!\n");
|
initprintf("Unable to open cache index!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_TRUNC|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_CREAT|BO_TRUNC|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||||
|
|
||||||
if (cachefilehandle < 0)
|
if (cachefilehandle < 0)
|
||||||
initprintf("Unable to open cache file!\n");
|
{
|
||||||
|
glusetexcache = 0;
|
||||||
|
initprintf("Unable to open cache file! %s\n",strerror(errno));
|
||||||
|
}
|
||||||
HASH_init(&cacheH);
|
HASH_init(&cacheH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue