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.
This commit is contained in:
Sam Lantinga
2024-12-26 17:17:08 -08:00
parent ca17d19f90
commit a8d585aac3

View File

@@ -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.
*