mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 21:43:40 +00:00
[client] only init ttf if fps is enabled
This commit is contained in:
parent
f2216168f4
commit
9590b58f0f
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user