From 5ce26b0a963c1055d3770df6cd9c66ce9b328ad3 Mon Sep 17 00:00:00 2001 From: pontscho Date: Fri, 31 Aug 2001 11:27:21 +0000 Subject: [PATCH] fix sub redraw git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1799 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/mplayer/mw.h | 2 +- Gui/mplayer/sw.h | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index 63fae36ace..2814e23365 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -354,7 +354,7 @@ NoPause: mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); // if ( !mplShMem->Playing ) - wsPostRedisplay( &appMPlayer.subWindow ); +// wsPostRedisplay( &appMPlayer.subWindow ); XFlush( wsDisplay ); mplRedrawTimer=mplRedrawTimerConst; break; diff --git a/Gui/mplayer/sw.h b/Gui/mplayer/sw.h index cc2889a4ff..a07035a634 100644 --- a/Gui/mplayer/sw.h +++ b/Gui/mplayer/sw.h @@ -6,17 +6,27 @@ int mplSubMoved = 0; void mplSubDraw( wsParamDisplay ) { - if ( appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; + if ( ( appMPlayer.subWindow.Visible == wsWindowNotVisible )|| + ( appMPlayer.subWindow.State != wsWindowExpose ) ) return; + if ( ( mplShMem->Playing )&&( appMPlayer.subWindow.State == wsWindowExpose ) ) - { appMPlayer.subWindow.State=0; vo_expose=1; return; } + { + wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); + wsClearWindow( appMPlayer.subWindow ); + appMPlayer.subWindow.State=0; + vo_expose=1; + return; + } if ( mplSubRender ) { wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB ); wsClearWindow( appMPlayer.subWindow ); - if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); - mplSubRender=0; - if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); + if ( appMPlayer.sub.Bitmap.Image ) + { + wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); + wsPutImage( &appMPlayer.subWindow ); + } XFlush( wsDisplay ); } }