mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-21 09:11:49 +00:00
Change return type from void to int, for functions that set an error
(SDL_SetError(), SDL_OutOfMemory(), SDL_Unsupported(), SDL_InvalidParam()) Update prototype to forward errors to generic layer, for the functions: MoveCursor, WarpMouse, GL_DeleteContext, GetDisplayModes. Check invalid parameter in SDL_SetTextInputRect() generic layer.
This commit is contained in:
@@ -416,12 +416,14 @@ extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_CreatePixelFormat(Uint32 pixel_for
|
||||
* Free an SDL_PixelFormat structure allocated by SDL_CreatePixelFormat().
|
||||
*
|
||||
* \param format the SDL_PixelFormat structure to free
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_CreatePixelFormat
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyPixelFormat(SDL_PixelFormat *format);
|
||||
extern DECLSPEC int SDLCALL SDL_DestroyPixelFormat(SDL_PixelFormat *format);
|
||||
|
||||
/**
|
||||
* Create a palette structure with the specified number of color entries.
|
||||
@@ -478,12 +480,14 @@ extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
|
||||
* Free a palette created with SDL_CreatePalette().
|
||||
*
|
||||
* \param palette the SDL_Palette structure to be freed
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_CreatePalette
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyPalette(SDL_Palette * palette);
|
||||
extern DECLSPEC int SDLCALL SDL_DestroyPalette(SDL_Palette * palette);
|
||||
|
||||
/**
|
||||
* Map an RGB triple to an opaque pixel value for a given pixel format.
|
||||
|
Reference in New Issue
Block a user