Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 2306:42cf51474f45
Qualitative speedup for P3 & K7 cpus
author | nick |
---|---|
date | Sat, 20 Oct 2001 13:11:10 +0000 |
parents | deb4aff05c44 |
children | b64fa5d25142 |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
4 int mplSubRender = 1; | |
1852 | 5 int SubVisible = 0; |
1812 | 6 |
1693 | 7 void mplSubDraw( wsParamDisplay ) |
8 { | |
2045 | 9 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; |
10 | |
1852 | 11 if ( !appMPlayer.subWindow.Mapped || |
12 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 13 |
1852 | 14 if ( mplShMem->Playing ) |
1798 | 15 { |
16 vo_expose=1; | |
1812 | 17 mplSubRender=0; |
1798 | 18 } |
1693 | 19 |
20 if ( mplSubRender ) | |
21 { | |
2029 | 22 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
23 // XFlush( wsDisplay ); |
1693 | 24 } |
1812 | 25 appMPlayer.subWindow.State=0; |
1693 | 26 } |
27 | |
28 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
29 { | |
1812 | 30 static int mplSubMoved = 0; |
31 | |
1693 | 32 mplMouseTimer=mplMouseTimerConst; |
33 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); | |
34 | |
35 switch( Button ) | |
36 { | |
37 case wsPRMouseButton: | |
38 mplShowMenu( RX,RY ); | |
39 msButton=wsPRMouseButton; | |
40 break; | |
41 case wsRRMouseButton: | |
42 mplHideMenu( RX,RY ); | |
43 msButton=0; | |
44 break; | |
1812 | 45 // --- |
1693 | 46 case wsPLMouseButton: |
47 sx=X; sy=Y; | |
48 msButton=wsPLMouseButton; | |
49 mplSubMoved=0; | |
50 break; | |
51 case wsMoveMouse: | |
52 switch ( msButton ) | |
53 { | |
54 case wsPLMouseButton: | |
55 mplSubMoved=1; | |
1778 | 56 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,RX - sx,RY - sy ); |
1693 | 57 break; |
58 case wsPRMouseButton: | |
59 mplMenuMouseHandle( X,Y,RX,RY ); | |
60 mplMouseTimer=mplMouseTimerConst; | |
61 break; | |
62 } | |
63 break; | |
64 case wsRLMouseButton: | |
2030 | 65 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
66 if ( !mplSubMoved ) | |
67 { | |
2045 | 68 if( SubVisible++%2 ) |
69 { | |
70 wsMoveTopWindow( &appMPlayer.mainWindow ); | |
71 fprintf( stderr,"[sw] MAIN TOP\n" ); | |
72 } | |
73 else | |
74 { | |
75 wsMoveTopWindow( &appMPlayer.subWindow ); | |
76 fprintf( stderr,"[sw] SUB TOP\n" ); | |
77 } | |
2030 | 78 } |
1693 | 79 msButton=0; |
80 mplSubMoved=0; | |
81 break; | |
82 } | |
83 } |