diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index c87418078..c3fae894a 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -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); } diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 414548bde..be60aa014 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -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();