Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(video): do not list the same mode twice
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
b4n committed Jun 12, 2016
1 parent b4df3c8 commit 03c3923
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widget/form/settings/avform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03c3923

Please sign in to comment.