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

fix(video): do not list the same mode twice

Do not provide more than one entry in the settings for the same actual
mode, even if it was selected for different expected resolutions.

For example, do not list 640x480 twice for both 480p and 360p if the
device doesn't have a better 360p mode, and simply skip the 360p entry.
This commit is contained in:
Colomban Wendling 2016-06-10 02:47:40 +02:00
parent b4df3c8b4a
commit 03c3923694

View File

@ -232,6 +232,10 @@ void AVForm::updateVideoModes(int curIndex)
{
int i = iter->second;
VideoMode mode = allVideoModes[i];
if (videoModes.contains(mode))
continue;
videoModes.append(mode);
if (mode.width==prefRes.width() && mode.height==prefRes.height() && mode.FPS == prefFPS && prefResIndex==-1)
prefResIndex = videoModes.size() - 1;