diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-12 04:34:23 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-12 05:09:46 +0100 |
commit | 2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98 (patch) | |
tree | 682a2fc1751f8628d07f2caf3a2b34f7a1c39b52 /src/yuzu_cmd | |
parent | csrng: Use std::mt19937 engine for random number generation (diff) | |
download | yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar.gz yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar.bz2 yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar.lz yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar.xz yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.tar.zst yuzu-2a16fd7ffc1ec4e2dc90480c04f9867fdeec6a98.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu_cmd/config.cpp | 7 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index b456266a6..f3134d4cb 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -132,6 +132,13 @@ 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) { + Settings::values.rng_seed = sdl2_config->GetInteger("System", "rng_seed", 0); + } else { + Settings::values.rng_seed = std::nullopt; + } + // Miscellaneous Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); Settings::values.use_dev_keys = sdl2_config->GetBoolean("Miscellaneous", "use_dev_keys", false); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index e0b223cd6..dd6644d79 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -178,6 +178,11 @@ use_docked_mode = # 1 (default): Yes, 0 : No enable_nfc = +# Sets the seed for the RNG generator built into the switch +# rng_seed will be ignored and randomly generated if rng_seed_enabled is false +rng_seed_enabled = +rng_seed = + # Sets the account username, max length is 32 characters # yuzu (default) username = yuzu |