[Mplayer-cvslog] CVS: main mplayer.c,1.434,1.435

Alban Bedel CVS albeu at mplayer.dev.hu
Sat Mar 16 17:36:34 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv15014

Modified Files:
	mplayer.c 
Log Message:
Now enter key quit if no next file is avaible


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.434
retrieving revision 1.435
diff -u -r1.434 -r1.435
--- mplayer.c	16 Mar 2002 02:15:10 -0000	1.434
+++ mplayer.c	16 Mar 2002 16:36:31 -0000	1.435
@@ -2364,18 +2364,28 @@
     } break;
     case MP_CMD_PLAY_TREE_STEP : {
       int n = cmd->args[0].v.i > 0 ? 1 : -1;
-      play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-      
-      if(play_tree_iter_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
+      int force = cmd->args[1].v.i;
+
+      if(!force) {
+	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
+	
+	if(play_tree_iter_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
+	  eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
+	play_tree_iter_free(i);
+      } else
 	eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
-      play_tree_iter_free(i);
     } break;
     case MP_CMD_PLAY_TREE_UP_STEP : {
       int n = cmd->args[0].v.i > 0 ? 1 : -1;
-      play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-      if(play_tree_iter_up_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
+      int force = cmd->args[1].v.i;
+
+      if(!force) {
+	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
+	if(play_tree_iter_up_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
+	  eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
+	play_tree_iter_free(i);
+      } else
 	eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
-      play_tree_iter_free(i);
     } break;
     case MP_CMD_PLAY_ALT_SRC_STEP : {
       if(playtree_iter->num_files > 1) {




More information about the MPlayer-cvslog mailing list