mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3589
initramfs (2): fix(avform): add missing "first" video mode back to video modes fix(avform): display true video height in video mode selection
This commit is contained in:
commit
a446294ea8
|
@ -247,6 +247,13 @@ void AVForm::selectBestModes(QVector<VideoMode> &allVideoModes)
|
|||
for (auto it = bestModeInds.rbegin(); it != bestModeInds.rend(); ++it)
|
||||
{
|
||||
VideoMode mode = allVideoModes[it->second];
|
||||
|
||||
if (newVideoModes.empty())
|
||||
{
|
||||
newVideoModes.push_back(mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
int size = getModeSize(mode);
|
||||
auto result = std::find_if(newVideoModes.cbegin(), newVideoModes.cend(),
|
||||
[size](VideoMode mode) { return getModeSize(mode) == size; });
|
||||
|
@ -254,6 +261,7 @@ void AVForm::selectBestModes(QVector<VideoMode> &allVideoModes)
|
|||
if (result == newVideoModes.end())
|
||||
newVideoModes.push_back(mode);
|
||||
}
|
||||
}
|
||||
allVideoModes = newVideoModes;
|
||||
}
|
||||
|
||||
|
@ -271,7 +279,7 @@ void AVForm::fillCameraModesComboBox()
|
|||
qDebug("width: %d, height: %d, FPS: %f, pixel format: %s\n", mode.width, mode.height, mode.FPS, pixelFormat.toStdString().c_str());
|
||||
|
||||
if (mode.height && mode.width)
|
||||
str += QString("%1p").arg(getModeSize(mode));
|
||||
str += QString("%1p").arg(mode.height);
|
||||
else
|
||||
str += tr("Default resolution");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user