summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-31 18:46:45 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-31 18:46:45 +0000
commit8f858e4ddbb4e02393465a1406c9610678c53edb (patch)
treeddef2a61e7d5ead15028f169feb3acd355e5d556 /Gui
parent481e493626c526dad2e7dbb815ca9bb1ad44690a (diff)
downloadmpv-8f858e4ddbb4e02393465a1406c9610678c53edb.tar.bz2
mpv-8f858e4ddbb4e02393465a1406c9610678c53edb.tar.xz
play->pause fix ?
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1805 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/play.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index 4f45fd4eeb..fdfefd3fa4 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -55,7 +55,7 @@ void mplStop()
{
if ( !mplShMem->Playing ) return;
// ---
-printf("%%%%%% STOP \n");
+//printf("%%%%%% STOP \n");
// ---
mplShMem->Playing=0;
if ( !appMPlayer.subWindow.isFullScreen )
@@ -69,10 +69,11 @@ printf("%%%%%% STOP \n");
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 @@ printf("%%%%%% PLAY \n");
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 )