You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int imgFlags = IMG_INIT_PNG;
if( !( IMG_Init( imgFlags ) ) )
{
printf( "SDL_image could not initialize! SDL_image Error: %s\n", IMG_GetError() );
return false;
}
This will always print the following message to the console
SDL_image could not initialize! SDL_image Error: PNG images are not supported
Interestingly, simply not calling IMG_Init makes everything work in Emscripten.
Even more interestingly, whether one calls IMG_Init or not has no effect at all in NATIVE sdl2.
I don't know what to make of it.
But at the very least, the Emscripten port should spit something like "You don't need to call IMG_Init" rather than just throw a confusing unrelated error.
This will always print the following message to the console
Interestingly, simply not calling IMG_Init makes everything work in Emscripten.
Even more interestingly, whether one calls IMG_Init or not has no effect at all in NATIVE sdl2.
I don't know what to make of it.
But at the very least, the Emscripten port should spit something like "You don't need to call IMG_Init" rather than just throw a confusing unrelated error.