[client] only init ttf if fps is enabled
This commit is contained in:
1 parent
f2216168f4
commit
9590b58f0f
1 file changed
+12
-9
+12
-9
@@ -771,17 +771,20 @@ int run()
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (TTF_Init() < 0)
|
||||
if (params.showFPS)
|
||||
{
|
||||
DEBUG_ERROR("TTL_Init Failed");
|
||||
return -1;
|
||||
}
|
||||
if (TTF_Init() < 0)
|
||||
{
|
||||
DEBUG_ERROR("TTL_Init Failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
state.font = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeMono.ttf", 16);
|
||||
if (!state.font)
|
||||
{
|
||||
DEBUG_ERROR("TTL_OpenFont Failed");
|
||||
return -1;
|
||||
state.font = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeMono.ttf", 16);
|
||||
if (!state.font)
|
||||
{
|
||||
DEBUG_ERROR("TTL_OpenFont Failed");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
state.window = SDL_CreateWindow(
|
||||
|
||||
Reference in new issue
Block a user