1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(video): choose first available resolution in preview automatically

This commit is contained in:
sudden6 2017-12-21 23:37:25 +01:00
parent a2927de27d
commit 81522deabd
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -433,13 +433,15 @@ void AVForm::on_videoDevCombobox_currentIndexChanged(int index)
updateVideoModes(index);
videoModescomboBox->blockSignals(previouslyBlocked);
if (videoSettings->getScreenGrabbed())
if (videoSettings->getScreenGrabbed()) {
return;
}
int modeIndex = videoModescomboBox->currentIndex();
VideoMode mode = VideoMode();
if (0 < modeIndex && modeIndex < videoModes.size())
if (0 <= modeIndex && modeIndex < videoModes.size()) {
mode = videoModes[modeIndex];
}
camera.setupDevice(dev, mode);
if (dev == "none") {