comparison libvo/vo_sdl.c @ 14876:2b14e57570a8

10l Don't set SDL to X11 by default.
author ivo
date Tue, 01 Mar 2005 19:59:20 +0000
parents 29a09f111b41
children 05aa13cdf92f
comparison
equal deleted inserted replaced
14875:5ce2aca02b92 14876:2b14e57570a8
1591 } 1591 }
1592 1592
1593 static uint32_t preinit(const char *arg) 1593 static uint32_t preinit(const char *arg)
1594 { 1594 {
1595 struct sdl_priv_s *priv = &sdl_priv; 1595 struct sdl_priv_s *priv = &sdl_priv;
1596 char * sdl_driver; 1596 char * sdl_driver = NULL;
1597 int sdl_hwaccel; 1597 int sdl_hwaccel;
1598 int sdl_forcexv; 1598 int sdl_forcexv;
1599 opt_t subopts[] = { 1599 opt_t subopts[] = {
1600 {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0}, 1600 {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0},
1601 {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0}, 1601 {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0},
1603 {NULL, 0, NULL, NULL, 0} 1603 {NULL, 0, NULL, NULL, 0}
1604 }; 1604 };
1605 1605
1606 sdl_forcexv = 1; 1606 sdl_forcexv = 1;
1607 sdl_hwaccel = 1; 1607 sdl_hwaccel = 1;
1608 sdl_driver = strdup("x11");
1609 1608
1610 if (subopt_parse(arg, subopts) != 0) return -1; 1609 if (subopt_parse(arg, subopts) != 0) return -1;
1611 1610
1612 priv->rgbsurface = NULL; 1611 priv->rgbsurface = NULL;
1613 priv->overlay = NULL; 1612 priv->overlay = NULL;
1614 priv->surface = NULL; 1613 priv->surface = NULL;
1615 1614
1616 if(verbose > 2) printf("SDL: Opening Plugin\n"); 1615 if(verbose > 2) printf("SDL: Opening Plugin\n");
1617 1616
1618 if(sdl_driver) setenv("SDL_VIDEODRIVER", sdl_driver, 1); 1617 if(sdl_driver) {
1618 setenv("SDL_VIDEODRIVER", sdl_driver, 1);
1619 free(sdl_driver); 1619 free(sdl_driver);
1620 }
1620 1621
1621 /* does the user want SDL to try and force Xv */ 1622 /* does the user want SDL to try and force Xv */
1622 if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1); 1623 if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1);
1623 else setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "0", 1); 1624 else setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "0", 1);
1624 1625