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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libvo/sdl_common.c b/libvo/sdl_common.c
index 32c95ef4c8..5d493afd71 100644
--- a/libvo/sdl_common.c
+++ b/libvo/sdl_common.c
@@ -25,11 +25,13 @@
#include "input/keycodes.h"
#include "input/input.h"
#include "video_out.h"
+#include "aspect.h"
static int old_w;
static int old_h;
static int mode_flags;
static int reinit;
+static int screen_w, screen_h;
int vo_sdl_init(void)
{
@@ -39,6 +41,12 @@ int vo_sdl_init(void)
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0)
return 0;
+ if (screen_w == 0) {
+ const SDL_VideoInfo *vi = SDL_GetVideoInfo();
+ screen_w = vi->current_w;
+ screen_h = vi->current_h;
+ }
+
// Setup Keyrepeats (500/30 are defaults)
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/);
@@ -59,6 +67,15 @@ void vo_sdl_uninit(void)
SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
+void sdl_update_xinerama_info(void)
+{
+ if (vo_screenwidth <= 0 || vo_screenheight <= 0) {
+ vo_screenwidth = screen_w;
+ vo_screenheight = screen_h;
+ }
+ aspect_save_screenres(vo_screenwidth, vo_screenheight);
+}
+
void vo_sdl_fullscreen(void)
{
if (vo_fs) {