@@ -265,23 +265,26 @@
{
int width, height;
- int j;
+ int j, m;
for (j=0 ; j<resolutions.size(); j++)
{
if (resolutions.at(j).first.startsWith("viewfinder"))
{
- width = resolutions.at(j).second.split("x").at(0).toInt();
- height = resolutions.at(j).second.split("x").at(1).toInt();
-
- if (qMin(screenGeometry.height(), screenGeometry.width()) >=
- qMin(width, height) &&
- qMax(screenGeometry.height(), screenGeometry.width()) >=
- qMax(width, height))
+ for (m=0 ; m<resolutions.at(j).second.size(); m++)
{
- if (Camres::aspectRatioForResolution(resolutions.at(j).second).compare(Camres::aspectRatioForResolution(size)) == 0)
+ width = resolutions.at(j).second.at(m).split("x").at(0).toInt();
+ height = resolutions.at(j).second.at(m).split("x").at(1).toInt();
+
+ if (qMin(screenGeometry.height(), screenGeometry.width()) >=
+ qMin(width, height) &&
+ qMax(screenGeometry.height(), screenGeometry.width()) >=
+ qMax(width, height))
{
- return resolutions.at(j).second;
+ if (Camres::aspectRatioForResolution(resolutions.at(j).second.at(m)).compare(Camres::aspectRatioForResolution(size)) == 0)
+ {
+ return resolutions.at(j).second.at(m);
+ }
}
}
}
|