adjust hacky camera format selection to preselect the last

This commit is contained in:
Green Sky 2024-10-07 12:07:03 +02:00
parent 54409b01f5
commit 6a9e02e241
No known key found for this signature in database

View File

@ -47,7 +47,7 @@ std::shared_ptr<FrameStream2I<SDLVideoFrame>> SDLVideo2InputDevice::subscribe(vo
int speccount {0}; int speccount {0};
SDL_CameraSpec** specs = SDL_GetCameraSupportedFormats(_dev, &speccount); SDL_CameraSpec** specs = SDL_GetCameraSupportedFormats(_dev, &speccount);
if (specs != nullptr) { if (specs != nullptr) {
spec = *specs[0]; spec = *specs[speccount-1]; // start with last, as its usually the smallest
for (int spec_i = 1; spec_i < speccount; spec_i++) { for (int spec_i = 1; spec_i < speccount; spec_i++) {
if (specs[spec_i]->height > 1080) { if (specs[spec_i]->height > 1080) {
continue; continue;