diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2012-12-31 08:44:46 +0100 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2012-12-31 08:44:53 +0100 |
commit | 56e18d99aa4982fd7cedc4e6d9c71be1f5279adb (patch) | |
tree | 0947f927f5cb570fd0aa510cb03aa3147500e23a /video/out/vo_sdl.c | |
parent | a313af3d022e0fe1a0808f2308126e2a119ca022 (diff) | |
download | mpv-56e18d99aa4982fd7cedc4e6d9c71be1f5279adb.tar.bz2 mpv-56e18d99aa4982fd7cedc4e6d9c71be1f5279adb.tar.xz |
vo_sdl: support -geometry properly
Now the x and y origin options (-geometry WxH+X+Y) are supported too.
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r-- | video/out/vo_sdl.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) { |