mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 15:39:10 +00:00
Added SDL_GetRenderSafeArea()
This commit is contained in:
parent
eb09264076
commit
cf8b158ccb
7 changed files with 81 additions and 4 deletions
|
@ -1443,6 +1443,26 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetRenderViewport(SDL_Renderer *renderer, SD
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_RenderViewportSet(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* Get the safe area for rendering within the current viewport.
|
||||
*
|
||||
* Some devices have portions of the screen which are partially obscured or
|
||||
* not interactive, possibly due to on-screen controls, curved edges, camera
|
||||
* notches, TV overscan, etc. This function provides the area of the current
|
||||
* viewport which is safe to have interactible content. You should continue rendering
|
||||
* into the rest of the render target, but it should not contain visually important
|
||||
* or interactible content.
|
||||
*
|
||||
* \param renderer the rendering context.
|
||||
* \param rect a pointer filled in with the area that is safe for
|
||||
* interactive content.
|
||||
* \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.
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect);
|
||||
|
||||
/**
|
||||
* Set the clip rectangle for rendering on the specified target.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue