Skip to content

Commit

Permalink
Passing 0 returns the previously initialized loaders, but if specific…
Browse files Browse the repository at this point in the history
… loaders were requested, return the set of them that were initialized.
  • Loading branch information
slouken committed Jul 26, 2014
1 parent 3de758f commit 87e2a2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion IMG.c
Expand Up @@ -76,6 +76,11 @@ int IMG_Init(int flags)
{
int result = 0;

/* Passing 0 returns the currently initialized loaders */
if (!flags) {
return initialized;
}

if (flags & IMG_INIT_JPG) {
if ((initialized & IMG_INIT_JPG) || IMG_InitJPG() == 0) {
result |= IMG_INIT_JPG;
Expand All @@ -98,7 +103,7 @@ int IMG_Init(int flags)
}
initialized |= result;

return (initialized);
return result;
}

void IMG_Quit()
Expand Down

0 comments on commit 87e2a2f

Please sign in to comment.