summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-20 15:09:19 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-20 15:09:19 +0000
commit502d604533403421dbc26cb0fbc6bd7549f0ed4c (patch)
treeddbd1f933f909aa54fdcfbb1337ff0fcdc1fd23b /libvo
parent8ab9f0251fb1c6e1f3177e2f34f9366397b5a77a (diff)
downloadmpv-502d604533403421dbc26cb0fbc6bd7549f0ed4c.tar.bz2
mpv-502d604533403421dbc26cb0fbc6bd7549f0ed4c.tar.xz
adding geometry support for xvidix
fixing some 10l in geometry.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9948 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/geometry.c16
-rw-r--r--libvo/vo_xvidix.c3
2 files changed, 13 insertions, 6 deletions
diff --git a/libvo/geometry.c b/libvo/geometry.c
index c7277cde2c..f0b158a9e0 100644
--- a/libvo/geometry.c
+++ b/libvo/geometry.c
@@ -60,17 +60,23 @@ 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: %1, yper: %i\n",
+ "height: %i, xoff: %i, yoff: %i, xper: %i, yper: %i\n",
width, height, xoff, yoff, xper, yper);
if(xper >= 0 && xper <= 100) xoff = (scrw - *widw) * ((float)xper / 100.0);
if(yper >= 0 && yper <= 100) yoff = (scrh - *widh) * ((float)yper / 100.0);
+ 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);
+
/* FIXME: better checking of bounds... */
- if(width < 0 || width > scrw) width = *widw;
- if(height < 0 || height > scrh) height = *widh;
- if(xoff < 0 || xoff + *widw > scrw) xoff = 0;
- if(yoff < 0 || yoff + *widh > scrh) yoff = 0;
+ if(width < 0 || width > scrw) width = (scrw < *widw) ? scrw : *widw;
+ if(height < 0 || height > scrh) height = (scrh < *widh) ? scrh : *widh;
+ if(xoff < 0 || xoff + width > scrw) xoff = 0;
+ if(yoff < 0 || yoff + height > scrh) yoff = 0;
if(xpos) *xpos = xoff;
if(ypos) *ypos = yoff;
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 7e7dea5e72..cf162804fd 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -238,6 +238,8 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
vo_dx = 0;
vo_dy = 0;
+ vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
+ geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
window_width = d_width;
window_height = d_height;
@@ -266,7 +268,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
aspect(&d_width, &d_height, A_NOZOOM);
- vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
vo_dwidth=d_width; vo_dheight=d_height;
#ifdef HAVE_NEW_GUI