mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Use Storage for opening autoexec_server.log
This commit is contained in:
parent
bb3509466a
commit
4ca4449ee4
|
@ -2072,7 +2072,7 @@ void CMenus::OnRender()
|
|||
// TODO: Maybe call this less often, or probably even cleaner, use econ
|
||||
if(!m_ServerProcess.Initialized)
|
||||
{
|
||||
IOHANDLE File = io_open("autoexec_server.log", IOFLAG_READ);
|
||||
IOHANDLE File = Storage()->OpenFile("autoexec_server.log", IOFLAG_READ, IStorage::TYPE_ALL);
|
||||
if(File)
|
||||
{
|
||||
m_ServerProcess.LineReader.Init(File);
|
||||
|
|
|
@ -53,6 +53,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
|||
{
|
||||
if(m_ServerProcess.Pid == -1)
|
||||
{
|
||||
Storage()->RemoveFile("autoexec_server.log", IStorage::TYPE_ALL);
|
||||
m_ServerProcess.Pid = shell_execute(PLAT_SERVER_EXEC);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue