mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:45:32 +00:00
Merge branch 'sdl-error-message-fix' into 'master'
SDL resolution list fixes in launcher graphics page Closes #5558 See merge request OpenMW/openmw!286
This commit is contained in:
commit
51bec5948f
2 changed files with 7 additions and 2 deletions
|
@ -65,16 +65,19 @@ bool Launcher::GraphicsPage::setupSDL()
|
|||
msgBox.setWindowTitle(tr("Error receiving number of screens"));
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>SDL_GetNumDisplayModes failed:</b><br><br>") + QString::fromUtf8(SDL_GetError()) + "<br>");
|
||||
msgBox.setText(tr("<br><b>SDL_GetNumVideoDisplays failed:</b><br><br>") + QString::fromUtf8(SDL_GetError()) + "<br>");
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
// Disconnect from SDL processes
|
||||
quitSDL();
|
||||
|
@ -331,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