diff options
| author | 2018-12-28 18:35:55 -0500 | |
|---|---|---|
| committer | 2019-01-07 19:18:45 -0500 | |
| commit | c6016856d878c8f68bc5518f3ef0270ea018bc3d (patch) | |
| tree | cd1dafa296f01781617e895bc6ce7538e51b2cd9 /src/yuzu_cmd | |
| parent | Merge pull request #1999 from ReinUsesLisp/dirty-shader (diff) | |
| download | yuzu-c6016856d878c8f68bc5518f3ef0270ea018bc3d.tar.gz yuzu-c6016856d878c8f68bc5518f3ef0270ea018bc3d.tar.xz yuzu-c6016856d878c8f68bc5518f3ef0270ea018bc3d.zip | |
settings: Add custom RTC settings
Stored as signed seconds since epoch.
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 11 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index fe0d1eebf..8f3b74cdf 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -325,13 +325,20 @@ void Config::ReadValues() { | |||
| 325 | Settings::values.current_user = std::clamp<int>( | 325 | Settings::values.current_user = std::clamp<int>( |
| 326 | sdl2_config->GetInteger("System", "current_user", 0), 0, Service::Account::MAX_USERS - 1); | 326 | sdl2_config->GetInteger("System", "current_user", 0), 0, Service::Account::MAX_USERS - 1); |
| 327 | 327 | ||
| 328 | const auto enabled = sdl2_config->GetBoolean("System", "rng_seed_enabled", false); | 328 | const auto rng_seed_enabled = sdl2_config->GetBoolean("System", "rng_seed_enabled", false); |
| 329 | if (enabled) { | 329 | if (rng_seed_enabled) { |
| 330 | Settings::values.rng_seed = sdl2_config->GetInteger("System", "rng_seed", 0); | 330 | Settings::values.rng_seed = sdl2_config->GetInteger("System", "rng_seed", 0); |
| 331 | } else { | 331 | } else { |
| 332 | Settings::values.rng_seed = std::nullopt; | 332 | Settings::values.rng_seed = std::nullopt; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | const auto custom_rtc_enabled = sdl2_config->GetBoolean("System", "custom_rtc_enabled", false); | ||
| 336 | if (custom_rtc_enabled) { | ||
| 337 | Settings::values.custom_rtc = sdl2_config->GetInteger("System", "custom_rtc", 0); | ||
| 338 | } else { | ||
| 339 | Settings::values.custom_rtc = std::nullopt; | ||
| 340 | } | ||
| 341 | |||
| 335 | // Core | 342 | // Core |
| 336 | Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true); | 343 | Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true); |
| 337 | Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false); | 344 | 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..0a3ea2619 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -183,6 +183,12 @@ enable_nfc = | |||
| 183 | rng_seed_enabled = | 183 | rng_seed_enabled = |
| 184 | rng_seed = | 184 | rng_seed = |
| 185 | 185 | ||
| 186 | # Sets the current time (in seconds since 12:00 AM Jan 1, 1970) that will be used by the time service | ||
| 187 | # This will auto-increment, with the time set being the time the game is started | ||
| 188 | # This override will only occur if custom_rtc_enabled is true, otherwise the current time is used | ||
| 189 | custom_rtc_enabled = | ||
| 190 | custom_rtc = | ||
| 191 | |||
| 186 | # Sets the account username, max length is 32 characters | 192 | # Sets the account username, max length is 32 characters |
| 187 | # yuzu (default) | 193 | # yuzu (default) |
| 188 | username = yuzu | 194 | username = yuzu |