comparison libvo/vo_xmga.c @ 18509:94965d83e2b6

do aspect correction of video size before calculating vo_dx and vo_dy. fixes misplaced video e.g. with -aspect 0.3 (window is not centered but near left border)
author reimar
date Sun, 14 May 2006 19:36:21 +0000
parents d75953576ae4
children 30d7ddf08889
comparison
equal deleted inserted replaced
18508:6233f00d61c8 18509:94965d83e2b6
132 mvWidth = width; 132 mvWidth = width;
133 mvHeight = height; 133 mvHeight = height;
134 134
135 vo_panscan_x = vo_panscan_y = vo_panscan_amount = 0; 135 vo_panscan_x = vo_panscan_y = vo_panscan_amount = 0;
136 136
137 aspect(&d_width, &d_height, A_NOZOOM);
137 vo_dx = (vo_screenwidth - d_width) / 2; 138 vo_dx = (vo_screenwidth - d_width) / 2;
138 vo_dy = (vo_screenheight - d_height) / 2; 139 vo_dy = (vo_screenheight - d_height) / 2;
139 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, 140 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
140 vo_screenheight); 141 vo_screenheight);
141 vo_dx += xinerama_x; 142 vo_dx += xinerama_x;
168 return -1; 169 return -1;
169 } 170 }
170 mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey); 171 mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey);
171 172
172 inited = 1; 173 inited = 1;
173
174 aspect(&d_width, &d_height, A_NOZOOM);
175 174
176 #ifdef HAVE_NEW_GUI 175 #ifdef HAVE_NEW_GUI
177 if (use_gui) 176 if (use_gui)
178 guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window 177 guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
179 else 178 else