Skip to content

Commit 035784c

Browse files
committed
cl_main: do not error on font registration in tty client
Do not error on font registration in tty client, RE_RegisterFont() is a stub always returning nullptr.
1 parent cecc3df commit 035784c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/engine/client/cl_main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,6 @@ bool CL_InitRenderer()
20932093
return false;
20942094
}
20952095

2096-
fileHandle_t f;
2097-
20982096
// this sets up the renderer and calls R_Init
20992097
if ( !re.BeginRegistration( &cls.windowConfig ) )
21002098
{
@@ -2105,6 +2103,9 @@ bool CL_InitRenderer()
21052103
cl_consoleFontSize = Cvar_Get( "cl_consoleFontSize", "16", CVAR_LATCH );
21062104
cl_consoleFontScaling = Cvar_Get( "cl_consoleFontScaling", "1", CVAR_LATCH );
21072105

2106+
#if defined(BUILD_GRAPHICAL_CLIENT)
2107+
fileHandle_t f;
2108+
21082109
// Register console font specified by cl_consoleFont, if any
21092110
// filehandle is unused but forces FS_FOpenFileRead() to heed purecheck because it does not when filehandle is nullptr
21102111
if ( cl_consoleFont->string[0] )
@@ -2144,6 +2145,7 @@ bool CL_InitRenderer()
21442145

21452146
FS_FCloseFile( f );
21462147
}
2148+
#endif
21472149

21482150
cls.whiteShader = re.RegisterShader( "white", RSF_NOMIP );
21492151

0 commit comments

Comments
 (0)