summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c4
-rw-r--r--libvo/vo_xv.c1
-rw-r--r--libvo/x11_common.c7
3 files changed, 7 insertions, 5 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 0bf0877179..41de2c7e95 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -388,10 +388,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
vo_vm_switch(vm_width, vm_height, &modeline_width,
&modeline_height);
- vo_dx = (vo_screenwidth - modeline_width) / 2;
- vo_dy = (vo_screenheight - modeline_height) / 2;
- vo_dwidth = modeline_width;
- vo_dheight = modeline_height;
}
#endif
bg = WhitePixel(mDisplay, mScreen);
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 7386505d8a..d557838738 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -243,7 +243,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
vo_vm_switch(vm_width, vm_height, &modeline_width,
&modeline_height);
- aspect_save_screenres(modeline_width, modeline_height);
} else
#endif
XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay),
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index cfbdc83d9a..f03a062d73 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -1790,9 +1790,16 @@ void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width,
XF86VidModeLockModeSwitch(mDisplay, mScreen, 0);
XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]);
XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]);
+
+ // FIXME: all this is more of a hack than proper solution
X = (vo_screenwidth - *modeline_width) / 2;
Y = (vo_screenheight - *modeline_height) / 2;
XF86VidModeSetViewPort(mDisplay, mScreen, X, Y);
+ vo_dx = X;
+ vo_dy = Y;
+ vo_dwidth = *modeline_width;
+ vo_dheight = *modeline_height;
+ aspect_save_screenres(*modeline_width, *modeline_height);
}
}