Skip to content

wiiu: initializing a hardware renderer crashes if one was already created #96

Description

@mrpapersonic

Bug Report

What's the issue you encountered?

Creating a hardware renderer, destroying it, creating a software renderer, destroying it, and then creating a hardware renderer crashes the system.

How can the issue be reproduced?

int main(void)
{
    SDL_Window *window;
    SDL_Renderer *renderer;

    window = SDL_CreateWindow("ZUPA", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 400, SDL_WINDOW_RESIZABLE);

    renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
    SDL_DestroyRenderer(renderer);
    renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE);
    SDL_DestroyRenderer(renderer);
    renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); // <- Crash here
    SDL_DestroyRenderer(renderer);

    SDL_DestroyWindow(window);

    return 0;
}

Environment?

I am using binaries compiled on Ubuntu 24.04 through the devkitpro docker image on github actions. The action can be seen here. (Note there is an outdated comment there from before my keyboard patches were merged, you can see later in the file it uses this github repo.)

Additional context?

N/A

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