mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 19:24:20 +00:00
Document that the pitch value may be zero for surfaces that will be filled in by the application later.
Also verify that the pitch isn't zero for surfaces with valid pixels Fixes https://github.com/libsdl-org/SDL/issues/7143
This commit is contained in:
@@ -137,6 +137,9 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateSurface
|
||||
* No copy is made of the pixel data. Pixel data is not managed automatically;
|
||||
* you must free the surface before you free the pixel data.
|
||||
*
|
||||
* You may pass NULL for pixels and 0 for pitch to create a surface that you
|
||||
* will fill in with valid values later.
|
||||
*
|
||||
* \param pixels a pointer to existing pixel data
|
||||
* \param width the width of the surface
|
||||
* \param height the height of the surface
|
||||
|
||||
Reference in New Issue
Block a user