mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Show an error message on missing file
This commit is contained in:
parent
277040fc7c
commit
aeb8bcbd9a
|
@ -113,7 +113,17 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
|||
else
|
||||
{
|
||||
char aBuf[MAX_PATH_LENGTH];
|
||||
m_ServerProcess.Process = shell_execute(Storage()->GetBinaryPath(PLAT_SERVER_EXEC, aBuf, sizeof(aBuf)));
|
||||
Storage()->GetBinaryPath(PLAT_SERVER_EXEC, aBuf, sizeof(aBuf));
|
||||
IOHANDLE File = io_open(aBuf, IOFLAG_READ);
|
||||
if(File)
|
||||
{
|
||||
io_close(File);
|
||||
m_ServerProcess.Process = shell_execute(PLAT_SERVER_EXEC);
|
||||
}
|
||||
else
|
||||
{
|
||||
PopupWarning(Localize("Warning"), Localize("Server executable not found, can't run server"), Localize("Ok"), 10000000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -632,7 +632,7 @@ void CGameClient::OnRender()
|
|||
{
|
||||
if(m_pMenus->CanDisplayWarning())
|
||||
{
|
||||
m_pMenus->PopupWarning("Warning!", pWarning->m_aWarningMsg, "Ok", 10000000);
|
||||
m_pMenus->PopupWarning(Localize("Warning"), pWarning->m_aWarningMsg, "Ok", 10000000);
|
||||
|
||||
pWarning->m_WasShown = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue