Get the position of the camera in relation to the system.
Defined in <SDL3/SDL_camera.h>
SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id);
SDL_CameraID | instance_id | the camera device instance ID. |
(SDL_CameraPosition) Returns the position of the camera on the system hardware.
Most platforms will report UNKNOWN, but mobile devices, like phones, can often make a distinction between cameras on the front of the device (that points towards the user, for taking "selfies") and cameras on the back (for filming in the direction the user is facing).
It is safe to call this function from any thread.
This function is available since SDL 3.1.3.