changeset 13353:65207324b932

make it possible to use the run command from a menu config file, based on a patch by Aurelien Jacobs <aurel@gnuage.org>
author faust3
date Thu, 16 Sep 2004 09:25:56 +0000
parents 166a12bd5470
children 30f18f2e1653
files mplayer.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: {