diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-12-28 20:24:24 -0500 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-01-07 19:19:40 -0500 |
commit | 05dbb47af51fb00826912155da85469cb74022db (patch) | |
tree | 3162febaeb374ee6310491f75d94b2ec4918b5ae /src/yuzu/configuration/configure_system.cpp | |
parent | dbb1eb9c29e072e77b66efa28ea21e814100d6ee (diff) |
settings: Use std::chrono::seconds instead of s64 for RTC
Diffstat (limited to 'src/yuzu/configuration/configure_system.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 753db75d22..94e27349da 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -77,8 +77,9 @@ void ConfigureSystem::setConfiguration() { 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)); + const auto rtc_time = Settings::values.custom_rtc.value_or( + std::chrono::seconds(QDateTime::currentSecsSinceEpoch())); + ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count())); } void ConfigureSystem::ReadSystemSettings() {} @@ -95,7 +96,8 @@ void ConfigureSystem::applyConfiguration() { Settings::values.rng_seed = std::nullopt; if (ui->custom_rtc_checkbox->isChecked()) - Settings::values.custom_rtc = ui->custom_rtc_edit->dateTime().toSecsSinceEpoch(); + Settings::values.custom_rtc = + std::chrono::seconds(ui->custom_rtc_edit->dateTime().toSecsSinceEpoch()); else Settings::values.custom_rtc = std::nullopt; |