summaryrefslogtreecommitdiffstats
path: root/libvo/sdl_common.c
diff options
context:
space:
mode:
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)
{