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
|
// Load Font
|
||||||
static CFont *pDefaultFont = 0;
|
static CFont *pDefaultFont = 0;
|
||||||
char aFilename[512];
|
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 ||
|
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)
|
str_find(g_Config.m_ClLanguagefile, "korean") != NULL)
|
||||||
fontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
pFontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||||
IOHANDLE File = Storage()->OpenFile(fontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
IOHANDLE File = Storage()->OpenFile(pFontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||||
if(File)
|
if(File)
|
||||||
{
|
{
|
||||||
io_close(File);
|
io_close(File);
|
||||||
|
@ -1167,7 +1167,7 @@ void CMenus::RenderLanguageSelection(CUIRect MainView)
|
||||||
TextRender()->SetDefaultFont(pDefaultFont);
|
TextRender()->SetDefaultFont(pDefaultFont);
|
||||||
}
|
}
|
||||||
if(!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
|
// load default font
|
||||||
static CFont *pDefaultFont = 0;
|
static CFont *pDefaultFont = 0;
|
||||||
char aFilename[512];
|
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 ||
|
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)
|
str_find(g_Config.m_ClLanguagefile, "korean") != NULL)
|
||||||
fontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
pFontFile = "fonts/DejavuWenQuanYiMicroHei.ttf";
|
||||||
IOHANDLE File = Storage()->OpenFile(fontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
IOHANDLE File = Storage()->OpenFile(pFontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||||
if(File)
|
if(File)
|
||||||
{
|
{
|
||||||
io_close(File);
|
io_close(File);
|
||||||
|
@ -306,7 +306,7 @@ void CGameClient::OnInit()
|
||||||
TextRender()->SetDefaultFont(pDefaultFont);
|
TextRender()->SetDefaultFont(pDefaultFont);
|
||||||
}
|
}
|
||||||
if(!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
|
// init all components
|
||||||
for(int i = m_All.m_Num-1; i >= 0; --i)
|
for(int i = m_All.m_Num-1; i >= 0; --i)
|
||||||
|
|
Loading…
Reference in a new issue