2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-10 21:09:07 +01:00

engine: client: console: add conback.dds by request, don't fail on texture that cannot be loaded

This commit is contained in:
Alibek Omarov 2024-07-06 22:29:55 +03:00
parent b4376a6a8c
commit 40af058406

View File

@ -2136,6 +2136,7 @@ void Con_CharEvent( int key )
static int Con_LoadSimpleConback( const char *name, int flags )
{
const char *paths[] = {
"gfx/shell/%s.dds",
"gfx/shell/%s.bmp",
"gfx/shell/%s.tga",
"cached/%s640",
@ -2149,7 +2150,12 @@ static int Con_LoadSimpleConback( const char *name, int flags )
Q_snprintf( path, sizeof( path ), paths[i], name );
if( g_fsapi.FileExists( path, false ))
return ref.dllFuncs.GL_LoadTexture( path, NULL, 0, flags );
{
int gl_texturenum = ref.dllFuncs.GL_LoadTexture( path, NULL, 0, flags );
if( gl_texturenum )
return gl_texturenum;
}
}
return 0;