[Mplayer-cvslog] CVS: main/Gui/mplayer play.c,1.17,1.18

Zoltan Ponekker pontscho at mplayer.dev.hu
Fri Aug 31 20:46:48 CEST 2001


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

Modified Files:
	play.c 
Log Message:
play->pause fix ?

Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- play.c	31 Aug 2001 14:16:28 -0000	1.17
+++ play.c	31 Aug 2001 18:46:45 -0000	1.18
@@ -55,7 +55,7 @@
 {
  if ( !mplShMem->Playing ) return;
 // ---
-printf("%%%%%% STOP  \n");
+//printf("%%%%%% STOP  \n");
 // ---
  mplShMem->Playing=0;
  if ( !appMPlayer.subWindow.isFullScreen )
@@ -69,10 +69,11 @@
 
 void mplPlay( void )
 {
- if ( mplShMem->Filename[0] == 0 ) return;
- if ( mplShMem->Playing ) mplStop();
+ if ( ( mplShMem->Filename[0] == 0 )&&
+      ( mplShMem->Playing == 1 ) ) return;
+ if ( mplShMem->Playing == 2 ) { mplPause(); return; }
 // ---
-printf("%%%%%% PLAY  \n");
+//printf("%%%%%% PLAY  \n");
 // ---
  mplShMem->Playing=1;
  mplSubRender=0;
@@ -80,12 +81,24 @@
 
 void mplPause( void )
 {
- if ( mplShMem->Playing != 1 ) return;
 // ---
-printf("%%%%%% PAUSE  \n");
+//printf("%%%%%% PAUSE  \n");
 // ---
- mplShMem->Playing=2;
- mplSubRender=0;
+ switch( mplShMem->Playing )
+  {
+   case 1: // playing
+        mplShMem->Playing=2;
+	btnModify( evPlaySwitchToPause,btnReleased );
+	btnModify( evPauseSwitchToPlay,btnDisabled );
+        mplSubRender=0;
+	break;
+    case 2: // paused
+	mplShMem->Playing=1;
+	btnModify( evPlaySwitchToPause,btnDisabled );
+	btnModify( evPauseSwitchToPlay,btnReleased );
+        mplSubRender=0;
+	break;
+  }
 }
 
 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )




More information about the MPlayer-cvslog mailing list