diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 3364b791ed..6f747fcf50 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp @@ -201,10 +201,10 @@ void Config::ReadValues() { // Data Storage Settings::values.use_virtual_sd = sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true); - Settings::values.nand_dir = - sdl2_config->Get("Data Storage", "nand_directory", FileUtil::GetUserPath(FileUtil::UserPath::NANDDir)); - Settings::values.sdmc_dir = - sdl2_config->Get("Data Storage", "sdmc_directory", FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir)); + Settings::values.nand_dir = sdl2_config->GetString( + "Data Storage", "nand_directory", FileUtil::GetUserPath(FileUtil::UserPath::NANDDir)); + Settings::values.sdmc_dir = sdl2_config->GetString( + "Data Storage", "sdmc_directory", FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir)); // System Settings::values.is_new_3ds = sdl2_config->GetBoolean("System", "is_new_3ds", true); diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h index 4646d5fd35..55d8da8f54 100644 --- a/src/citra/default_ini.h +++ b/src/citra/default_ini.h @@ -250,6 +250,14 @@ volume = # 1 (default): Yes, 0: No use_virtual_sd = +# The path of the virtual SD card directory. +# empty (default) will use the user_path +sdmc_directory = + +# The path of NAND directory. +# empty (default) will use the user_path +nand_directory = + [System] # The system model that Citra will try to emulate # 0: Old 3DS, 1: New 3DS (default) diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index 65071e251c..eac0c9990c 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -303,13 +303,15 @@ void Config::ReadDataStorageValues() { Settings::values.use_virtual_sd = ReadSetting(QStringLiteral("use_virtual_sd"), true).toBool(); std::string nan_dir = FileUtil::GetUserPath(FileUtil::UserPath::NANDDir); - Settings::values.nand_dir = ReadSetting(QStringLiteral("nand_directory"), QString::fromStdString(nan_dir)) - .toString() - .toStdString(); + Settings::values.nand_dir = + ReadSetting(QStringLiteral("nand_directory"), QString::fromStdString(nan_dir)) + .toString() + .toStdString(); std::string sdmc_dir = FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir); - Settings::values.sdmc_dir = ReadSetting(QStringLiteral("sdmc_directory"), QString::fromStdString(sdmc_dir)) - .toString() - .toStdString(); + Settings::values.sdmc_dir = + ReadSetting(QStringLiteral("sdmc_directory"), QString::fromStdString(sdmc_dir)) + .toString() + .toStdString(); qt_config->endGroup(); } @@ -861,9 +863,9 @@ void Config::SaveDataStorageValues() { WriteSetting(QStringLiteral("use_virtual_sd"), Settings::values.use_virtual_sd, true); WriteSetting(QStringLiteral("nand_directory"), - QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir))); + QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir))); WriteSetting(QStringLiteral("sdmc_directory"), - QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir))); + QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir))); qt_config->endGroup(); }