SDL_CAMERAPERMISSIONSTATE(3type)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

✨ SDL_CameraPermissionState(3type) ✨

okay bestie, welcome to the SDL3 DATATYPES corner of the man pages πŸ’… this one is literally just a lil enum, but it's the enum that decides whether your app gets to peek through the camera or not, so like... main character energy fr.


🌸 NAME 🌸

SDL_CameraPermissionState β€” the current state of a request for camera access.

that's it. that's the whole vibe. it's the "are we allowed to use the camera rn or nah" status indicator πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_camera.h>

typedef enum SDL_CameraPermissionState
{
    SDL_CAMERA_PERMISSION_STATE_DENIED = -1,
    SDL_CAMERA_PERMISSION_STATE_PENDING,
    SDL_CAMERA_PERMISSION_STATE_APPROVED
} SDL_CameraPermissionState;

so the way this works: you got SDL_CAMERA_PERMISSION_STATE_DENIED sitting at -1, and then the other two just fall in line after it β€” SDL_CAMERA_PERMISSION_STATE_PENDING and SDL_CAMERA_PERMISSION_STATE_APPROVED 🫢 no explicit values on those two, they just vibe off the -1 like the rest of the girlies.

ngl the fact that DENIED is the negative one is kinda iconic. it's giving "no ❀️" energy and honestly? respect πŸ’€


πŸ‘‘ AVAILABILITY πŸ‘‘

This enum is available since SDL 3.4.0. so if you're on anything older, it's not me, it's you β€” update babes ✨


πŸ’– SEE ALSO πŸ’–

  • SDL_GetCameraPermissionState(3) β€” the actual function that hands you one of these values, go read that one next bestie, it's the whole point πŸ¦‹

not me writing a whole fanpage for an enum with three members 😭 but listen, permission states matter, you do NOT wanna be the app that hits the camera without asking, that's a vibe check fail for sure πŸ™ˆ

Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_CameraPermissionState(3type) β€” mwah, that's a wrap, slay the day, drink water, go check your permission states πŸ’…πŸŒΈπŸ’œ

πŸ“¦ where this page comes from