summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_system.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-06-05 18:03:05 -0400
committerGitHub <noreply@github.com>2019-06-05 18:03:05 -0400
commit8d7a012297ea884f0309ed2207eeb5e6c8d6a495 (patch)
treeb6fa2198c4656ad70a3e916e56a7ee3ec4fc61d4 /src/yuzu/configuration/configure_system.cpp
parent0bcc305797924b4265106423d035fa3ce81c066c (diff)
parente1d755bdda96fe8b25fc8be4181f48ca158679f1 (diff)
Merge pull request #2521 from lioncash/naming
yuzu/configuration: Make function naming consistent
Diffstat (limited to 'src/yuzu/configuration/configure_system.cpp')
-rw-r--r--src/yuzu/configuration/configure_system.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index e588b21f2..5f0ed2f61 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -23,22 +23,24 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
connect(ui->rng_seed_checkbox, &QCheckBox::stateChanged, this, [this](bool checked) {
ui->rng_seed_edit->setEnabled(checked);
- if (!checked)
+ if (!checked) {
ui->rng_seed_edit->setText(QStringLiteral("00000000"));
+ }
});
connect(ui->custom_rtc_checkbox, &QCheckBox::stateChanged, this, [this](bool checked) {
ui->custom_rtc_edit->setEnabled(checked);
- if (!checked)
+ if (!checked) {
ui->custom_rtc_edit->setDateTime(QDateTime::currentDateTime());
+ }
});
- this->setConfiguration();
+ SetConfiguration();
}
ConfigureSystem::~ConfigureSystem() = default;
-void ConfigureSystem::setConfiguration() {
+void ConfigureSystem::SetConfiguration() {
enabled = !Core::System::GetInstance().IsPoweredOn();
ui->combo_language->setCurrentIndex(Settings::values.language_index);
@@ -61,22 +63,25 @@ void ConfigureSystem::setConfiguration() {
void ConfigureSystem::ReadSystemSettings() {}
-void ConfigureSystem::applyConfiguration() {
- if (!enabled)
+void ConfigureSystem::ApplyConfiguration() {
+ if (!enabled) {
return;
+ }
Settings::values.language_index = ui->combo_language->currentIndex();
- if (ui->rng_seed_checkbox->isChecked())
+ if (ui->rng_seed_checkbox->isChecked()) {
Settings::values.rng_seed = ui->rng_seed_edit->text().toULongLong(nullptr, 16);
- else
+ } else {
Settings::values.rng_seed = std::nullopt;
+ }
- if (ui->custom_rtc_checkbox->isChecked())
+ if (ui->custom_rtc_checkbox->isChecked()) {
Settings::values.custom_rtc =
std::chrono::seconds(ui->custom_rtc_edit->dateTime().toSecsSinceEpoch());
- else
+ } else {
Settings::values.custom_rtc = std::nullopt;
+ }
Settings::Apply();
}
@@ -89,8 +94,10 @@ void ConfigureSystem::RefreshConsoleID() {
"if you use an outdated config savegame. Continue?");
reply = QMessageBox::critical(this, tr("Warning"), warning_text,
QMessageBox::No | QMessageBox::Yes);
- if (reply == QMessageBox::No)
+ if (reply == QMessageBox::No) {
return;
+ }
+
u64 console_id{};
ui->label_console_id->setText(
tr("Console ID: 0x%1").arg(QString::number(console_id, 16).toUpper()));