# HG changeset patch # User pontscho # Date 999283605 0 # Node ID 76b4f7bcd08797ece04eed0058215a41babdedcc # Parent 8e0b52f2c21546cdd980081cf902ede5cdb5c0e6 play->pause fix ? diff -r 8e0b52f2c215 -r 76b4f7bcd087 Gui/mplayer/play.c --- 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 )