diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-28 20:00:01 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-12-03 23:20:34 +0100 |
commit | c381f46428268a57f0aef1d99918c8f1bb6beec7 (patch) | |
tree | f5aa5e646596d5d57d394a56f659668911c4ac27 /src/yuzu_cmd | |
parent | settings: Store list of disabled add-ons per title ID (diff) | |
download | yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar.gz yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar.bz2 yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar.lz yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar.xz yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.tar.zst yuzu-c381f46428268a57f0aef1d99918c8f1bb6beec7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu_cmd/config.cpp | 18 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 097c1fbe3..fe0d1eebf 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <memory> +#include <sstream> #include <SDL.h> #include <inih/cpp/INIReader.h> #include "common/file_util.h" @@ -369,6 +370,23 @@ void Config::ReadValues() { Settings::values.dump_exefs = sdl2_config->GetBoolean("Debugging", "dump_exefs", false); Settings::values.dump_nso = sdl2_config->GetBoolean("Debugging", "dump_nso", false); + const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); + std::stringstream ss(title_list); + std::string line; + while (std::getline(ss, line, '|')) { + const auto title_id = std::stoul(line, nullptr, 16); + const auto disabled_list = sdl2_config->Get("AddOns", "disabled_" + line, ""); + + std::stringstream inner_ss(disabled_list); + std::string inner_line; + std::vector<std::string> out; + while (std::getline(inner_ss, inner_line, '|')) { + out.push_back(inner_line); + } + + Settings::values.disabled_addons.insert_or_assign(title_id, out); + } + // Web Service Settings::values.enable_telemetry = sdl2_config->GetBoolean("WebService", "enable_telemetry", true); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index d73669f36..25236d05d 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -221,5 +221,12 @@ web_api_url = https://api.yuzu-emu.org # See https://profile.yuzu-emu.org/ for more info yuzu_username = yuzu_token = + +[AddOns] +# Used to disable add-ons +# List of title IDs of games that will have add-ons disabled (separated by '|'): +title_ids = +# For each title ID, have a key/value pair called `disabled_<title_id>` equal to the names of the add-ons to disable (sep. by '|') +# e.x. disabled_0100000000010000 = Update|DLC <- disables Updates and DLC on Super Mario Odyssey )"; } |