Mercurial > mplayer.hg
comparison libvo/vo_xv.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 | 29a25bcb3d99 |
children | 30d7ddf08889 |
comparison
equal
deleted
inserted
replaced
18508:6233f00d61c8 | 18509:94965d83e2b6 |
---|---|
189 | 189 |
190 int_pause = 0; | 190 int_pause = 0; |
191 visible_buf = -1; | 191 visible_buf = -1; |
192 | 192 |
193 update_xinerama_info(); | 193 update_xinerama_info(); |
194 aspect(&d_width, &d_height, A_NOZOOM); | |
194 vo_dx = (vo_screenwidth - d_width) / 2; | 195 vo_dx = (vo_screenwidth - d_width) / 2; |
195 vo_dy = (vo_screenheight - d_height) / 2; | 196 vo_dy = (vo_screenheight - d_height) / 2; |
196 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, | 197 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, |
197 vo_screenheight); | 198 vo_screenheight); |
198 vo_dx += xinerama_x; | 199 vo_dx += xinerama_x; |
232 else | 233 else |
233 #endif | 234 #endif |
234 { | 235 { |
235 hint.x = vo_dx; | 236 hint.x = vo_dx; |
236 hint.y = vo_dy; | 237 hint.y = vo_dy; |
237 aspect(&d_width, &d_height, A_NOZOOM); | |
238 hint.width = d_width; | 238 hint.width = d_width; |
239 hint.height = d_height; | 239 hint.height = d_height; |
240 #ifdef HAVE_XF86VM | 240 #ifdef HAVE_XF86VM |
241 if (vm) | 241 if (vm) |
242 { | 242 { |