mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
camera: Report rotation needed to account for device orientation.
Fixes #11476.
This commit is contained in:
@@ -241,6 +241,12 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
|
||||
* left edge of the image, if this surface is being used as a cursor.
|
||||
* - `SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER`: the hotspot pixel offset from the
|
||||
* top edge of the image, if this surface is being used as a cursor.
|
||||
* - `SDL_PROP_SURFACE_ROTATION_NUMBER`: the number of degrees a surface's
|
||||
* data is meant to be rotated clockwise to make the image
|
||||
* right-side up. Default 0. This is used by the camera API, if a mobile
|
||||
* device is oriented differently than what its camera provides (i.e. -
|
||||
* the camera always provides portrait images but the phone is being held
|
||||
* in landscape orientation). Since SDL 3.4.0.
|
||||
*
|
||||
* \param surface the SDL_Surface structure to query.
|
||||
* \returns a valid property ID on success or 0 on failure; call
|
||||
@@ -257,6 +263,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surfac
|
||||
#define SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING "SDL.surface.tonemap"
|
||||
#define SDL_PROP_SURFACE_HOTSPOT_X_NUMBER "SDL.surface.hotspot.x"
|
||||
#define SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER "SDL.surface.hotspot.y"
|
||||
#define SDL_PROP_SURFACE_ROTATION_NUMBER "SDL.surface.rotation"
|
||||
|
||||
/**
|
||||
* Set the colorspace used by a surface.
|
||||
|
||||
Reference in New Issue
Block a user