diff --git a/input/input.c b/input/input.c index ef9a6e04bd..70b28a6f38 100644 --- a/input/input.c +++ b/input/input.c @@ -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}} } }, diff --git a/input/input.h b/input/input.h index f748843e80..62c04e3d5d 100644 --- a/input/input.h +++ b/input/input.h @@ -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 diff --git a/libmenu/menu_console.c b/libmenu/menu_console.c index 503d25a11e..9eca389346 100644 --- a/libmenu/menu_console.c +++ b/libmenu/menu_console.c @@ -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 diff --git a/mplayer.c b/mplayer.c index 2e087c846c..fb47735c56 100644 --- a/mplayer.c +++ b/mplayer.c @@ -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: {