diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index 445d01ca01..753db75d22 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -51,6 +51,12 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
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)
+ ui->custom_rtc_edit->setDateTime(QDateTime::currentDateTime());
+ });
+
this->setConfiguration();
}
@@ -67,6 +73,12 @@ void ConfigureSystem::setConfiguration() {
const auto rng_seed =
QString("%1").arg(Settings::values.rng_seed.value_or(0), 8, 16, QLatin1Char{'0'}).toUpper();
ui->rng_seed_edit->setText(rng_seed);
+
+ ui->custom_rtc_checkbox->setChecked(Settings::values.custom_rtc.has_value());
+ ui->custom_rtc_edit->setEnabled(Settings::values.custom_rtc.has_value());
+
+ const auto rtc_time = Settings::values.custom_rtc.value_or(QDateTime::currentSecsSinceEpoch());
+ ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time));
}
void ConfigureSystem::ReadSystemSettings() {}
@@ -82,6 +94,11 @@ void ConfigureSystem::applyConfiguration() {
else
Settings::values.rng_seed = std::nullopt;
+ if (ui->custom_rtc_checkbox->isChecked())
+ Settings::values.custom_rtc = ui->custom_rtc_edit->dateTime().toSecsSinceEpoch();
+ else
+ Settings::values.custom_rtc = std::nullopt;
+
Settings::Apply();
}
diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui
index 74e800c2a1..0733272987 100644
--- a/src/yuzu/configuration/configure_system.ui
+++ b/src/yuzu/configuration/configure_system.ui
@@ -22,6 +22,13 @@
System Settings
+ -
+
+
+ Sound output mode
+
+
+
-
@@ -114,27 +121,6 @@
- -
-
-
- Console ID:
-
-
-
- -
-
-
- Sound output mode
-
-
-
- -
-
-
- Birthday
-
-
-
-
-
@@ -206,6 +192,20 @@
+ -
+
+
+ Console ID:
+
+
+
+ -
+
+
+ Birthday
+
+
+
-
@@ -241,6 +241,13 @@
+ -
+
+
+ RNG Seed
+
+
+
-
@@ -248,14 +255,7 @@
- -
-
-
- RNG Seed
-
-
-
- -
+
-
@@ -276,6 +276,27 @@
+ -
+
+
+ Custom RTC
+
+
+
+ -
+
+
+
+ 1970
+ 1
+ 1
+
+
+
+ d MMM yyyy h:mm:ss AP
+
+
+