mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Select new demo file after renaming and slicing demo
This commit is contained in:
parent
8696abd106
commit
abfd9333b0
|
@ -1530,6 +1530,9 @@ int CMenus::Render()
|
|||
}
|
||||
else if(Storage()->RenameFile(aBufOld, aBufNew, m_vDemos[m_DemolistSelectedIndex].m_StorageType))
|
||||
{
|
||||
str_copy(g_Config.m_UiDemoSelected, m_DemoRenameInput.GetString());
|
||||
if(str_endswith(g_Config.m_UiDemoSelected, ".demo"))
|
||||
g_Config.m_UiDemoSelected[str_length(g_Config.m_UiDemoSelected) - str_length(".demo")] = '\0';
|
||||
DemolistPopulate();
|
||||
DemolistOnUpdate(false);
|
||||
}
|
||||
|
|
|
@ -708,6 +708,9 @@ void CMenus::RenderDemoPlayerSliceSavePopup(CUIRect MainView)
|
|||
{
|
||||
char aPath[IO_MAX_PATH_LENGTH];
|
||||
str_format(aPath, sizeof(aPath), "%s/%s", m_aCurrentDemoFolder, m_DemoSliceInput.GetString());
|
||||
str_copy(g_Config.m_UiDemoSelected, m_DemoSliceInput.GetString());
|
||||
if(str_endswith(g_Config.m_UiDemoSelected, ".demo"))
|
||||
g_Config.m_UiDemoSelected[str_length(g_Config.m_UiDemoSelected) - str_length(".demo")] = '\0';
|
||||
m_DemoPlayerState = DEMOPLAYER_NONE;
|
||||
Client()->DemoSlice(aPath, CMenus::DemoFilterChat, &s_RemoveChat);
|
||||
DemolistPopulate();
|
||||
|
|
Loading…
Reference in a new issue