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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 // sub window
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4 int mplSubRender = 1;
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
5 int SubVisible = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
6
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 void mplSubDraw( wsParamDisplay )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 {
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
9 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
10
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
11 if ( !appMPlayer.subWindow.Mapped ||
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
12 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1815
diff changeset
13
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
14 if ( mplShMem->Playing )
1798
ddeafb1dbc73 fix sub redraw
pontscho
parents: 1781
diff changeset
15 {
ddeafb1dbc73 fix sub redraw
pontscho
parents: 1781
diff changeset
16 vo_expose=1;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
17 mplSubRender=0;
1798
ddeafb1dbc73 fix sub redraw
pontscho
parents: 1781
diff changeset
18 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 if ( mplSubRender )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 }
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
25 appMPlayer.subWindow.State=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
28 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
30 static int mplSubMoved = 0;
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
31
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32 mplMouseTimer=mplMouseTimerConst;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
35 switch( Button )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
37 case wsPRMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 mplShowMenu( RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39 msButton=wsPRMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 case wsRRMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
42 mplHideMenu( RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
43 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
44 break;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
45 // ---
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 case wsPLMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47 sx=X; sy=Y;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 msButton=wsPLMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 case wsMoveMouse:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52 switch ( msButton )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 case wsPLMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 mplSubMoved=1;
1778
6adf80f99796 move fix
pontscho
parents: 1729
diff changeset
56 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,RX - sx,RY - sy );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 case wsPRMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59 mplMenuMouseHandle( X,Y,RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 mplMouseTimer=mplMouseTimerConst;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 case wsRLMouseButton:
2030
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
65 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
66 if ( !mplSubMoved )
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
67 {
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
68 if( SubVisible++%2 )
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
69 {
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
70 wsMoveTopWindow( &appMPlayer.mainWindow );
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
71 fprintf( stderr,"[sw] MAIN TOP\n" );
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
72 }
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
73 else
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
74 {
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
75 wsMoveTopWindow( &appMPlayer.subWindow );
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
76 fprintf( stderr,"[sw] SUB TOP\n" );
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
77 }
2030
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
78 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83 }