/* Initialize SDL system and subsystems */
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == -1)
+ if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == -1)
{
fprintf(stderr, "%s\n", SDL_GetError());
return 1;
{
if (config_user_path(NULL))
{
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == 0)
+ if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == 0)
{
config_init();
config_load();
int video_init(const char *title, const char *icon)
{
+ SDL_QuitSubSystem(SDL_INIT_VIDEO);
+
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
+ {
+ fprintf(stderr, "%s\n", SDL_GetError());
+ return 0;
+ }
+
/* This has to happen before mode setting... */
set_SDL_icon(icon);