RMG-Input: implement per game profiles

This commit is contained in:
Rosalie Wanders committed 2022-11-14 00:20:06 +01:00
1 parent a47cee59cd
commit 49906b6825
6 files changed
+192 -12

No files matched your search

@@ -13,13 +13,19 @@
using namespace UserInterface;
OptionsDialog::OptionsDialog(QWidget* parent, QString settingsSection) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint)
OptionsDialog::OptionsDialog(QWidget* parent, QString mainSettingsSection, QString settingsSection) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint)
{
this->setupUi(this);
std::string section = settingsSection.toStdString();
this->settingsSection = settingsSection;
std::string section = settingsSection.toStdString();
// fallback to main settings section,
// if the current settings section doesn't exist
if (!CoreSettingsSectionExists(settingsSection.toStdString()))
{
section = mainSettingsSection.toStdString();
}
this->removeDuplicateMappingsCheckbox->setChecked(CoreSettingsGetBoolValue(SettingsID::Input_RemoveDuplicateMappings, section));
this->controllerPakComboBox->setCurrentIndex(CoreSettingsGetIntValue(SettingsID::Input_Pak, section));