summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-25 16:18:16 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-25 16:18:16 +0000
commit98ef94eb18f7751724f416eafbf975489708892c (patch)
tree2c2be3dc6378e3d1d9ebb96c403481a018022e49 /libvo
parentf384349dfb857247a9f0dcc367b501eea4b0d520 (diff)
downloadmpv-98ef94eb18f7751724f416eafbf975489708892c.tar.bz2
mpv-98ef94eb18f7751724f416eafbf975489708892c.tar.xz
panscan support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16591 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 836a3177d0..c92d2459d1 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -537,6 +537,9 @@ static void resize(int *x,int *y){
{
glClear(GL_COLOR_BUFFER_BIT);
aspect(x, y, A_ZOOM);
+ panscan_calc();
+ *x += vo_panscan_x;
+ *y += vo_panscan_y;
glViewport( (vo_screenwidth-*x)/2, (vo_screenheight-*y)/2, *x, *y);
} else {
//aspect(x, y, A_NOZOOM);
@@ -798,6 +801,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
int_pause = 0;
+ panscan_init();
aspect_save_orig(width,height);
aspect_save_prescale(d_width,d_height);
aspect_save_screenres(vo_screenwidth,vo_screenheight);
@@ -1117,6 +1121,11 @@ static int control(uint32_t request, void *data, ...)
initGl(vo_dwidth, vo_dheight);
resize(&vo_dwidth, &vo_dheight);
return VO_TRUE;
+ case VOCTRL_GET_PANSCAN:
+ return VO_TRUE;
+ case VOCTRL_SET_PANSCAN:
+ resize (&vo_dwidth, &vo_dheight);
+ return VO_TRUE;
#ifndef GL_WIN32
case VOCTRL_SET_EQUALIZER:
{