settings: Add options for setting storage sizes

This commit is contained in:
Zach Hilman 2019-04-23 08:34:19 -04:00
parent c6ff4a6f4d
commit 918119ae1b
3 changed files with 57 additions and 1 deletions

View file

@ -316,6 +316,15 @@ void Config::ReadValues() {
FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir,
sdl2_config->Get("Data Storage", "sdmc_directory",
FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir)));
Settings::values.nand_total_size = static_cast<Settings::NANDTotalSize>(sdl2_config->GetInteger(
"Data Storage", "nand_total_size", static_cast<long>(Settings::NANDTotalSize::S29_1GB)));
Settings::values.nand_user_size = static_cast<Settings::NANDUserSize>(sdl2_config->GetInteger(
"Data Storage", "nand_user_size", static_cast<long>(Settings::NANDUserSize::S26GB)));
Settings::values.nand_system_size = static_cast<Settings::NANDSystemSize>(
sdl2_config->GetInteger("Data Storage", "nand_system_size",
static_cast<long>(Settings::NANDSystemSize::S2_5GB)));
Settings::values.sdmc_size = static_cast<Settings::SDMCSize>(sdl2_config->GetInteger(
"Data Storage", "sdmc_size", static_cast<long>(Settings::SDMCSize::S16GB)));
// System
Settings::values.use_docked_mode = sdl2_config->GetBoolean("System", "use_docked_mode", false);