Gate use of custom directories behind a variable (#6157)
previous changes had forced every single user to use custom directories for NAND and SDMC. Those paths were saved to the config file and would interact badly with portable builds.
This commit is contained in:
@@ -203,14 +203,15 @@ void Config::ReadValues() {
|
||||
Settings::values.use_virtual_sd =
|
||||
sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true);
|
||||
|
||||
const std::string default_nand_dir = FileUtil::GetDefaultUserPath(FileUtil::UserPath::NANDDir);
|
||||
FileUtil::UpdateUserPath(
|
||||
FileUtil::UserPath::NANDDir,
|
||||
sdl2_config->GetString("Data Storage", "nand_directory", default_nand_dir));
|
||||
const std::string default_sdmc_dir = FileUtil::GetDefaultUserPath(FileUtil::UserPath::SDMCDir);
|
||||
FileUtil::UpdateUserPath(
|
||||
FileUtil::UserPath::SDMCDir,
|
||||
sdl2_config->GetString("Data Storage", "sdmc_directory", default_sdmc_dir));
|
||||
Settings::values.use_custom_storage =
|
||||
sdl2_config->GetBoolean("Data Storage", "use_custom_storage", false);
|
||||
|
||||
if (Settings::values.use_custom_storage) {
|
||||
FileUtil::UpdateUserPath(FileUtil::UserPath::NANDDir,
|
||||
sdl2_config->GetString("Data Storage", "nand_directory", ""));
|
||||
FileUtil::UpdateUserPath(FileUtil::UserPath::SDMCDir,
|
||||
sdl2_config->GetString("Data Storage", "sdmc_directory", ""));
|
||||
}
|
||||
|
||||
// System
|
||||
Settings::values.is_new_3ds = sdl2_config->GetBoolean("System", "is_new_3ds", true);
|
||||
|
||||
@@ -250,6 +250,10 @@ volume =
|
||||
# 1 (default): Yes, 0: No
|
||||
use_virtual_sd =
|
||||
|
||||
# Whether to use custom storage locations
|
||||
# 1: Yes, 0 (default): No
|
||||
use_custom_storage =
|
||||
|
||||
# The path of the virtual SD card directory.
|
||||
# empty (default) will use the user_path
|
||||
sdmc_directory =
|
||||
|
||||
Reference in New Issue
Block a user