Skip to content

Commit

Permalink
Preferences: touch multi-sampling option only with QML enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Feb 12, 2024
1 parent b3bf898 commit 0ccbaed
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/preferences/dialog/dlgprefinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ void DlgPrefInterface::slotResetToDefaults() {
comboBoxScreensaver->setCurrentIndex(comboBoxScreensaver->findData(
static_cast<int>(mixxx::ScreenSaverPreference::PREVENT_ON)));

#ifdef MIXXX_USE_QML
mulitSamplingComboBox->setCurrentIndex(4); // 4x MSAA
#endif

#ifdef Q_OS_IOS
// Tooltips off everywhere.
radioButtonTooltipsOff->setChecked(true);
Expand Down Expand Up @@ -446,18 +450,25 @@ void DlgPrefInterface::slotApply() {
static_cast<mixxx::ScreenSaverPreference>(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
Expand Down

0 comments on commit 0ccbaed

Please sign in to comment.