SDL_Init() is now just a wrapper around SDL_InitSubSystem().
This commit is contained in:
parent
d99a4adff9
commit
009e12858b
1 changed files with 10 additions and 15 deletions
25
src/SDL.c
25
src/SDL.c
|
@ -107,6 +107,15 @@ SDL_InitSubSystem(Uint32 flags)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear the error message */
|
||||||
|
SDL_ClearError();
|
||||||
|
|
||||||
|
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||||
|
if (SDL_HelperWindowCreate() < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !SDL_TIMERS_DISABLED
|
#if !SDL_TIMERS_DISABLED
|
||||||
SDL_InitTicks();
|
SDL_InitTicks();
|
||||||
#endif
|
#endif
|
||||||
|
@ -225,21 +234,7 @@ SDL_InitSubSystem(Uint32 flags)
|
||||||
int
|
int
|
||||||
SDL_Init(Uint32 flags)
|
SDL_Init(Uint32 flags)
|
||||||
{
|
{
|
||||||
/* Clear the error message */
|
return SDL_InitSubSystem(flags);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue