mirror of
https://github.com/yawut/SDL.git
synced 2026-08-23 09:15:18 -05:00
SDL_Init() is now just a wrapper around SDL_InitSubSystem().
This commit is contained in:
25
src/SDL.c
25
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
|
||||
|
||||
Reference in New Issue
Block a user