Mercurial > mplayer.hg
comparison libvo/vo_xmga.c @ 5955:caac20b1ca79
fix xmga fs, resize to movie size and mouse auto hide + dga
author | pontscho |
---|---|
date | Fri, 03 May 2002 20:57:13 +0000 |
parents | f9fe22a52e80 |
children | 157174abe70a |
comparison
equal
deleted
inserted
replaced
5954:70b326241d52 | 5955:caac20b1ca79 |
---|---|
55 | 55 |
56 #ifdef SHOW_TIME | 56 #ifdef SHOW_TIME |
57 #include "../linux/timer.h" | 57 #include "../linux/timer.h" |
58 static unsigned int timer=0; | 58 static unsigned int timer=0; |
59 static unsigned int timerd=0; | 59 static unsigned int timerd=0; |
60 #endif | |
61 | |
62 #ifdef HAVE_NEW_GUI | |
63 #include "../Gui/interface.h" | |
60 #endif | 64 #endif |
61 | 65 |
62 static vo_info_t vo_info = | 66 static vo_info_t vo_info = |
63 { | 67 { |
64 "X11 (Matrox G200/G4x0/G550 overlay in window using /dev/mga_vid)", | 68 "X11 (Matrox G200/G4x0/G550 overlay in window using /dev/mga_vid)", |
65 "xmga", | 69 "xmga", |
66 "Zoltan Ponekker <pontscho@makacs.poliod.hu>", | 70 "Zoltan Ponekker <pontscho@makacs.poliod.hu>", |
67 "" | 71 "" |
68 }; | 72 }; |
69 | 73 |
70 //static Display * mDisplay; | |
71 static XGCValues wGCV; | 74 static XGCValues wGCV; |
72 | 75 |
73 static XImage * myximage; | 76 static XImage * myximage; |
74 | 77 |
75 static uint32_t mDepth, bpp, mode; | 78 static uint32_t mDepth, bpp, mode; |
185 | 188 |
186 static int inited=0; | 189 static int inited=0; |
187 | 190 |
188 static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t* info) | 191 static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t* info) |
189 { | 192 { |
190 char * frame_mem; | |
191 // uint32_t frame_size; | |
192 // int mScreen; | |
193 unsigned int fg, bg; | |
194 char * mTitle=(title == NULL) ? "XMGA render" : title; | 193 char * mTitle=(title == NULL) ? "XMGA render" : title; |
195 char * name=":0.0"; | |
196 XSizeHints hint; | |
197 XVisualInfo vinfo; | 194 XVisualInfo vinfo; |
198 XEvent xev; | 195 |
199 | |
200 XGCValues xgcv; | |
201 unsigned long xswamask; | 196 unsigned long xswamask; |
202 | 197 |
203 width+=width&1; | 198 width+=width&1; |
204 | 199 |
205 switch(format) | 200 switch(format) |
239 wndX=0; wndY=0; | 234 wndX=0; wndY=0; |
240 vo_fs=fullscreen&1; | 235 vo_fs=fullscreen&1; |
241 vo_dwidth=d_width; vo_dheight=d_height; | 236 vo_dwidth=d_width; vo_dheight=d_height; |
242 if ( vo_fs ) | 237 if ( vo_fs ) |
243 { vo_old_width=d_width; vo_old_height=d_height; } | 238 { vo_old_width=d_width; vo_old_height=d_height; } |
239 vo_mouse_autohide=1; | |
244 | 240 |
245 switch ( vo_depthonscreen ) | 241 switch ( vo_depthonscreen ) |
246 { | 242 { |
247 case 32: | 243 case 32: |
248 case 24: fgColor=0x00ff00ffL; break; | 244 case 24: fgColor=0x00ff00ffL; break; |
261 if ( vo_fs ) | 257 if ( vo_fs ) |
262 { | 258 { |
263 vo_dwidth=vo_screenwidth; | 259 vo_dwidth=vo_screenwidth; |
264 vo_dheight=vo_screenheight; | 260 vo_dheight=vo_screenheight; |
265 #ifdef X11_FULLSCREEN | 261 #ifdef X11_FULLSCREEN |
266 aspect(&vo_dwidth,&vo_dheight,A_ZOOM); | 262 aspect(&dwidth,&dheight,A_ZOOM); |
267 #endif | 263 #endif |
268 } | 264 } |
269 dwidth=vo_dwidth; dheight=vo_dheight; | |
270 | 265 |
271 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); | 266 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); |
272 mDepth=attribs.depth; | 267 mDepth=attribs.depth; |
273 if ( mDepth != 15 && mDepth != 16 && mDepth != 24 && mDepth != 32 ) mDepth=24; | 268 if ( mDepth != 15 && mDepth != 16 && mDepth != 24 && mDepth != 32 ) mDepth=24; |
274 XMatchVisualInfo( mDisplay,mScreen,mDepth,TrueColor,&vinfo ); | 269 XMatchVisualInfo( mDisplay,mScreen,mDepth,TrueColor,&vinfo ); |
302 #ifdef HAVE_XINERAMA | 297 #ifdef HAVE_XINERAMA |
303 vo_x11_xinerama_move(mDisplay,vo_window); | 298 vo_x11_xinerama_move(mDisplay,vo_window); |
304 #endif | 299 #endif |
305 vo_gc=XCreateGC( mDisplay,vo_window,GCForeground,&wGCV ); | 300 vo_gc=XCreateGC( mDisplay,vo_window,GCForeground,&wGCV ); |
306 #ifdef HAVE_NEW_GUI | 301 #ifdef HAVE_NEW_GUI |
307 } | 302 } else guiGetEvent( guiSetShVideo,0 ); |
308 #endif | 303 #endif |
309 | 304 |
310 set_window(); | 305 set_window(); |
311 | 306 |
312 mga_vid_config.src_width=width; | 307 mga_vid_config.src_width=width; |