mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
fixed Gui lock while deleting/reading demos. Closes #167
This commit is contained in:
parent
cbf07ffa57
commit
d4b145a8ee
|
@ -546,6 +546,11 @@ void CMenus::RenderDemoList(CUIRect MainView)
|
|||
const char *pError = Client()->DemoPlayer_Play(m_lDemos[s_SelectedItem].m_aFilename);
|
||||
if(pError)
|
||||
PopupMessage(Localize("Error"), str_comp(pError, "error loading demo") ? pError : Localize("error loading demo"), Localize("Ok"));
|
||||
else
|
||||
{
|
||||
UI()->SetActiveItem(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -556,10 +561,13 @@ void CMenus::RenderDemoList(CUIRect MainView)
|
|||
if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &DeleteRect) || m_DeletePressed)
|
||||
{
|
||||
if(s_SelectedItem >= 0 && s_SelectedItem < m_lDemos.size())
|
||||
{
|
||||
UI()->SetActiveItem(0);
|
||||
m_Popup = POPUP_DELETE_DEMO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMenus::DemoSetParentDirectory()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue