Core: Add config setting for base GCI folder path.

This commit is contained in:
Admiral H. Curtiss
2022-01-19 03:05:05 +01:00
parent 8f5a58f8be
commit 2132e005c3
8 changed files with 232 additions and 20 deletions

View File

@ -716,16 +716,10 @@ void GameList::OpenGCSaveFolder()
{
case ExpansionInterface::EXIDeviceType::MemoryCardFolder:
{
std::string path = fmt::format("{}/{}/{}", File::GetUserPath(D_GCUSER_IDX),
Config::GetDirectoryForRegion(game->GetRegion()),
slot == Slot::A ? "Card A" : "Card B");
std::string override_path = Config::Get(Config::GetInfoForGCIPathOverride(slot));
if (!override_path.empty())
path = override_path;
QDir dir(QString::fromStdString(path));
QDir dir(QString::fromStdString(override_path.empty() ?
Config::GetGCIFolderPath(slot, game->GetRegion()) :
override_path));
if (!dir.entryList({QStringLiteral("%1-%2-*.gci")
.arg(QString::fromStdString(game->GetMakerID()))