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.
This commit is contained in:
wm4 2012-10-21 22:15:19 +02:00
parent caa64363c5
commit 8afa8c1ce5
2 changed files with 1 additions and 13 deletions

View File

@ -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);

View File

@ -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();