camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule.

This commit is contained in:
Ryan C. Gordon
2024-06-13 18:13:51 -04:00
parent 2ad7c70ac6
commit 5bc654aad3
4 changed files with 7 additions and 9 deletions

View File

@@ -98,7 +98,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
SDL_Log("Saw %d camera devices.", devcount);
for (i = 0; i < devcount; i++) {
const SDL_CameraDeviceID device = devices[i];
char *name = SDL_GetCameraDeviceName(device);
const char *name = SDL_GetCameraDeviceName(device);
const SDL_CameraPosition position = SDL_GetCameraDevicePosition(device);
const char *posstr = "";
if (position == SDL_CAMERA_POSITION_FRONT_FACING) {
@@ -112,7 +112,6 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
camera_id = device;
}
SDL_Log(" - Camera #%d: %s %s", i, posstr, name);
SDL_free(name);
}
if (!camera_id) {