diff options
Diffstat (limited to 'src/yuzu_cmd')
| -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 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | #include <sstream> | ||
| 6 | #include <SDL.h> | 7 | #include <SDL.h> |
| 7 | #include <inih/cpp/INIReader.h> | 8 | #include <inih/cpp/INIReader.h> |
| 8 | #include "common/file_util.h" | 9 | #include "common/file_util.h" |
| @@ -369,6 +370,23 @@ void Config::ReadValues() { | |||
| 369 | Settings::values.dump_exefs = sdl2_config->GetBoolean("Debugging", "dump_exefs", false); | 370 | Settings::values.dump_exefs = sdl2_config->GetBoolean("Debugging", "dump_exefs", false); |
| 370 | Settings::values.dump_nso = sdl2_config->GetBoolean("Debugging", "dump_nso", false); | 371 | Settings::values.dump_nso = sdl2_config->GetBoolean("Debugging", "dump_nso", false); |
| 371 | 372 | ||
| 373 | const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); | ||
| 374 | std::stringstream ss(title_list); | ||
| 375 | std::string line; | ||
| 376 | while (std::getline(ss, line, '|')) { | ||
| 377 | const auto title_id = std::stoul(line, nullptr, 16); | ||
| 378 | const auto disabled_list = sdl2_config->Get("AddOns", "disabled_" + line, ""); | ||
| 379 | |||
| 380 | std::stringstream inner_ss(disabled_list); | ||
| 381 | std::string inner_line; | ||
| 382 | std::vector<std::string> out; | ||
| 383 | while (std::getline(inner_ss, inner_line, '|')) { | ||
| 384 | out.push_back(inner_line); | ||
| 385 | } | ||
| 386 | |||
| 387 | Settings::values.disabled_addons.insert_or_assign(title_id, out); | ||
| 388 | } | ||
| 389 | |||
| 372 | // Web Service | 390 | // Web Service |
| 373 | Settings::values.enable_telemetry = | 391 | Settings::values.enable_telemetry = |
| 374 | sdl2_config->GetBoolean("WebService", "enable_telemetry", true); | 392 | 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..0f3f8da50 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 | |||
| 221 | # See https://profile.yuzu-emu.org/ for more info | 221 | # See https://profile.yuzu-emu.org/ for more info |
| 222 | yuzu_username = | 222 | yuzu_username = |
| 223 | yuzu_token = | 223 | yuzu_token = |
| 224 | |||
| 225 | [AddOns] | ||
| 226 | # Used to disable add-ons | ||
| 227 | # List of title IDs of games that will have add-ons disabled (separated by '|'): | ||
| 228 | title_ids = | ||
| 229 | # 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 '|') | ||
| 230 | # e.x. disabled_0100000000010000 = Update|DLC <- disables Updates and DLC on Super Mario Odyssey | ||
| 224 | )"; | 231 | )"; |
| 225 | } | 232 | } |