From 1f90d4825121ac1903d1a7b93a6b73d243aabbca Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 7 Aug 2013 11:14:16 -0700 Subject: [PATCH] SDL_Init() is now just a wrapper around SDL_InitSubSystem(). --- src/SDL.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/SDL.c b/src/SDL.c index 2fdefd9d2..ea5806de9 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -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 @@ -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