From d25dc40e70e9a1c25966db8e16a5efd5284fd336 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Thu, 28 May 2020 16:04:22 +0200 Subject: make it a bit better --- src/frontend/qt_sdl/VideoSettingsDialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.cpp b/src/frontend/qt_sdl/VideoSettingsDialog.cpp index 09f1ab4..9645a3d 100644 --- a/src/frontend/qt_sdl/VideoSettingsDialog.cpp +++ b/src/frontend/qt_sdl/VideoSettingsDialog.cpp @@ -59,7 +59,7 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui( for (int i = 1; i <= 16; i++) ui->cbxGLResolution->addItem(QString("%1x native (%2x%3)").arg(i).arg(256*i).arg(192*i)); ui->cbxGLResolution->setCurrentIndex(Config::GL_ScaleFactor-1); - +printf("GL scale = %d\n", Config::GL_ScaleFactor); if (Config::_3DRenderer == 0) { ui->cbGLDisplay->setEnabled(true); @@ -145,6 +145,9 @@ void VideoSettingsDialog::on_cbSoftwareThreaded_stateChanged(int state) void VideoSettingsDialog::on_cbxGLResolution_currentIndexChanged(int idx) { + // prevent a spurious change + if (ui->cbxGLResolution->count() < 16) return; + Config::GL_ScaleFactor = idx+1; emit updateVideoSettings(false); -- cgit v1.2.3