1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-27 02:40:53 +00:00

fix sub redraw

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1799 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2001-08-31 11:27:21 +00:00
parent 4001e2c63f
commit 5ce26b0a96
2 changed files with 16 additions and 6 deletions

View File

@ -354,7 +354,7 @@ NoPause:
mplMainRender=1; mplMainRender=1;
wsPostRedisplay( &appMPlayer.mainWindow ); wsPostRedisplay( &appMPlayer.mainWindow );
// if ( !mplShMem->Playing ) // if ( !mplShMem->Playing )
wsPostRedisplay( &appMPlayer.subWindow ); // wsPostRedisplay( &appMPlayer.subWindow );
XFlush( wsDisplay ); XFlush( wsDisplay );
mplRedrawTimer=mplRedrawTimerConst; mplRedrawTimer=mplRedrawTimerConst;
break; break;

View File

@ -6,17 +6,27 @@ int mplSubMoved = 0;
void mplSubDraw( wsParamDisplay ) 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 ) ) 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 ) if ( mplSubRender )
{ {
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB ); wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
wsClearWindow( appMPlayer.subWindow ); wsClearWindow( appMPlayer.subWindow );
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); if ( appMPlayer.sub.Bitmap.Image )
mplSubRender=0; {
if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
wsPutImage( &appMPlayer.subWindow );
}
XFlush( wsDisplay ); XFlush( wsDisplay );
} }
} }