--- a/include/SDL_video.h Thu Mar 12 03:51:39 2009 +0000
+++ b/include/SDL_video.h Sun Mar 15 15:50:18 2009 +0000
@@ -814,8 +814,7 @@
* \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()
--- a/src/video/SDL_video.c Thu Mar 12 03:51:39 2009 +0000
+++ b/src/video/SDL_video.c Sun Mar 15 15:50:18 2009 +0000
@@ -1456,7 +1456,8 @@
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");