yuzu/configuration: Make function naming consistent

This commit is contained in:
Lioncash
2019-05-26 00:39:23 -04:00
parent 1eb979221f
commit e1d755bdda
33 changed files with 234 additions and 213 deletions

View File

@ -15,12 +15,12 @@ namespace {
template <typename Dialog, typename... Args>
void CallConfigureDialog(ConfigureInputSimple* caller, Args&&... args) {
caller->applyConfiguration();
caller->ApplyConfiguration();
Dialog dialog(caller, std::forward<Args>(args)...);
const auto res = dialog.exec();
if (res == QDialog::Accepted) {
dialog.applyConfiguration();
dialog.ApplyConfiguration();
}
}
@ -103,27 +103,29 @@ ConfigureInputSimple::ConfigureInputSimple(QWidget* parent)
&ConfigureInputSimple::OnSelectProfile);
connect(ui->profile_configure, &QPushButton::pressed, this, &ConfigureInputSimple::OnConfigure);
this->loadConfiguration();
LoadConfiguration();
}
ConfigureInputSimple::~ConfigureInputSimple() = default;
void ConfigureInputSimple::applyConfiguration() {
void ConfigureInputSimple::ApplyConfiguration() {
auto index = ui->profile_combobox->currentIndex();
// Make the stored index for "Custom" very large so that if new profiles are added it
// doesn't change.
if (index >= static_cast<int>(INPUT_PROFILES.size() - 1))
if (index >= static_cast<int>(INPUT_PROFILES.size() - 1)) {
index = std::numeric_limits<int>::max();
}
UISettings::values.profile_index = index;
}
void ConfigureInputSimple::loadConfiguration() {
void ConfigureInputSimple::LoadConfiguration() {
const auto index = UISettings::values.profile_index;
if (index >= static_cast<int>(INPUT_PROFILES.size()) || index < 0)
if (index >= static_cast<int>(INPUT_PROFILES.size()) || index < 0) {
ui->profile_combobox->setCurrentIndex(static_cast<int>(INPUT_PROFILES.size() - 1));
else
} else {
ui->profile_combobox->setCurrentIndex(index);
}
}
void ConfigureInputSimple::OnSelectProfile(int index) {