summaryrefslogtreecommitdiffstats
path: root/libvo/sdl_common.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 08:35:35 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 08:35:35 +0000
commita83117e972f528ceead87b70b249a5e233d4f13b (patch)
tree8ee3221cc24de7e9e23df13cfe2b4342c97e06cd /libvo/sdl_common.c
parent7c2bef4bb5a3275dc2e3fb75dfeb03ac1f1b5755 (diff)
downloadmpv-a83117e972f528ceead87b70b249a5e233d4f13b.tar.bz2
mpv-a83117e972f528ceead87b70b249a5e233d4f13b.tar.xz
Window resizing support for -vo gl with SDL backend.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31075 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/sdl_common.c')
-rw-r--r--libvo/sdl_common.c12
1 files changed, 12 insertions, 0 deletions
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)
{