gamedb: Delimit memcard filters with '/' instead of ','

This commit is contained in:
Tyler Wilding 2021-01-05 17:44:30 -05:00 committed by refractionpcsx2
parent 7a1ee439d2
commit 06cf30019b
2 changed files with 3 additions and 12 deletions

View File

@ -18,6 +18,7 @@
#include "GameDatabase.h"
#include "fmt/core.h"
#include "fmt/ranges.h"
#include "yaml-cpp/yaml.h"
#include <fstream>
#include <algorithm>
@ -39,18 +40,7 @@ bool compareStrNoCase(const std::string str1, const std::string str2)
std::string GameDatabaseSchema::GameEntry::memcardFiltersAsString() const
{
if (memcardFilters.empty())
return "";
std::string filters;
for (u32 i = 0; i < memcardFilters.size(); i++)
{
std::string f = memcardFilters.at(i);
filters.append(f);
if (i != memcardFilters.size() - 1)
filters.append(",");
}
return filters;
return fmt::to_string(fmt::join(memcardFilters, "/"));
}
bool GameDatabaseSchema::GameEntry::findPatch(const std::string crc, Patch& patch) const

View File

@ -77,6 +77,7 @@ public:
std::vector<std::string> memcardFilters;
std::unordered_map<std::string, Patch> patches;
// Returns the list of memory card serials as a `/` delimited string
std::string memcardFiltersAsString() const;
bool findPatch(const std::string crc, Patch& patch) const;
};