mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 11:39:40 +00:00
Get per-monitor resolution list while SDL is alive
This commit is contained in:
parent
5538fea1d1
commit
a495888d3d
2 changed files with 5 additions and 1 deletions
|
@ -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 a new issue