[MPlayer-cvslog] r34702 - trunk/libvo/sdl_common.c
reimar
subversion at mplayerhq.hu
Sun Feb 12 20:03:19 CET 2012
Author: reimar
Date: Sun Feb 12 20:03:19 2012
New Revision: 34702
Log:
SDL: add support for setting window position.
Currently only works with -vo gl since -vo sdl does
not yet call geometry().
Modified:
trunk/libvo/sdl_common.c
Modified: trunk/libvo/sdl_common.c
==============================================================================
--- trunk/libvo/sdl_common.c Sun Feb 12 19:52:38 2012 (r34701)
+++ trunk/libvo/sdl_common.c Sun Feb 12 20:03:19 2012 (r34702)
@@ -25,6 +25,7 @@
#include "input/input.h"
#include "input/mouse.h"
#include "video_out.h"
+#include "geometry.h"
static int old_w;
static int old_h;
@@ -121,6 +122,11 @@ SDL_Surface *sdl_set_mode(int bpp, uint3
#endif
if (!vo_border)
flags |= SDL_NOFRAME;
+ if (geometry_xy_changed) {
+ char envstr[20];
+ snprintf(envstr, sizeof(envstr), "%i,%i", vo_dx, vo_dy);
+ setenv("SDL_VIDEO_WINDOW_POS", envstr, 1);
+ }
s = SDL_SetVideoMode(vo_dwidth, vo_dheight, bpp, flags);
if (!s) {
mp_msg(MSGT_VO, MSGL_FATAL, "SDL SetVideoMode failed: %s\n", SDL_GetError());
More information about the MPlayer-cvslog
mailing list