RMG-Input: add 'SDL controller mode' option

This commit is contained in:
Rosalie Wanders committed 2024-07-28 14:44:55 +02:00
1 parent e112e324f7
commit 9b5cc05b9f
3 files changed
+60 -2

No files matched your search

@@ -31,6 +31,9 @@ OptionsDialog::OptionsDialog(QWidget* parent, OptionsDialogSettings settings,
this->filterEventsForButtonsCheckBox->setChecked(settings.FilterEventsForButtons);
this->filterEventsForAxisCheckBox->setChecked(settings.FilterEventsForAxis);
// global settings
this->sdlControllerModeComboBox->setCurrentIndex(CoreSettingsGetIntValue(SettingsID::Input_ControllerMode));
if (!CoreIsEmulationRunning() && !CoreIsEmulationPaused())
{
this->hideEmulationInfoText();
@@ -86,6 +89,9 @@ void OptionsDialog::accept()
this->settings.FilterEventsForButtons = this->filterEventsForButtonsCheckBox->isChecked();
this->settings.FilterEventsForAxis = this->filterEventsForAxisCheckBox->isChecked();
// save global settings now
CoreSettingsSetValue(SettingsID::Input_ControllerMode, this->sdlControllerModeComboBox->currentIndex());
QDialog::accept();
}