Mercurial > mplayer.hg
changeset 1804:76b4f7bcd087
play->pause fix ?
author | pontscho |
---|---|
date | Fri, 31 Aug 2001 18:46:45 +0000 |
parents | 8e0b52f2c215 |
children | 2abc322c0516 |
files | Gui/mplayer/play.c |
diffstat | 1 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/play.c Fri Aug 31 17:59:10 2001 +0000 +++ b/Gui/mplayer/play.c Fri Aug 31 18:46:45 2001 +0000 @@ -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 )