forked from teamnwah/openmw-tes3coop
simpler remove of duplicates
This commit is contained in:
parent
6abb5d5f75
commit
89dee80dcf
1 changed files with 1 additions and 15 deletions
|
@ -285,7 +285,6 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
|||
return result;
|
||||
}
|
||||
|
||||
QList<SDL_DisplayMode> resolutions;
|
||||
for (modeIndex = 0; modeIndex < modes; modeIndex++)
|
||||
{
|
||||
if (SDL_GetDisplayMode(screen, modeIndex, &mode) < 0)
|
||||
|
@ -294,19 +293,6 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
|||
return result;
|
||||
}
|
||||
|
||||
bool isDuplicate = false;
|
||||
for (int i = 0; i < resolutions.count(); i++)
|
||||
{
|
||||
SDL_DisplayMode omode = resolutions.at(i);
|
||||
if (omode.w == mode.w && omode.h == mode.h)
|
||||
{
|
||||
isDuplicate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isDuplicate)
|
||||
continue;
|
||||
|
||||
QString aspect = getAspect(mode.w, mode.h);
|
||||
QString resolution = QString::number(mode.w) + QString(" x ") + QString::number(mode.h);
|
||||
|
||||
|
@ -317,10 +303,10 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
|||
resolution.append(tr("\t(Standard 4:3)"));
|
||||
}
|
||||
|
||||
resolutions.append(mode);
|
||||
result.append(resolution);
|
||||
}
|
||||
|
||||
result.removeDuplicates();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue