diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-03 21:01:57 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-03 21:01:57 +0000 |
commit | baae4d1add5b184dcf0dc3271330ead267e048d7 (patch) | |
tree | 5d2f6a2b0863fede5a6eb62a154da158cf7f7328 /libvo | |
parent | 90188f0e5fce3948dde3d89a409804c492f8375b (diff) | |
download | mpv-baae4d1add5b184dcf0dc3271330ead267e048d7.tar.bz2 mpv-baae4d1add5b184dcf0dc3271330ead267e048d7.tar.xz |
Save the new width and height earlier so that e.g. -geometry 30x30-50-50
gives the correct behaviour - before placement would depend on the
original movie size instead of the one scaled according to -geometry.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30823 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/geometry.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libvo/geometry.c b/libvo/geometry.c index 6653373976..39ff209b7b 100644 --- a/libvo/geometry.c +++ b/libvo/geometry.c @@ -77,10 +77,16 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh) return 0; } + mp_msg(MSGT_VO, MSGL_V,"geometry window parameter: widw: %i," + " widh: %i, scrw: %i, scrh: %i\n",*widw, *widh, scrw, scrh); + mp_msg(MSGT_VO, MSGL_V,"geometry set to width: %i," "height: %i, xoff: %s%i, yoff: %s%i, xper: %i, yper: %i\n", width, height, xsign, xoff, ysign, yoff, xper, yper); + if (width > 0 && widw) *widw = width; + if (height > 0 && widh) *widh = height; + if(xoff != INT_MIN && xsign[0] == '-') xoff = scrw - *widw - xoff; if(yoff != INT_MIN && ysign[0] == '-') yoff = scrh - *widh - yoff; if(xper >= 0 && xper <= 100) xoff = (scrw - *widw) * ((float)xper / 100.0); @@ -89,13 +95,9 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh) mp_msg(MSGT_VO, MSGL_V,"geometry set to width: %i," "height: %i, xoff: %i, yoff: %i, xper: %i, yper: %i\n", width, height, xoff, yoff, xper, yper); - mp_msg(MSGT_VO, MSGL_V,"geometry window parameter: widw: %i," - " widh: %i, scrw: %i, scrh: %i\n",*widw, *widh, scrw, scrh); if (xoff != INT_MIN && xpos) *xpos = xoff; if (yoff != INT_MIN && ypos) *ypos = yoff; - if (width > 0 && widw) *widw = width; - if (height > 0 && widh) *widh = height; geometry_wh_changed = width > 0 || height > 0; geometry_xy_changed = xoff != INT_MIN || yoff != INT_MIN; |