Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

IMG_Init causes trouble #3

Description

@SafwatHalaby
    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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions