Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed return value for SDL_CreateRenderer()

  • Loading branch information
slouken committed Mar 15, 2009
1 parent ebcbc23 commit 48596641f24d875d21181fc4fc2a2703fc41a6ed
Showing with 3 additions and 3 deletions.
  1. +1 −2 include/SDL_video.h
  2. +2 −1 src/video/SDL_video.c
@@ -814,8 +814,7 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
* \param index The index of the rendering driver to initialize, or -1 to initialize the first one supporting the requested flags.
* \param flags SDL_RendererFlags
*
* \return 0 on success, -1 if the flags were not supported, or -2 if
* there isn't enough memory to support the requested flags
* \return 0 on success, -1 if there was an error creating the renderer.
*
* \sa SDL_SelectRenderer()
* \sa SDL_GetRendererInfo()
@@ -1456,7 +1456,8 @@ SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags)
SDL_Window *window = SDL_GetWindowFromID(windowID);

if (!window) {
return 0;
SDL_SetError("Invalid window ID");
return -1;
}
if (index < 0) {
const char *override = SDL_getenv("SDL_VIDEO_RENDERER");

0 comments on commit 4859664

Please sign in to comment.