summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-21 22:15:19 +0200
committerwm4 <wm4@nowhere>2012-11-01 02:07:46 +0100
commit8afa8c1ce58bfbeed1b66059364dee5ff3f10ceb (patch)
treebbfbb189f42d7e3b2dbd13dcbb58123b69311567
parentcaa64363c5bdcd6de43b5d594ae44db9e50a9ff4 (diff)
downloadmpv-8afa8c1ce58bfbeed1b66059364dee5ff3f10ceb.tar.bz2
mpv-8afa8c1ce58bfbeed1b66059364dee5ff3f10ceb.tar.xz
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.
-rw-r--r--libvo/vo_opengl.c6
-rw-r--r--libvo/vo_opengl_old.c8
2 files changed, 1 insertions, 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();