Function SDL_GetCameraPosition

pub unsafe extern "C" fn SDL_GetCameraPosition(
    instance_id: u32,
) -> SDL_CameraPosition
Available on crate feature dep_sdl3 only.
Expand description

Get the position of the camera in relation to the system.

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).

§Parameters

  • instance_id: the camera device instance ID.

§Return value

Returns the position of the camera on the system hardware.

§Thread safety

It is safe to call this function from any thread.

§Availability

This function is available since SDL 3.2.0.

§See also