From 8afa8c1ce58bfbeed1b66059364dee5ff3f10ceb Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Oct 2012 22:15:19 +0200 Subject: vo_opengl, vo_opengl_old: remove -wid/viewport special case For reasons unknown to me, vo_gl had a special case for when the -wid option (slave mode embedding) and -geometry was used. This adjusted the viewport in a way different from normal operation. It's unknown what this was needed for (if it's sane at all), but since no other VOs use this special case, and since we broke slave mode compatibility anyway, remove it. --- libvo/vo_opengl.c | 6 ------ libvo/vo_opengl_old.c | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c index bcbff61244..eef7405561 100644 --- a/libvo/vo_opengl.c +++ b/libvo/vo_opengl.c @@ -1193,12 +1193,6 @@ static void resize(struct gl_priv *p) mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n", vo->dwidth, vo->dheight); p->vp_x = 0, p->vp_y = 0; - if (WinID >= 0) { - int w = vo->dwidth, h = vo->dheight; - int old_y = vo->dheight; - geometry(&p->vp_x, &p->vp_y, &w, &h, vo->dwidth, vo->dheight); - p->vp_y = old_y - h - p->vp_y; - } p->vp_w = vo->dwidth, p->vp_h = vo->dheight; gl->Viewport(p->vp_x, p->vp_y, p->vp_w, p->vp_h); diff --git a/libvo/vo_opengl_old.c b/libvo/vo_opengl_old.c index d68ea3c5d5..b8b1fd4813 100644 --- a/libvo/vo_opengl_old.c +++ b/libvo/vo_opengl_old.c @@ -115,13 +115,7 @@ static void resize(struct vo *vo, int x, int y) GL *gl = p->gl; mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n", x, y); - if (WinID >= 0) { - int left = 0, top = 0, w = x, h = y; - geometry(&left, &top, &w, &h, vo->dwidth, vo->dheight); - top = y - h - top; - gl->Viewport(left, top, w, h); - } else - gl->Viewport(0, 0, x, y); + gl->Viewport(0, 0, x, y); gl->MatrixMode(GL_PROJECTION); gl->LoadIdentity(); -- cgit v1.2.3