Skip to content

Commit

Permalink
engine: client: console: add conback.dds by request, don't fail on te…
Browse files Browse the repository at this point in the history
…xture that cannot be loaded
  • Loading branch information
a1batross committed Jul 6, 2024
1 parent b4376a6 commit 40af058
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion engine/client/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;
Expand Down

0 comments on commit 40af058

Please sign in to comment.