1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00

Get per-monitor resolution list while SDL is alive

This commit is contained in:
AnyOldName3 2020-08-26 16:58:51 +01:00
parent 5538fea1d1
commit a495888d3d
2 changed files with 5 additions and 1 deletions

View File

@ -71,8 +71,10 @@ bool Launcher::GraphicsPage::setupSDL()
}
screenComboBox->clear();
mResolutionsPerScreen.clear();
for (int i = 0; i < displays; i++)
{
mResolutionsPerScreen.append(getAvailableResolutions(i));
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
}
screenChanged(0);
@ -332,7 +334,7 @@ void Launcher::GraphicsPage::screenChanged(int screen)
{
if (screen >= 0) {
resolutionComboBox->clear();
resolutionComboBox->addItems(getAvailableResolutions(screen));
resolutionComboBox->addItems(mResolutionsPerScreen[screen]);
}
}

View File

@ -38,6 +38,8 @@ namespace Launcher
Files::ConfigurationManager &mCfgMgr;
Settings::Manager &mEngineSettings;
QVector<QStringList> mResolutionsPerScreen;
static QStringList getAvailableResolutions(int screen);
static QRect getMaximumResolution();