Skip to content

Commit

Permalink
SDL_Init zero check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pan7 committed Jul 24, 2015
1 parent 36f65fd commit 2a38bca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/sdl/sdl_glimp.c
Expand Up @@ -491,7 +491,7 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
{
const char *driverName;

if (SDL_Init(SDL_INIT_VIDEO) == -1)
if (SDL_Init(SDL_INIT_VIDEO) != 0)
{
ri.Printf( PRINT_ALL, "SDL_Init( SDL_INIT_VIDEO ) FAILED (%s)\n", SDL_GetError());
return qfalse;
Expand Down
2 changes: 1 addition & 1 deletion code/sdl/sdl_input.c
Expand Up @@ -431,7 +431,7 @@ static void IN_InitJoystick( void )
if (!SDL_WasInit(SDL_INIT_JOYSTICK))
{
Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n");
if (SDL_Init(SDL_INIT_JOYSTICK) == -1)
if (SDL_Init(SDL_INIT_JOYSTICK) != 0)
{
Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError());
return;
Expand Down
2 changes: 1 addition & 1 deletion code/sdl/sdl_snd.c
Expand Up @@ -156,7 +156,7 @@ qboolean SNDDMA_Init(void)

if (!SDL_WasInit(SDL_INIT_AUDIO))
{
if (SDL_Init(SDL_INIT_AUDIO) == -1)
if (SDL_Init(SDL_INIT_AUDIO) != 0)
{
Com_Printf( "FAILED (%s)\n", SDL_GetError( ) );
return qfalse;
Expand Down

0 comments on commit 2a38bca

Please sign in to comment.