SDL_GetCameras() follows the SDL_GetStringRule

This commit is contained in:
Sam Lantinga
2024-07-18 16:33:52 -07:00
parent 0fe6603747
commit 01199469de
4 changed files with 12 additions and 13 deletions

View File

@@ -101,7 +101,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
SDL_CameraID *devices = SDL_GetCameras(&devcount);
const SDL_CameraID *devices = SDL_GetCameras(&devcount);
if (!devices) {
SDL_Log("SDL_GetCameras failed: %s", SDL_GetError());
return SDL_APP_FAILURE;
@@ -140,8 +140,6 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
}
}
SDL_free(devices);
if (!camera_id) {
SDL_Log("No cameras available?");
return SDL_APP_FAILURE;