SDL_CreateRenderer return value problem

int
SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags)
{
SDL_Window *window = SDL_GetWindowFromID(windowID);

if (!window) {
    return 0;
}

But according to the documentation in the .h file,:

  • \return 0 on success, -1 if the flags were not supported, or -2 if
  •     there isn't enough memory to support the requested flags
    

If there’s no valid window, it’s certainly not successful. Maybe it should return -3 instead?

If there’s no valid window, it’s certainly not successful.

Whoops, fixed, thanks! :slight_smile:

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC