diff options
| author | bunnei <bunneidev@gmail.com> | 2019-01-10 17:05:21 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-10 17:05:21 -0500 | 
| commit | c9ef8b0af1a5908822ca0f3bb3b2238018a555e8 (patch) | |
| tree | 157da486e44b5f7083607159e1bb8bb3e4f20842 /src/yuzu_cmd | |
| parent | 83e8ad23310937bb72f4412c15f45231a19202f7 (diff) | |
| parent | ac7d8983ebc75b1b5e150ea7e03ff54267faf670 (diff) | |
Merge pull request #1959 from DarkLordZach/custom-rtc
settings: Add support for setting the RTC manually
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 12 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 | 
2 files changed, 16 insertions, 2 deletions
| diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index fe0d1eebf..7a77f76e8 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -325,13 +325,21 @@ void Config::ReadValues() {      Settings::values.current_user = std::clamp<int>(          sdl2_config->GetInteger("System", "current_user", 0), 0, Service::Account::MAX_USERS - 1); -    const auto enabled = sdl2_config->GetBoolean("System", "rng_seed_enabled", false); -    if (enabled) { +    const auto rng_seed_enabled = sdl2_config->GetBoolean("System", "rng_seed_enabled", false); +    if (rng_seed_enabled) {          Settings::values.rng_seed = sdl2_config->GetInteger("System", "rng_seed", 0);      } else {          Settings::values.rng_seed = std::nullopt;      } +    const auto custom_rtc_enabled = sdl2_config->GetBoolean("System", "custom_rtc_enabled", false); +    if (custom_rtc_enabled) { +        Settings::values.custom_rtc = +            std::chrono::seconds(sdl2_config->GetInteger("System", "custom_rtc", 0)); +    } else { +        Settings::values.custom_rtc = std::nullopt; +    } +      // Core      Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true);      Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 0f3f8da50..ba51a4a51 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -183,6 +183,12 @@ enable_nfc =  rng_seed_enabled =  rng_seed = +# Sets the current time (in seconds since 12:00 AM Jan 1, 1970) that will be used by the time service +# This will auto-increment, with the time set being the time the game is started +# This override will only occur if custom_rtc_enabled is true, otherwise the current time is used +custom_rtc_enabled = +custom_rtc = +  # Sets the account username, max length is 32 characters  # yuzu (default)  username = yuzu | 
