mirror of https://github.com/mpv-player/mpv
fix sub redraw
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1799 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4001e2c63f
commit
5ce26b0a96
|
@ -354,7 +354,7 @@ NoPause:
|
|||
mplMainRender=1;
|
||||
wsPostRedisplay( &appMPlayer.mainWindow );
|
||||
// if ( !mplShMem->Playing )
|
||||
wsPostRedisplay( &appMPlayer.subWindow );
|
||||
// wsPostRedisplay( &appMPlayer.subWindow );
|
||||
XFlush( wsDisplay );
|
||||
mplRedrawTimer=mplRedrawTimerConst;
|
||||
break;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue