mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
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:
parent
484d4d216e
commit
42908149f9
2 changed files with 8 additions and 0 deletions
|
@ -1043,6 +1043,12 @@ void Key_DefaultLinkClicked(console_t *con, char *text, char *info)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#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");
|
c = Info_ValueForKey(info, "desc");
|
||||||
if (*c)
|
if (*c)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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"))
|
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);
|
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
|
else
|
||||||
{
|
{
|
||||||
colour = "^3"; //nothing
|
colour = "^3"; //nothing
|
||||||
|
|
Loading…
Reference in a new issue