summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_sdl.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-13 01:03:55 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-13 01:03:55 +0000
commit31b7044dd773bdc63ad673d09a46255a845bcad3 (patch)
treed2a60abe8f38220c02ea17d523302a2252e229ba /src/video_out/video_out_sdl.c
parentf26c2306eab2cc93335a873027d5a6e57084886b (diff)
downloadxine-lib-31b7044dd773bdc63ad673d09a46255a845bcad3.tar.gz
xine-lib-31b7044dd773bdc63ad673d09a46255a845bcad3.tar.bz2
- bring syncfb back (yuy2 doesn't seem to work though)
- check for sdl support on class initialization CVS patchset: 3504 CVS date: 2002/12/13 01:03:55
Diffstat (limited to 'src/video_out/video_out_sdl.c')
-rw-r--r--src/video_out/video_out_sdl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c
index c8bf3732f..39afe4968 100644
--- a/src/video_out/video_out_sdl.c
+++ b/src/video_out/video_out_sdl.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_sdl.c,v 1.18 2002/12/13 00:20:11 miguelfreitas Exp $
+ * $Id: video_out_sdl.c,v 1.19 2002/12/13 01:03:56 miguelfreitas Exp $
*
* video_out_sdl.c, Simple DirectMedia Layer
*
@@ -554,8 +554,17 @@ static void dispose_class (video_driver_class_t *this_gen) {
static void *init_class (xine_t *xine, void *visual_gen) {
/* x11_visual_t *visual = (x11_visual_t *) visual_gen; */
- sdl_class_t *this = (sdl_class_t*) malloc (sizeof (sdl_class_t));
+ sdl_class_t *this;
+
+ /* check if we have SDL */
+ if ((SDL_Init (SDL_INIT_VIDEO)) < 0) {
+ printf ("video_out_sdl: open_plugin - sdl video initialization failed.\n");
+ return NULL;
+ }
+ SDL_QuitSubSystem (SDL_INIT_VIDEO);
+ this = (sdl_class_t*) malloc (sizeof (sdl_class_t));
+
this->driver_class.open_plugin = open_plugin;
this->driver_class.get_identifier = get_identifier;
this->driver_class.get_description = get_description;