SDL_Init() is now just a wrapper around SDL_InitSubSystem().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 07 Aug 2013 11:14:16 -0700
changeset 75905706d7fc10d0
parent 7589 e9a7333d86f0
child 7591 56550c03824b
SDL_Init() is now just a wrapper around SDL_InitSubSystem().
src/SDL.c
     1.1 --- a/src/SDL.c	Wed Aug 07 11:12:11 2013 -0700
     1.2 +++ b/src/SDL.c	Wed Aug 07 11:14:16 2013 -0700
     1.3 @@ -107,6 +107,15 @@
     1.4          return -1;
     1.5      }
     1.6  
     1.7 +    /* Clear the error message */
     1.8 +    SDL_ClearError();
     1.9 +
    1.10 +#if SDL_VIDEO_DRIVER_WINDOWS
    1.11 +    if (SDL_HelperWindowCreate() < 0) {
    1.12 +        return -1;
    1.13 +    }
    1.14 +#endif
    1.15 +
    1.16  #if !SDL_TIMERS_DISABLED
    1.17      SDL_InitTicks();
    1.18  #endif
    1.19 @@ -225,21 +234,7 @@
    1.20  int
    1.21  SDL_Init(Uint32 flags)
    1.22  {
    1.23 -    /* Clear the error message */
    1.24 -    SDL_ClearError();
    1.25 -
    1.26 -#if SDL_VIDEO_DRIVER_WINDOWS
    1.27 -    if (SDL_HelperWindowCreate() < 0) {
    1.28 -        return -1;
    1.29 -    }
    1.30 -#endif
    1.31 -
    1.32 -    /* Initialize the desired subsystems */
    1.33 -    if (SDL_InitSubSystem(flags) < 0) {
    1.34 -        return (-1);
    1.35 -    }
    1.36 -
    1.37 -    return (0);
    1.38 +    return SDL_InitSubSystem(flags);
    1.39  }
    1.40  
    1.41  void