Fixed return value for SDL_CreateRenderer()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403557
This commit is contained in:
Sam Lantinga 2009-03-15 15:50:18 +00:00
parent 98c33d2db1
commit 65fa34140f
2 changed files with 3 additions and 3 deletions

View file

@ -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");