mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-30 23:33:42 +08:00
testcamera: Report device name and SDL camera driver in the window title.
This commit is contained in:
parent
fa3e22c5da
commit
9d3d893322
@ -28,6 +28,7 @@ static SDL_CameraDeviceID back_camera = 0;
|
||||
|
||||
int SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
{
|
||||
char window_title[128];
|
||||
int devcount = 0;
|
||||
int i;
|
||||
const char *camera_name = NULL;
|
||||
@ -143,6 +144,9 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
SDL_snprintf(window_title, sizeof (window_title), "testcamera: %s (%s)", SDL_GetCameraDeviceName(camera_id), SDL_GetCurrentCameraDriver());
|
||||
SDL_SetWindowTitle(window, window_title);
|
||||
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user