mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix demo cutter to add .demo file ending
This commit is contained in:
parent
2077a4f83e
commit
cc63e9fc89
|
@ -103,11 +103,15 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
if(DoButton_Menu(&s_ButtonOk, Localize("Ok"), 0, &Ok) || m_EnterPressed)
|
||||
{
|
||||
if (str_comp(m_lDemos[m_DemolistSelectedIndex].m_aFilename, m_aCurrentDemoFile) == 0)
|
||||
str_copy(m_aDemoPlayerPopupHint, "Please use a different name", sizeof(m_aDemoPlayerPopupHint));
|
||||
str_copy(m_aDemoPlayerPopupHint, Localize("Please use a different name"), sizeof(m_aDemoPlayerPopupHint));
|
||||
else
|
||||
{
|
||||
m_DemoPlayerState = DEMOPLAYER_NONE;
|
||||
|
||||
int len = str_length(m_aCurrentDemoFile);
|
||||
if(len < 5 || str_comp_nocase(&m_aCurrentDemoFile[len-5], ".demo"))
|
||||
str_append(m_aCurrentDemoFile, ".demo", sizeof(m_aCurrentDemoFile));
|
||||
|
||||
char aPath[512];
|
||||
str_format(aPath, sizeof(aPath), "%s/%s", m_aCurrentDemoFolder, m_aCurrentDemoFile);
|
||||
Client()->DemoSlice(aPath);
|
||||
|
|
Loading…
Reference in a new issue