# HG changeset patch # User faust3 # Date 1095326756 0 # Node ID 65207324b93261343c4a5b336a86f9a8be09437f # Parent 166a12bd5470a39fd52d78640f7e3d43d5553e09 make it possible to use the run command from a menu config file, based on a patch by Aurelien Jacobs diff -r 166a12bd5470 -r 65207324b932 mplayer.c --- a/mplayer.c Thu Sep 16 08:12:05 2004 +0000 +++ b/mplayer.c Thu Sep 16 09:25:56 2004 +0000 @@ -3197,6 +3197,16 @@ case MP_CMD_GET_PERCENT_POS : { mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%ld\n", demuxer_get_percent_pos(demuxer)); } break; +#ifdef HAVE_MENU + case MP_CMD_CRUN : { +#ifndef __MINGW32__ + if(!fork()) { + execl("/bin/sh","sh","-c",cmd->args[0].v.s,NULL); + exit(0); + } +#endif + } break; +#endif #ifdef USE_DVDNAV case MP_CMD_DVDNAV_EVENT: {