1
0
Fork 0

Launcher: hook up MSAA checkbox.

This commit is contained in:
James Turner 2015-01-07 11:30:44 +00:00
parent 72e0ea9e40
commit 55b092771f
2 changed files with 25 additions and 0 deletions

View file

@ -661,6 +661,11 @@ QtLauncher::QtLauncher() :
this, SLOT(updateSettingsSummary()));
connect(m_ui->startPausedCheck, SIGNAL(toggled(bool)),
this, SLOT(updateSettingsSummary()));
connect(m_ui->msaaCheckbox, SIGNAL(toggled(bool)),
this, SLOT(updateSettingsSummary()));
connect(m_ui->rembrandtCheckbox, SIGNAL(toggled(bool)),
this, SLOT(onRembrandtToggled(bool)));
updateSettingsSummary();
@ -783,6 +788,16 @@ void QtLauncher::onRun()
setEnableDisableOptionFromCheckbox(m_ui->fullScreenCheckbox, "fullscreen");
setEnableDisableOptionFromCheckbox(m_ui->startPausedCheck, "freeze");
// MSAA is more complex
if (!m_ui->rembrandtCheckbox->isChecked()) {
if (m_ui->msaaCheckbox->isChecked()) {
globals->get_props()->setIntValue("/sim/rendering/multi-sample-buffers", 1);
globals->get_props()->setIntValue("/sim/rendering/multi-samples", 4);
} else {
globals->get_props()->setIntValue("/sim/rendering/multi-sample-buffers", 0);
}
}
// aircraft
if (!m_selectedAircraft.isEmpty()) {
QFileInfo setFileInfo(m_selectedAircraft);
@ -1097,6 +1112,8 @@ void QtLauncher::updateSettingsSummary()
if (m_ui->rembrandtCheckbox->isChecked()) {
summary.append("Rembrandt enabled");
} else if (m_ui->msaaCheckbox->isChecked()) {
summary.append("anti-aliasing");
}
if (m_ui->fetchRealWxrCheckbox->isChecked()) {
@ -1133,5 +1150,11 @@ void QtLauncher::onRemoveSceneryPath()
}
}
void QtLauncher::onRembrandtToggled(bool b)
{
// Rembrandt and multi-sample are exclusive
m_ui->msaaCheckbox->setEnabled(!b);
}
#include "QtLauncher.moc"

View file

@ -50,6 +50,8 @@ private slots:
void onAddSceneryPath();
void onRemoveSceneryPath();
void onRembrandtToggled(bool b);
private:
void setAirport(FGAirportRef ref);
void updateSelectedAircraft();