comparison libvo/vo_xmga.c @ 2249:48f0ac1e9d13

Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
author atmos4
date Thu, 18 Oct 2001 02:42:20 +0000
parents 378aed6b232d
children 1dbf58c3d50c
comparison
equal deleted inserted replaced
2248:13bbd8326efd 2249:48f0ac1e9d13
228 228
229 if ( X_already_started ) return -1; 229 if ( X_already_started ) return -1;
230 230
231 if (!vo_init()) return -1; 231 if (!vo_init()) return -1;
232 232
233 aspect_save_orig(width,height);
234 aspect_save_prescale(d_width,d_height);
235 aspect_save_screenres(vo_screenwidth,vo_screenheight);
236
233 mvWidth=width; mvHeight=height; 237 mvWidth=width; mvHeight=height;
234 238
235 wndX=0; wndY=0; 239 wndX=0; wndY=0;
236 wndWidth=d_width; wndHeight=d_height; 240 wndWidth=d_width; wndHeight=d_height;
237 dwidth=d_width; dheight=d_height;
238 #ifdef HAVE_NEW_GUI 241 #ifdef HAVE_NEW_GUI
239 // mdwidth=d_width; mdheight=d_height; 242 // mdwidth=d_width; mdheight=d_height;
240 mdwidth=width; mdheight=height; 243 mdwidth=width; mdheight=height;
241 #endif 244 #endif
242 mFullscreen=fullscreen&1; 245 mFullscreen=fullscreen&1;
248 case 16: fgColor=0xf81fL; break; 251 case 16: fgColor=0xf81fL; break;
249 case 15: fgColor=0x7c1fL; break; 252 case 15: fgColor=0x7c1fL; break;
250 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; 253 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1;
251 } 254 }
252 255
256 aspect(&d_width,&d_height,A_NOZOOM);
253 #ifdef HAVE_NEW_GUI 257 #ifdef HAVE_NEW_GUI
254 if ( vo_window == None ) 258 if ( vo_window == None )
255 { 259 {
256 #endif 260 #endif
257 if ( mFullscreen ) 261 if ( mFullscreen )
258 { 262 {
259 wndWidth=vo_screenwidth; 263 wndWidth=vo_screenwidth;
260 wndHeight=vo_screenheight; 264 wndHeight=vo_screenheight;
261 #ifdef X11_FULLSCREEN 265 #ifdef X11_FULLSCREEN
262 aspect(&d_width,&d_height,vo_screenwidth,vo_screenheight); 266 aspect(&d_width,&d_height,A_ZOOM);
263 dwidth=d_width; dheight=d_height;
264 #endif 267 #endif
265 } 268 }
269 dwidth=d_width; dheight=d_height;
266 270
267 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); 271 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs );
268 mDepth=attribs.depth; 272 mDepth=attribs.depth;
269 if ( mDepth != 15 && mDepth != 16 && mDepth != 24 && mDepth != 32 ) mDepth=24; 273 if ( mDepth != 15 && mDepth != 16 && mDepth != 24 && mDepth != 32 ) mDepth=24;
270 XMatchVisualInfo( mDisplay,mScreen,mDepth,TrueColor,&vinfo ); 274 XMatchVisualInfo( mDisplay,mScreen,mDepth,TrueColor,&vinfo );