mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fix compile warning
This commit is contained in:
parent
26a1a9f331
commit
ff1c6705d6
|
@ -1155,11 +1155,11 @@ void CMenus::RenderLanguageSelection(CUIRect MainView)
|
|||
// Load Font
|
||||
static CFont *pDefaultFont = 0;
|
||||
char aFilename[512];
|
||||
char *fontFile = "fonts/DejaVuSansCJKName.ttf";
|
||||
const char *pFontFile = "fonts/DejaVuSansCJKName.ttf";
|
||||
if (str_find(g_Config.m_ClLanguagefile, "chinese") != NULL || str_find(g_Config.m_ClLanguagefile, "japanese") != NULL ||
|
||||
str_find(g_Config.m_ClLanguagefile, "korean") != NULL)
|
||||
fontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||
IOHANDLE File = Storage()->OpenFile(fontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
pFontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||
IOHANDLE File = Storage()->OpenFile(pFontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
if(File)
|
||||
{
|
||||
io_close(File);
|
||||
|
@ -1167,7 +1167,7 @@ void CMenus::RenderLanguageSelection(CUIRect MainView)
|
|||
TextRender()->SetDefaultFont(pDefaultFont);
|
||||
}
|
||||
if(!pDefaultFont)
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='%s'", fontFile);
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='%s'", pFontFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -294,11 +294,11 @@ void CGameClient::OnInit()
|
|||
// load default font
|
||||
static CFont *pDefaultFont = 0;
|
||||
char aFilename[512];
|
||||
char *fontFile = "fonts/DejaVuSansCJKName.ttf";
|
||||
const char *pFontFile = "fonts/DejaVuSansCJKName.ttf";
|
||||
if (str_find(g_Config.m_ClLanguagefile, "chinese") != NULL || str_find(g_Config.m_ClLanguagefile, "japanese") != NULL ||
|
||||
str_find(g_Config.m_ClLanguagefile, "korean") != NULL)
|
||||
fontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||
IOHANDLE File = Storage()->OpenFile(fontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
pFontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||
IOHANDLE File = Storage()->OpenFile(pFontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
if(File)
|
||||
{
|
||||
io_close(File);
|
||||
|
@ -306,7 +306,7 @@ void CGameClient::OnInit()
|
|||
TextRender()->SetDefaultFont(pDefaultFont);
|
||||
}
|
||||
if(!pDefaultFont)
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='%s'", fontFile);
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='%s'", pFontFile);
|
||||
|
||||
// init all components
|
||||
for(int i = m_All.m_Num-1; i >= 0; --i)
|
||||
|
|
Loading…
Reference in a new issue