Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
SDL_Init() is now just a wrapper around SDL_InitSubSystem().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 7, 2013
1 parent a27ecfe commit 1f90d48
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/SDL.c
Expand Up @@ -107,6 +107,15 @@ SDL_InitSubSystem(Uint32 flags)
return -1;
}

/* Clear the error message */
SDL_ClearError();

#if SDL_VIDEO_DRIVER_WINDOWS
if (SDL_HelperWindowCreate() < 0) {
return -1;
}
#endif

#if !SDL_TIMERS_DISABLED
SDL_InitTicks();
#endif
Expand Down Expand Up @@ -225,21 +234,7 @@ SDL_InitSubSystem(Uint32 flags)
int
SDL_Init(Uint32 flags)
{
/* Clear the error message */
SDL_ClearError();

#if SDL_VIDEO_DRIVER_WINDOWS
if (SDL_HelperWindowCreate() < 0) {
return -1;
}
#endif

/* Initialize the desired subsystems */
if (SDL_InitSubSystem(flags) < 0) {
return (-1);
}

return (0);
return SDL_InitSubSystem(flags);
}

void
Expand Down

0 comments on commit 1f90d48

Please sign in to comment.