diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-09-03 13:12:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 13:12:38 +0200 |
commit | 0ee5bb7a3ba04ed62b641e77c9209a38380a3613 (patch) | |
tree | 6dd01d0f8c975996838785226e0993cbed0d2835 /src/frontend/qt_sdl | |
parent | 1f634ed1579844e5b829bc890f2040343c505360 (diff) | |
parent | aed7a3224338e6b097aee324a4222e94f35277e8 (diff) |
Merge pull request #734 from v1993/master
Fix "Improved polygon splitting" option in GUI
Diffstat (limited to 'src/frontend/qt_sdl')
-rw-r--r-- | src/frontend/qt_sdl/VideoSettingsDialog.cpp | 8 | ||||
-rw-r--r-- | src/frontend/qt_sdl/VideoSettingsDialog.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.cpp b/src/frontend/qt_sdl/VideoSettingsDialog.cpp index ac1ed7a..971fee7 100644 --- a/src/frontend/qt_sdl/VideoSettingsDialog.cpp +++ b/src/frontend/qt_sdl/VideoSettingsDialog.cpp @@ -42,6 +42,7 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui( oldVSyncInterval = Config::ScreenVSyncInterval; oldSoftThreaded = Config::Threaded3D; oldGLScale = Config::GL_ScaleFactor; + oldGLBetterPolygons = Config::GL_BetterPolygons; grp3DRenderer = new QButtonGroup(this); grp3DRenderer->addButton(ui->rb3DSoftware, 0); @@ -60,6 +61,8 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui( ui->cbxGLResolution->addItem(QString("%1x native (%2x%3)").arg(i).arg(256*i).arg(192*i)); ui->cbxGLResolution->setCurrentIndex(Config::GL_ScaleFactor-1); + ui->cbBetterPolygons->setChecked(Config::GL_BetterPolygons != 0); + if (!Config::ScreenVSync) ui->sbVSyncInterval->setEnabled(false); @@ -68,12 +71,14 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui( ui->cbGLDisplay->setEnabled(true); ui->cbSoftwareThreaded->setEnabled(true); ui->cbxGLResolution->setEnabled(false); + ui->cbBetterPolygons->setEnabled(false); } else { ui->cbGLDisplay->setEnabled(false); ui->cbSoftwareThreaded->setEnabled(false); ui->cbxGLResolution->setEnabled(true); + ui->cbBetterPolygons->setEnabled(true); } } @@ -99,6 +104,7 @@ void VideoSettingsDialog::on_VideoSettingsDialog_rejected() Config::ScreenVSyncInterval = oldVSyncInterval; Config::Threaded3D = oldSoftThreaded; Config::GL_ScaleFactor = oldGLScale; + Config::GL_BetterPolygons = oldGLBetterPolygons; bool new_gl = (Config::ScreenUseGL != 0) || (Config::_3DRenderer != 0); emit updateVideoSettings(old_gl != new_gl); @@ -117,12 +123,14 @@ void VideoSettingsDialog::onChange3DRenderer(int renderer) ui->cbGLDisplay->setEnabled(true); ui->cbSoftwareThreaded->setEnabled(true); ui->cbxGLResolution->setEnabled(false); + ui->cbBetterPolygons->setEnabled(false); } else { ui->cbGLDisplay->setEnabled(false); ui->cbSoftwareThreaded->setEnabled(false); ui->cbxGLResolution->setEnabled(true); + ui->cbBetterPolygons->setEnabled(true); } bool new_gl = (Config::ScreenUseGL != 0) || (Config::_3DRenderer != 0); diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.h b/src/frontend/qt_sdl/VideoSettingsDialog.h index f18793c..2645eef 100644 --- a/src/frontend/qt_sdl/VideoSettingsDialog.h +++ b/src/frontend/qt_sdl/VideoSettingsDialog.h @@ -79,6 +79,7 @@ private: int oldVSyncInterval; int oldSoftThreaded; int oldGLScale; + int oldGLBetterPolygons; }; #endif // VIDEOSETTINGSDIALOG_H |