changeset 31684:6547d064bded

Use identical code to -vo gl for -wid mode in gl2. Fixes the same bugs (no video, video at wrong location...).
author reimar
date Sun, 18 Jul 2010 18:04:50 +0000
parents db0b49579eeb
children 31b6397e3b28
files libvo/vo_gl2.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_gl2.c	Sat Jul 17 13:14:53 2010 +0000
+++ b/libvo/vo_gl2.c	Sun Jul 18 18:04:50 2010 +0000
@@ -430,9 +430,10 @@
   } else {
     //aspect(x, y, A_NOZOOM);
     if (WinID >= 0) {
-      int top = 0, left = 0, w = x, h = y;
-      geometry(&top, &left, &w, &h, vo_screenwidth, vo_screenheight);
-      glViewport(top, left, w, h);
+      int left = 0, top = 0, w = x, h = y;
+      geometry(&left, &top, &w, &h, vo_dwidth, vo_dheight);
+      top = y - h - top;
+      glViewport(left, top, w, h);
     } else
       glViewport( 0, 0, x, y );
   }