mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 03:32:50 +00:00
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:
parent
caa64363c5
commit
8afa8c1ce5
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user