Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 3091:32efcc94b3da
Fixed return value for SDL_CreateRenderer()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 15 Mar 2009 15:50:18 +0000 |
parents | 0bc41e0361d3 |
children | cad1aefa2ed9 |
comparison
equal
deleted
inserted
replaced
3090:37f9304df6a9 | 3091:32efcc94b3da |
---|---|
1454 SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags) | 1454 SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags) |
1455 { | 1455 { |
1456 SDL_Window *window = SDL_GetWindowFromID(windowID); | 1456 SDL_Window *window = SDL_GetWindowFromID(windowID); |
1457 | 1457 |
1458 if (!window) { | 1458 if (!window) { |
1459 return 0; | 1459 SDL_SetError("Invalid window ID"); |
1460 return -1; | |
1460 } | 1461 } |
1461 if (index < 0) { | 1462 if (index < 0) { |
1462 const char *override = SDL_getenv("SDL_VIDEO_RENDERER"); | 1463 const char *override = SDL_getenv("SDL_VIDEO_RENDERER"); |
1463 int n = SDL_GetNumRenderDrivers(); | 1464 int n = SDL_GetNumRenderDrivers(); |
1464 for (index = 0; index < n; ++index) { | 1465 for (index = 0; index < n; ++index) { |