changeset 1815:eff8f3c200fa

fix resize
author pontscho
date Fri, 31 Aug 2001 22:07:53 +0000
parents 9c674dc76ff3
children c8bc613eb4f8
files Gui/mplayer/play.c Gui/mplayer/psignal.c Gui/mplayer/sw.h
diffstat 3 files changed, 9 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/play.c	Fri Aug 31 22:06:28 2001 +0000
+++ b/Gui/mplayer/play.c	Fri Aug 31 22:07:53 2001 +0000
@@ -48,9 +48,6 @@
 void mplStop()
 {
  if ( !mplShMem->Playing ) return;
-// ---
-printf("%%%%%% STOP  \n");
-// ---
  mplShMem->Playing=0;
  mplShMem->TimeSec=0;
  if ( !appMPlayer.subWindow.isFullScreen )
@@ -67,34 +64,27 @@
  if ( ( mplShMem->Filename[0] == 0 )||
       ( mplShMem->Playing == 1 ) ) return;
  if ( mplShMem->Playing == 2 ) { mplPause(); return; }
-// ---
-//printf("%%%%%% PLAY  \n");
-// ---
  mplShMem->Playing=1;
-// wsPostRedisplay( &appMPlayer.subWindow );
+ wsClearWindow( appMPlayer.subWindow );
  mplSubRender=0;
 }
 
 void mplPause( void )
 {
-// ---
-//printf("%%%%%% PAUSE  \n");
-// ---
  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;
   }
+ mplSubRender=0;
 }
 
 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
@@ -124,18 +114,12 @@
 
 void mplRelSeek( float s )
 { // -+s
-// ---
-//printf("%%%%%% RelSEEK=%5.3f  \n",s);
-// ---
  rel_seek_secs=s; abs_seek_pos=0;
 }
 
 void mplAbsSeek( float s )
 { // 0.0 ... 100.0
-// ---
-//printf("%%%%%% AbsSEEK=%5.3f  \n",s);
  rel_seek_secs=0.01*s; abs_seek_pos=3;
-// ---
 }
 
 listItems tmpList;
--- a/Gui/mplayer/psignal.c	Fri Aug 31 22:06:28 2001 +0000
+++ b/Gui/mplayer/psignal.c	Fri Aug 31 22:07:53 2001 +0000
@@ -156,7 +156,10 @@
         break;
    case evSkinBrowser: mplShMem->SkinChange=1; break;
    case evFileLoaded:
-        strcpy( mplShMem->Filename,gtkShMem->fs.dir ); strcat( mplShMem->Filename,"/" ); strcat( mplShMem->Filename,gtkShMem->fs.filename );
+        strcpy( mplShMem->Filename,gtkShMem->fs.dir ); 
+	strcat( mplShMem->Filename,"/" ); 
+	strcat( mplShMem->Filename,gtkShMem->fs.filename );
+	printf( "%%%%%%%% Playing file: %s\n",mplShMem->Filename );
 	mplShMem->FilenameChanged=1;
         if ( mplMainAutoPlay ) mplGeneralTimer=1;
         break;
--- a/Gui/mplayer/sw.h	Fri Aug 31 22:06:28 2001 +0000
+++ b/Gui/mplayer/sw.h	Fri Aug 31 22:07:53 2001 +0000
@@ -50,18 +50,15 @@
 
  if ( ( mplShMem->Playing ) )//&&( appMPlayer.subWindow.State == wsWindowExpose ) )
   { 
-printf( "------> redraw volib.\n" );   
-   wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
-   wsClearWindow( appMPlayer.subWindow );
    vo_expose=1; 
    mplSubRender=0;
   }
 
  if ( mplSubRender )
   {
-printf( "------> redraw video.\n" );   
-   wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
-   wsClearWindow( appMPlayer.subWindow );
+   wsSetForegroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+   XFillRectangle( wsDisplay,appMPlayer.subWindow.WindowID,appMPlayer.subWindow.wGC,0,0,
+    appMPlayer.subWindow.Width,appMPlayer.subWindow.Height );
    if ( appMPlayer.sub.Bitmap.Image ) 
     {
      wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );