Skip to content

Commit 9905309

Browse files
kavika13icculus
authored andcommitted
Update docs to describe enum result for SDL_GetCameraPermissionState
1 parent 964bedf commit 9905309

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/SDL3/SDL_camera.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id
360360
* on others the approval might be implicit and not alert the user at all.
361361
*
362362
* This function can be used to check the status of that approval. It will
363-
* return 0 if still waiting for user response, 1 if the camera is approved
364-
* for use, and -1 if the user denied access.
363+
* return SDL_CAMERA_PERMISSION_STATE_PENDING if waiting for user response,
364+
* SDL_CAMERA_PERMISSION_STATE_APPROVED if the camera is approved for use,
365+
* and SDL_CAMERA_PERMISSION_STATE_DENIED if the user denied access.
365366
*
366367
* Instead of polling with this function, you can wait for a
367368
* SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event
@@ -372,8 +373,9 @@ extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id
372373
* SDL_CloseCamera() to dispose of it.
373374
*
374375
* \param camera the opened camera device to query.
375-
* \returns -1 if user denied access to the camera, 1 if user approved access,
376-
* 0 if no decision has been made yet.
376+
* \returns an SDL_CameraPermissionState value indicating if access is granted,
377+
* or `SDL_CAMERA_PERMISSION_STATE_PENDING` if the decision is still
378+
* pending.
377379
*
378380
* \threadsafety It is safe to call this function from any thread.
379381
*

0 commit comments

Comments
 (0)