Revert "Show File button in demo player"

As reported by Soreu, doesn't work on Windows (Can't open file warning
pops up)

This reverts commit 8efff70d88.
This commit is contained in:
def 2020-10-04 18:24:07 +02:00
parent 2b7b92355f
commit d5fc613b8b

View file

@ -463,23 +463,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
DemolistOnUpdate(false); DemolistOnUpdate(false);
} }
// file button
ButtonBar.VSplitRight(Margins, &ButtonBar, 0);
ButtonBar.VSplitRight(ButtonbarHeight * 3, &ButtonBar, &Button);
static int s_FileButton = 0;
if(DoButton_DemoPlayer(&s_FileButton, Localize("File"), 0, &Button))
{
char aBuf[MAX_PATH_LENGTH];
char aBufFull[MAX_PATH_LENGTH + 7];
str_format(aBufFull, sizeof(aBufFull), "%s/%s", m_aCurrentDemoFolder, m_lDemos[m_DemolistSelectedIndex].m_aFilename);
Storage()->GetCompletePath(m_lDemos[m_DemolistSelectedIndex].m_StorageType, aBufFull, aBuf, sizeof(aBuf));
str_format(aBufFull, sizeof(aBufFull), "file://%s", aBuf);
if(!open_link(aBufFull))
{
dbg_msg("menus", "couldn't open link");
}
}
// toggle keyboard shortcuts button // toggle keyboard shortcuts button
ButtonBar.VSplitRight(Margins * 3, &ButtonBar, 0); ButtonBar.VSplitRight(Margins * 3, &ButtonBar, 0);
ButtonBar.VSplitRight(ButtonbarHeight, &ButtonBar, &Button); ButtonBar.VSplitRight(ButtonbarHeight, &ButtonBar, &Button);