From a83117e972f528ceead87b70b249a5e233d4f13b Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Apr 2010 08:35:35 +0000 Subject: Window resizing support for -vo gl with SDL backend. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31075 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/sdl_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libvo/sdl_common.c') diff --git a/libvo/sdl_common.c b/libvo/sdl_common.c index 9116bcbe55..4ef83a7e24 100644 --- a/libvo/sdl_common.c +++ b/libvo/sdl_common.c @@ -26,6 +26,18 @@ #include "input/mouse.h" #include "video_out.h" +int sdl_set_mode(int bpp, uint32_t flags) +{ + SDL_Surface *s = SDL_SetVideoMode(vo_dwidth, vo_dheight, bpp, flags); + if (!s) { + mp_msg(MSGT_VO, MSGL_FATAL, "SDL SetVideoMode failed: %s\n", SDL_GetError()); + return -1; + } + vo_dwidth = s->w; + vo_dheight = s->h; + return 0; +} + #define shift_key (event->key.keysym.mod==(KMOD_LSHIFT||KMOD_RSHIFT)) int sdl_default_handle_event(SDL_Event *event) { -- cgit v1.2.3