From 0ccbaed12b9c0ceeff667b661d54ba178fef28da Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 12 Feb 2024 10:46:32 +0100 Subject: [PATCH] Preferences: touch multi-sampling option only with QML enabled --- src/preferences/dialog/dlgprefinterface.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/preferences/dialog/dlgprefinterface.cpp b/src/preferences/dialog/dlgprefinterface.cpp index 4da8e1d507b..d53d05e17cc 100644 --- a/src/preferences/dialog/dlgprefinterface.cpp +++ b/src/preferences/dialog/dlgprefinterface.cpp @@ -325,6 +325,10 @@ void DlgPrefInterface::slotResetToDefaults() { comboBoxScreensaver->setCurrentIndex(comboBoxScreensaver->findData( static_cast(mixxx::ScreenSaverPreference::PREVENT_ON))); +#ifdef MIXXX_USE_QML + mulitSamplingComboBox->setCurrentIndex(4); // 4x MSAA +#endif + #ifdef Q_OS_IOS // Tooltips off everywhere. radioButtonTooltipsOff->setChecked(true); @@ -446,18 +450,25 @@ void DlgPrefInterface::slotApply() { static_cast(screensaverComboBoxState)); } +#ifdef MIXXX_USE_QML int multiSampling = mulitSamplingComboBox->itemData( mulitSamplingComboBox->currentIndex()) .toInt(); m_pConfig->set(ConfigKey(kPreferencesGroup, kMultiSamplingKey), ConfigValue(multiSampling)); +#endif - if (locale != m_localeOnUpdate || scaleFactor != m_dScaleFactor || - multiSampling != m_multiSampling) { + if (locale != m_localeOnUpdate || scaleFactor != m_dScaleFactor +#ifdef MIXXX_USE_QML + || multiSampling != m_multiSampling +#endif + ) { notifyRebootNecessary(); // hack to prevent showing the notification when pressing "Okay" after "Apply" m_localeOnUpdate = locale; m_dScaleFactor = scaleFactor; +#ifdef MIXXX_USE_QML m_multiSampling = multiSampling; +#endif } // load skin/scheme if necessary