1
0
Fork 0
forked from fte/fteqw

Dir command should allow wavs/oggs to be clicked too.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5360 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2018-12-06 07:13:37 +00:00
parent 484d4d216e
commit 42908149f9
2 changed files with 8 additions and 0 deletions

View file

@ -1043,6 +1043,12 @@ void Key_DefaultLinkClicked(console_t *con, char *text, char *info)
return;
}
#endif
c = Info_ValueForKey(info, "playaudio");
if (*c && !strchr(c, ';') && !strchr(c, '\n'))
{
Cbuf_AddText(va("\nplay \"%s\"\n", c), RESTRICT_LOCAL);
return;
}
c = Info_ValueForKey(info, "desc");
if (*c)
{

View file

@ -827,6 +827,8 @@ static int QDECL COM_Dir_List(const char *name, qofs_t size, time_t mtime, void
}
else if (!Q_strcasecmp(link, "roq") || !Q_strcasecmp(link, "cin") || !Q_strcasecmp(link, "avi") || !Q_strcasecmp(link, "mp4") || !Q_strcasecmp(link, "mkv"))
Q_snprintfz(link, sizeof(link), "\\tip\\Play Film\\film\\%s", name);
else if (!Q_strcasecmp(link, "wav") || !Q_strcasecmp(link, "ogg") || !Q_strcasecmp(link, "mp3") || !Q_strcasecmp(link, "opus") || !Q_strcasecmp(link, "flac"))
Q_snprintfz(link, sizeof(link), "\\tip\\Play Audio\\playaudio\\%s", name);
else
{
colour = "^3"; //nothing