Fixed a few remaining functions to directly return their values instead of an error code.

This commit is contained in:
Sam Lantinga
2024-07-16 21:15:56 -07:00
parent 1e828eec57
commit 3d2e5a0b66
15 changed files with 91 additions and 123 deletions

View File

@@ -1269,6 +1269,8 @@ Textures are created with SDL_SCALEMODE_LINEAR by default, and use SDL_BLENDMODE
SDL_QueryTexture() has been removed. The properties of the texture can be queried using SDL_PROP_TEXTURE_FORMAT_NUMBER, SDL_PROP_TEXTURE_ACCESS_NUMBER, SDL_PROP_TEXTURE_WIDTH_NUMBER, and SDL_PROP_TEXTURE_HEIGHT_NUMBER. A function SDL_GetTextureSize() has been added to get the size of the texture as floating point values.
SDL_GetRenderDrawBlendMode(), SDL_GetTextureBlendMode(), and SDL_GetTextureScaleMode() have been changed to return the values directly instead of an int error code.
Mouse and touch events are no longer filtered to change their coordinates, instead you
can call SDL_ConvertEventToRenderCoordinates() to explicitly map event coordinates into
the rendering viewport.
@@ -1712,6 +1714,8 @@ SDL_SetSurfaceColorKey() takes an SDL_bool to enable and disable colorkey. RLE a
SDL_SetSurfaceRLE() takes an SDL_bool to enable and disable RLE acceleration.
SDL_GetSurfaceBlendMode() and SDL_GetSurfaceColorKey() have been changed to return the values directly instead of an int error code.
The following functions have been renamed:
* SDL_BlitScaled() => SDL_BlitSurfaceScaled()
* SDL_ConvertSurfaceFormat() => SDL_ConvertSurface()
@@ -1749,8 +1753,6 @@ The following symbols have been renamed:
SDL_WindowsMessageHook has changed signatures so the message may be modified and it can block further message processing.
SDL_GetAndroidExternalStorageState() takes the state as an output parameter and returns 0 if the function succeeds or a negative error code if there was an error.
SDL_RequestAndroidPermission is no longer a blocking call; the caller now provides a callback function that fires when a response is available.
SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump() have been renamed to SDL_SetiOSAnimationCallback() and SDL_SetiOSEventPump(), respectively. SDL2 has had macros to provide this new name with the old symbol since the introduction of the iPad, but now the correctly-named symbol is the only option.