Skip to content

Commit b61e6ba

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 ef93748 commit b61e6ba

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
@@ -2097,8 +2097,6 @@ bool CL_InitRenderer()
20972097
return false;
20982098
}
20992099

2100-
fileHandle_t f;
2101-
21022100
// this sets up the renderer and calls R_Init
21032101
if ( !re.BeginRegistration( &cls.windowConfig ) )
21042102
{
@@ -2109,6 +2107,9 @@ bool CL_InitRenderer()
21092107
cl_consoleFontSize = Cvar_Get( "cl_consoleFontSize", "16", CVAR_LATCH );
21102108
cl_consoleFontScaling = Cvar_Get( "cl_consoleFontScaling", "1", CVAR_LATCH );
21112109

2110+
#if defined(BUILD_GRAPHICAL_CLIENT)
2111+
fileHandle_t f;
2112+
21122113
// Register console font specified by cl_consoleFont, if any
21132114
// filehandle is unused but forces FS_FOpenFileRead() to heed purecheck because it does not when filehandle is nullptr
21142115
if ( cl_consoleFont->string[0] )
@@ -2148,6 +2149,7 @@ bool CL_InitRenderer()
21482149

21492150
FS_FCloseFile( f );
21502151
}
2152+
#endif
21512153

21522154
cls.whiteShader = re.RegisterShader( "white", RSF_NOMIP );
21532155

0 commit comments

Comments
 (0)