diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 09:52:01 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 09:52:01 +0000 |
commit | 9661a675e50a18e0a098a5644e275e7806e910a9 (patch) | |
tree | ee0d6e04a9ddd488afcc60bc59acee99e7481466 /libvo/vo_sdl.c | |
parent | e0183c56b1f879a76788697f2a5ccfc02aa1d5e2 (diff) | |
download | mpv-9661a675e50a18e0a098a5644e275e7806e910a9.tar.bz2 mpv-9661a675e50a18e0a098a5644e275e7806e910a9.tar.xz |
Share SDL initialization code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31079 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_sdl.c')
-rw-r--r-- | libvo/vo_sdl.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 913ff03533..dbf634934e 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -397,9 +397,6 @@ static int sdl_open (void *plugin, void *name) priv->sdlflags |= SDL_DOUBLEBUF; #endif - /* Setup Keyrepeats (500/30 are defaults) */ - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/); - /* get information about the graphics adapter */ vidInfo = SDL_GetVideoInfo (); @@ -444,16 +441,6 @@ static int sdl_open (void *plugin, void *name) priv->bpp = 16; } - /* We don't want those in our event queue. - * We use SDL_KEYUP cause SDL_KEYDOWN seems to cause problems - * with keys need to be pressed twice, to be recognized. - */ - SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE); - SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); -// SDL_EventState(SDL_QUIT, SDL_IGNORE); - SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE); - SDL_EventState(SDL_USEREVENT, SDL_IGNORE); - /* Success! */ return 0; } @@ -1407,8 +1394,7 @@ uninit(void) sdl_close(); /* Cleanup SDL */ - if(SDL_WasInit(SDL_INIT_VIDEO)) - SDL_QuitSubSystem(SDL_INIT_VIDEO); + vo_sdl_uninit(); mp_msg(MSGT_VO,MSGL_DBG3, "SDL: Closed Plugin\n"); @@ -1458,12 +1444,10 @@ static int preinit(const char *arg) priv->bpp = 0; /* initialize the SDL Video system */ - if (!SDL_WasInit(SDL_INIT_VIDEO)) { - if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)) { + if (!vo_sdl_init()) { mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SDL_InitializationFailed, SDL_GetError()); return -1; - } } SDL_VideoDriverName(priv->driver, 8); |