changeset 1817:35d88a433502

fixed interaction between commandlien and fileselector
author arpi
date Fri, 31 Aug 2001 22:58:41 +0000
parents c8bc613eb4f8
children 18ba1f7373c5
files mplayer.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Fri Aug 31 22:35:04 2001 +0000
+++ b/mplayer.c	Fri Aug 31 22:58:41 2001 +0000
@@ -581,13 +581,13 @@
 
 #ifdef HAVE_NEW_GUI
     if ( use_gui ) {
-      if(filename) strcpy( mplShMem->Filename,filename );
+      if(filename && !mplShMem->FilenameChanged) strcpy( mplShMem->Filename,filename );
 //      mplShMem->Playing= (gui_no_filename) ? 0 : 1;
       while(mplShMem->Playing!=1){
 	usleep(20000);
 	EventHandling();
       }
-      if(gui_no_filename){
+      if(mplShMem->FilenameChanged){
         filename=mplShMem->Filename;
       }
     }
@@ -1494,6 +1494,7 @@
 #endif
 
   if(osd_function==OSD_PAUSE){
+      int gui_pause_flag=0; // gany!
       mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\n------ PAUSED -------\r");fflush(stdout);
 #ifdef HAVE_NEW_GUI
       if(use_gui) mplShMem->Playing=2;
@@ -1511,7 +1512,8 @@
 #ifdef HAVE_NEW_GUI
              if(use_gui){
 		EventHandling();
-		if(mplShMem->Playing!=2 || (rel_seek_secs || abs_seek_pos)) break; // end of pause or seek
+		if(mplShMem->Playing!=2 || (rel_seek_secs || abs_seek_pos))
+		  { gui_pause_flag=1; break; } // end of pause or seek
              }
 #endif
              if(use_stdin) usec_sleep(1000); // do not eat the CPU
@@ -1520,7 +1522,7 @@
       if (audio_out && sh_audio)
         audio_out->resume();	// resume audio
 #ifdef HAVE_NEW_GUI
-      if(use_gui) if(mplShMem->Playing==2) mplShMem->Playing=1;
+      if(use_gui && !gui_pause_flag) mplShMem->Playing=1; // play from keyboard
 #endif
   }