From 56e18d99aa4982fd7cedc4e6d9c71be1f5279adb Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 31 Dec 2012 08:44:46 +0100 Subject: vo_sdl: support -geometry properly Now the x and y origin options (-geometry WxH+X+Y) are supported too. --- video/out/vo_sdl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index faaa8db0a0..606618caa1 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -46,6 +46,7 @@ #include "aspect.h" #include "config.h" #include "vo.h" +#include "geometry.h" struct formatmap_entry { Uint32 sdl; @@ -254,8 +255,12 @@ static int init_renderer(struct vo *vo, int w, int h) struct priv *vc = vo->priv; vc->window = SDL_CreateWindow("MPV", - SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, + geometry_xy_changed + ? vo->dx + : SDL_WINDOWPOS_UNDEFINED, + geometry_xy_changed + ? vo->dy + : SDL_WINDOWPOS_UNDEFINED, w, h, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); if (!vc->window) { -- cgit v1.2.3