comparison Gui/mplayer/play.c @ 1804:76b4f7bcd087

play->pause fix ?
author pontscho
date Fri, 31 Aug 2001 18:46:45 +0000
parents 82e77faa7341
children d2d6a26ddb02
comparison
equal deleted inserted replaced
1803:8e0b52f2c215 1804:76b4f7bcd087
53 53
54 void mplStop() 54 void mplStop()
55 { 55 {
56 if ( !mplShMem->Playing ) return; 56 if ( !mplShMem->Playing ) return;
57 // --- 57 // ---
58 printf("%%%%%% STOP \n"); 58 //printf("%%%%%% STOP \n");
59 // --- 59 // ---
60 mplShMem->Playing=0; 60 mplShMem->Playing=0;
61 if ( !appMPlayer.subWindow.isFullScreen ) 61 if ( !appMPlayer.subWindow.isFullScreen )
62 { 62 {
63 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); 63 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
67 wsPostRedisplay( &appMPlayer.subWindow ); 67 wsPostRedisplay( &appMPlayer.subWindow );
68 } 68 }
69 69
70 void mplPlay( void ) 70 void mplPlay( void )
71 { 71 {
72 if ( mplShMem->Filename[0] == 0 ) return; 72 if ( ( mplShMem->Filename[0] == 0 )&&
73 if ( mplShMem->Playing ) mplStop(); 73 ( mplShMem->Playing == 1 ) ) return;
74 // --- 74 if ( mplShMem->Playing == 2 ) { mplPause(); return; }
75 printf("%%%%%% PLAY \n"); 75 // ---
76 //printf("%%%%%% PLAY \n");
76 // --- 77 // ---
77 mplShMem->Playing=1; 78 mplShMem->Playing=1;
78 mplSubRender=0; 79 mplSubRender=0;
79 } 80 }
80 81
81 void mplPause( void ) 82 void mplPause( void )
82 { 83 {
83 if ( mplShMem->Playing != 1 ) return; 84 // ---
84 // --- 85 //printf("%%%%%% PAUSE \n");
85 printf("%%%%%% PAUSE \n"); 86 // ---
86 // --- 87 switch( mplShMem->Playing )
87 mplShMem->Playing=2; 88 {
88 mplSubRender=0; 89 case 1: // playing
90 mplShMem->Playing=2;
91 btnModify( evPlaySwitchToPause,btnReleased );
92 btnModify( evPauseSwitchToPlay,btnDisabled );
93 mplSubRender=0;
94 break;
95 case 2: // paused
96 mplShMem->Playing=1;
97 btnModify( evPlaySwitchToPause,btnDisabled );
98 btnModify( evPauseSwitchToPlay,btnReleased );
99 mplSubRender=0;
100 break;
101 }
89 } 102 }
90 103
91 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height ) 104 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
92 { 105 {
93 vo_setwindowsize( width,height ); 106 vo_setwindowsize( width,height );