From a8d585aac314041bdf1394631c2e943ba23591ed Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 26 Dec 2024 17:17:08 -0800
Subject: [PATCH] Don't try to enumerate possible texture failure reasons.
This can cause misunderstanding about how texture creation works, as seen in https://github.com/libsdl-org/SDL/issues/9504. Instead let people check the error for more information on why creation may have failed.
---
include/SDL3/SDL_render.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h
index a466a33da5590..ec0dd14744e89 100644
--- a/include/SDL3/SDL_render.h
+++ b/include/SDL3/SDL_render.h
@@ -533,9 +533,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentRenderOutputSize(SDL_Renderer *re
* \param access one of the enumerated values in SDL_TextureAccess.
* \param w the width of the texture in pixels.
* \param h the height of the texture in pixels.
- * \returns a pointer to the created texture or NULL if no rendering context
- * was active, the format was unsupported, or the width or height
- * were out of range; call SDL_GetError() for more information.
+ * \returns the created texture or NULL on failure; call SDL_GetError() for
+ * more information.
*
* \threadsafety This function should only be called on the main thread.
*
@@ -673,9 +672,8 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende
*
* \param renderer the rendering context.
* \param props the properties to use.
- * \returns a pointer to the created texture or NULL if no rendering context
- * was active, the format was unsupported, or the width or height
- * were out of range; call SDL_GetError() for more information.
+ * \returns the created texture or NULL on failure; call SDL_GetError() for
+ * more information.
*
* \threadsafety This function should only be called on the main thread.
*