3011: Revert "Show File button in demo player" r=Jupeyy a=def-

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

This reverts commit 8efff70d88.

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-10-05 00:08:21 +00:00 committed by GitHub
commit 870003db3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);