|
|
|
@ -462,38 +462,45 @@ void Config::ReadDataStorageValues() {
|
|
|
|
|
FileUtil::GetUserPath(
|
|
|
|
|
FileUtil::UserPath::LoadDir,
|
|
|
|
|
qt_config
|
|
|
|
|
->value("load_directory",
|
|
|
|
|
->value(QStringLiteral("load_directory"),
|
|
|
|
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::LoadDir)))
|
|
|
|
|
.toString()
|
|
|
|
|
.toStdString());
|
|
|
|
|
FileUtil::GetUserPath(
|
|
|
|
|
FileUtil::UserPath::DumpDir,
|
|
|
|
|
qt_config
|
|
|
|
|
->value("dump_directory",
|
|
|
|
|
->value(QStringLiteral("dump_directory"),
|
|
|
|
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::DumpDir)))
|
|
|
|
|
.toString()
|
|
|
|
|
.toStdString());
|
|
|
|
|
FileUtil::GetUserPath(
|
|
|
|
|
FileUtil::UserPath::CacheDir,
|
|
|
|
|
qt_config
|
|
|
|
|
->value("cache_directory",
|
|
|
|
|
->value(QStringLiteral("cache_directory"),
|
|
|
|
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir)))
|
|
|
|
|
.toString()
|
|
|
|
|
.toStdString());
|
|
|
|
|
Settings::values.gamecard_inserted = ReadSetting("gamecard_inserted", false).toBool();
|
|
|
|
|
Settings::values.gamecard_current_game = ReadSetting("gamecard_current_game", false).toBool();
|
|
|
|
|
Settings::values.gamecard_path = ReadSetting("gamecard_path", "").toString().toStdString();
|
|
|
|
|
Settings::values.gamecard_inserted =
|
|
|
|
|
ReadSetting(QStringLiteral("gamecard_inserted"), false).toBool();
|
|
|
|
|
Settings::values.gamecard_current_game =
|
|
|
|
|
ReadSetting(QStringLiteral("gamecard_current_game"), false).toBool();
|
|
|
|
|
Settings::values.gamecard_path =
|
|
|
|
|
ReadSetting(QStringLiteral("gamecard_path"), QStringLiteral("")).toString().toStdString();
|
|
|
|
|
Settings::values.nand_total_size = static_cast<Settings::NANDTotalSize>(
|
|
|
|
|
ReadSetting(QStringLiteral("nand_total_size"), static_cast<u64>(Settings::NANDTotalSize::S29_1GB))
|
|
|
|
|
ReadSetting(QStringLiteral("nand_total_size"),
|
|
|
|
|
static_cast<u64>(Settings::NANDTotalSize::S29_1GB))
|
|
|
|
|
.toULongLong());
|
|
|
|
|
Settings::values.nand_user_size = static_cast<Settings::NANDUserSize>(
|
|
|
|
|
ReadSetting(QStringLiteral("nand_user_size"), static_cast<u64>(Settings::NANDUserSize::S26GB))
|
|
|
|
|
ReadSetting(QStringLiteral("nand_user_size"),
|
|
|
|
|
static_cast<u64>(Settings::NANDUserSize::S26GB))
|
|
|
|
|
.toULongLong());
|
|
|
|
|
Settings::values.nand_system_size = static_cast<Settings::NANDSystemSize>(
|
|
|
|
|
ReadSetting(QStringLiteral("nand_system_size"), static_cast<u64>(Settings::NANDSystemSize::S2_5GB))
|
|
|
|
|
ReadSetting(QStringLiteral("nand_system_size"),
|
|
|
|
|
static_cast<u64>(Settings::NANDSystemSize::S2_5GB))
|
|
|
|
|
.toULongLong());
|
|
|
|
|
Settings::values.sdmc_size = static_cast<Settings::SDMCSize>(
|
|
|
|
|
ReadSetting(QStringLiteral("sdmc_size"), static_cast<u64>(Settings::SDMCSize::S16GB)).toULongLong());
|
|
|
|
|
ReadSetting(QStringLiteral("sdmc_size"), static_cast<u64>(Settings::SDMCSize::S16GB))
|
|
|
|
|
.toULongLong());
|
|
|
|
|
|
|
|
|
|
qt_config->endGroup();
|
|
|
|
|
}
|
|
|
|
@ -920,13 +927,18 @@ void Config::SaveDataStorageValues() {
|
|
|
|
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir)),
|
|
|
|
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir)));
|
|
|
|
|
WriteSetting(QStringLiteral("gamecard_inserted"), Settings::values.gamecard_inserted, false);
|
|
|
|
|
WriteSetting(QStringLiteral("gamecard_current_game"), Settings::values.gamecard_current_game, false);
|
|
|
|
|
WriteSetting(QStringLiteral("gamecard_path"), QString::fromStdString(Settings::values.gamecard_path), "");
|
|
|
|
|
WriteSetting(QStringLiteral("nand_total_size"), static_cast<u64>(Settings::values.nand_total_size),
|
|
|
|
|
WriteSetting(QStringLiteral("gamecard_current_game"), Settings::values.gamecard_current_game,
|
|
|
|
|
false);
|
|
|
|
|
WriteSetting(QStringLiteral("gamecard_path"),
|
|
|
|
|
QString::fromStdString(Settings::values.gamecard_path), QStringLiteral(""));
|
|
|
|
|
WriteSetting(QStringLiteral("nand_total_size"),
|
|
|
|
|
static_cast<u64>(Settings::values.nand_total_size),
|
|
|
|
|
static_cast<u64>(Settings::NANDTotalSize::S29_1GB));
|
|
|
|
|
WriteSetting(QStringLiteral("nand_user_size"), static_cast<u64>(Settings::values.nand_user_size),
|
|
|
|
|
WriteSetting(QStringLiteral("nand_user_size"),
|
|
|
|
|
static_cast<u64>(Settings::values.nand_user_size),
|
|
|
|
|
static_cast<u64>(Settings::NANDUserSize::S26GB));
|
|
|
|
|
WriteSetting(QStringLiteral("nand_system_size"), static_cast<u64>(Settings::values.nand_system_size),
|
|
|
|
|
WriteSetting(QStringLiteral("nand_system_size"),
|
|
|
|
|
static_cast<u64>(Settings::values.nand_system_size),
|
|
|
|
|
static_cast<u64>(Settings::NANDSystemSize::S2_5GB));
|
|
|
|
|
WriteSetting(QStringLiteral("sdmc_size"), static_cast<u64>(Settings::values.sdmc_size),
|
|
|
|
|
static_cast<u64>(Settings::SDMCSize::S16GB));
|
|
|
|
|