mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-07 01:26:35 +00:00
When adding filenames to recent list, convert slashes to /. See #9335
Note that this doesn't fix existing backslashes but solves it in the long run.
This commit is contained in:
parent
06cf449719
commit
31dd8fdc39
@ -1110,20 +1110,26 @@ void Config::AddRecent(const std::string &file) {
|
||||
if (iMaxRecent <= 0)
|
||||
return;
|
||||
|
||||
#ifdef _WIN32
|
||||
std::string filename = ReplaceAll(file, "\\", "/");
|
||||
#else
|
||||
std::string filename = file;
|
||||
#endif
|
||||
|
||||
for (auto str = recentIsos.begin(); str != recentIsos.end(); ++str) {
|
||||
#ifdef _WIN32
|
||||
if (!strcmpIgnore((*str).c_str(), file.c_str(), "\\", "/")) {
|
||||
if (!strcmpIgnore((*str).c_str(), filename.c_str(), "\\", "/")) {
|
||||
#else
|
||||
if (!strcmp((*str).c_str(), file.c_str())) {
|
||||
if (!strcmp((*str).c_str(), filename.c_str())) {
|
||||
#endif
|
||||
recentIsos.erase(str);
|
||||
recentIsos.insert(recentIsos.begin(), file);
|
||||
recentIsos.insert(recentIsos.begin(), filename);
|
||||
if ((int)recentIsos.size() > iMaxRecent)
|
||||
recentIsos.resize(iMaxRecent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
recentIsos.insert(recentIsos.begin(), file);
|
||||
recentIsos.insert(recentIsos.begin(), filename);
|
||||
if ((int)recentIsos.size() > iMaxRecent)
|
||||
recentIsos.resize(iMaxRecent);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user