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:
parent
5538fea1d1
commit
a495888d3d
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,8 @@ namespace Launcher
|
||||
Files::ConfigurationManager &mCfgMgr;
|
||||
Settings::Manager &mEngineSettings;
|
||||
|
||||
QVector<QStringList> mResolutionsPerScreen;
|
||||
|
||||
static QStringList getAvailableResolutions(int screen);
|
||||
static QRect getMaximumResolution();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user