mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 00:29:57 +00:00
Ignore the difference between "\" and "/" in "recent" and "remove from recent".
This commit is contained in:
parent
3b40705197
commit
09636da4ba
@ -554,7 +554,7 @@ void Config::Save() {
|
||||
|
||||
void Config::AddRecent(const std::string &file) {
|
||||
for (auto str = recentIsos.begin(); str != recentIsos.end(); str++) {
|
||||
if (*str == file) {
|
||||
if (!strcmpIgnore(*str, file, "\\", "/")) {
|
||||
recentIsos.erase(str);
|
||||
recentIsos.insert(recentIsos.begin(), file);
|
||||
if ((int)recentIsos.size() > iMaxRecent)
|
||||
|
@ -211,7 +211,7 @@ UI::EventReturn GameScreen::OnCreateShortcut(UI::EventParams &e) {
|
||||
|
||||
bool GameScreen::isRecentGame(std::string gamePath) {
|
||||
for (auto it = g_Config.recentIsos.begin(); it != g_Config.recentIsos.end(); ++it) {
|
||||
if (!strcmp((*it).c_str(),gamePath.c_str()))
|
||||
if (!strcmpIgnore((*it).c_str(), gamePath_.c_str(), "\\","/"))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -219,7 +219,7 @@ bool GameScreen::isRecentGame(std::string gamePath) {
|
||||
|
||||
UI::EventReturn GameScreen::OnRemoveFromRecent(UI::EventParams &e) {
|
||||
for (auto it = g_Config.recentIsos.begin(); it != g_Config.recentIsos.end(); ++it) {
|
||||
if (!strcmp((*it).c_str(),gamePath_.c_str())) {
|
||||
if (!strcmpIgnore((*it).c_str(), gamePath_.c_str(), "\\","/")) {
|
||||
g_Config.recentIsos.erase(it);
|
||||
screenManager()->switchScreen(new MainScreen());
|
||||
return UI::EVENT_DONE;
|
||||
|
Loading…
Reference in New Issue
Block a user