camera: Added SDL_GetCameraDevicePosition.

Otherwise, as a property, you have to open each camera device to figure out
which ones are which.
This commit is contained in:
Ryan C. Gordon
2024-02-19 14:19:57 -05:00
parent b1ed49772c
commit 70b89ab70d
8 changed files with 75 additions and 49 deletions

View File

@@ -778,7 +778,7 @@ static void MaybeAddDevice(const char *path)
if (handle->path) {
handle->bus_info = SDL_strdup((char *)vcap.bus_info);
if (handle->bus_info) {
if (SDL_AddCameraDevice((const char *) vcap.card, add_data.num_specs, add_data.specs, handle)) {
if (SDL_AddCameraDevice((const char *) vcap.card, SDL_CAMERA_POSITION_UNKNOWN, add_data.num_specs, add_data.specs, handle)) {
SDL_free(add_data.specs);
return; // good to go.
}