1
mirror of https://github.com/mpv-player/mpv synced 2024-09-05 02:48:21 +02:00

enable the run slave commande even without libmenu

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14088 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
aurel 2004-12-02 14:37:16 +00:00
parent 72e4aaccdd
commit 543dcc07a5
4 changed files with 4 additions and 6 deletions

View File

@ -111,6 +111,7 @@ static mp_cmd_t mp_cmds[] = {
{ MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
{ MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
#ifdef HAVE_NEW_GUI
@ -135,7 +136,6 @@ static mp_cmd_t mp_cmds[] = {
{ MP_CMD_CHELP, "help", 0, { {-1,{0}} } },
{ MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } },
{ MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } },
{ MP_CMD_CRUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
#endif
{ MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } },

View File

@ -61,6 +61,7 @@
#define MP_CMD_SPEED_INCR 57
#define MP_CMD_SPEED_MULT 58
#define MP_CMD_SPEED_SET 59
#define MP_CMD_RUN 60
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001
@ -90,7 +91,6 @@
#define MP_CMD_CHELP 7000
#define MP_CMD_CEXIT 7001
#define MP_CMD_CHIDE 7002
#define MP_CMD_CRUN 7003
// The arg types
#define MP_CMD_ARG_INT 0

View File

@ -404,7 +404,7 @@ static void read_key(menu_t* menu,int c) {
menu->show = 0;
mpriv->show_ts = 0;
break;
case MP_CMD_CRUN:
case MP_CMD_RUN:
run_shell_cmd(menu,c->args[0].v.s);
break;
default: // Send the other commands to mplayer

View File

@ -3443,8 +3443,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
case MP_CMD_GET_PERCENT_POS : {
mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsPercentPos, demuxer_get_percent_pos(demuxer));
} break;
#ifdef HAVE_MENU
case MP_CMD_CRUN : {
case MP_CMD_RUN : {
#ifndef __MINGW32__
if(!fork()) {
execl("/bin/sh","sh","-c",cmd->args[0].v.s,NULL);
@ -3452,7 +3451,6 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
}
#endif
} break;
#endif
#ifdef USE_DVDNAV
case MP_CMD_DVDNAV_EVENT: {