changeset 2226:9582af160d04

skin chaning bug fix.
author pontscho
date Tue, 16 Oct 2001 21:23:59 +0000
parents 2c0f7c08e29f
children 10b279d72a8f
files Gui/mplayer/mplayer.c Gui/mplayer/mplayer.h Gui/mplayer/play.c
diffstat 3 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mplayer.c	Tue Oct 16 17:51:26 2001 +0000
+++ b/Gui/mplayer/mplayer.c	Tue Oct 16 21:23:59 2001 +0000
@@ -27,8 +27,6 @@
 int mplGeneralTimer = -1;
 int mplTimer = 0;
 
-int mplSkinChanged = 0;
-
 void mplMsgHandle( int msg,float param );
 
 #include "widgets.h"
--- a/Gui/mplayer/mplayer.h	Tue Oct 16 17:51:26 2001 +0000
+++ b/Gui/mplayer/mplayer.h	Tue Oct 16 21:23:59 2001 +0000
@@ -5,7 +5,6 @@
 extern int             mplSubRender;
 extern int             mplMainRender;
 extern int             mplGeneralTimer;
-extern int             mplSkinChanged;
 
 extern unsigned char * mplDrawBuffer;
 extern unsigned char * mplMenuDrawBuffer;
--- a/Gui/mplayer/play.c	Tue Oct 16 17:51:26 2001 +0000
+++ b/Gui/mplayer/play.c	Tue Oct 16 21:23:59 2001 +0000
@@ -178,11 +178,10 @@
    wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
   }
 
- mplSkinChanged=1;
+/*
  if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
  if ( !mplShMem->Playing )
   {
-   mplSkinChanged=0;
    if ( !appMPlayer.subWindow.isFullScreen ) 
     {
      wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
@@ -193,6 +192,21 @@
    if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
    mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow );
   }
+*/
+ if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
+ if ( ( !appMPlayer.subWindow.isFullScreen )&&( !mplShMem->Playing ) )
+  {
+   wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
+   wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
+  } 
+ wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+ if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
+ if ( !mplShMem->Playing ) 
+  {
+   mplSubRender=1; 
+   wsClearWindow( appMPlayer.subWindow );
+   wsPostRedisplay( &appMPlayer.subWindow );
+  }
 
  if ( mplDrawBuffer ) free( mplDrawBuffer );
  if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )