mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +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();
|
screenComboBox->clear();
|
||||||
|
mResolutionsPerScreen.clear();
|
||||||
for (int i = 0; i < displays; i++)
|
for (int i = 0; i < displays; i++)
|
||||||
{
|
{
|
||||||
|
mResolutionsPerScreen.append(getAvailableResolutions(i));
|
||||||
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
|
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
|
||||||
}
|
}
|
||||||
screenChanged(0);
|
screenChanged(0);
|
||||||
@ -332,7 +334,7 @@ void Launcher::GraphicsPage::screenChanged(int screen)
|
|||||||
{
|
{
|
||||||
if (screen >= 0) {
|
if (screen >= 0) {
|
||||||
resolutionComboBox->clear();
|
resolutionComboBox->clear();
|
||||||
resolutionComboBox->addItems(getAvailableResolutions(screen));
|
resolutionComboBox->addItems(mResolutionsPerScreen[screen]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ namespace Launcher
|
|||||||
Files::ConfigurationManager &mCfgMgr;
|
Files::ConfigurationManager &mCfgMgr;
|
||||||
Settings::Manager &mEngineSettings;
|
Settings::Manager &mEngineSettings;
|
||||||
|
|
||||||
|
QVector<QStringList> mResolutionsPerScreen;
|
||||||
|
|
||||||
static QStringList getAvailableResolutions(int screen);
|
static QStringList getAvailableResolutions(int screen);
|
||||||
static QRect getMaximumResolution();
|
static QRect getMaximumResolution();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user