From ad537a37731a84cf17cf8468e07b7d4c120b503d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 19 Aug 2013 23:04:45 -0700 Subject: [PATCH] Use normal Windows path logic for homebrew/demos. --- UI/MainScreen.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 3437c4bbcf..b1a5df99f4 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -290,6 +290,12 @@ void PathBrowser::Navigate(const std::string &path) { } } +static std::string GetMemCardDirectory() { + std::string memCardDirectory, ignore; + GetSysDirectories(memCardDirectory, ignore); + return memCardDirectory; +} + class GameBrowser : public UI::LinearLayout { public: GameBrowser(std::string path, bool allowBrowsing, bool *gridStyle_, std::string lastText, std::string lastLink, UI::LayoutParams *layoutParams = 0); @@ -333,7 +339,7 @@ UI::EventReturn GameBrowser::LastClick(UI::EventParams &e) { } UI::EventReturn GameBrowser::HomeClick(UI::EventParams &e) { - path_.SetPath(g_Config.memCardDirectory); + path_.SetPath(GetMemCardDirectory()); g_Config.currentDirectory = path_.GetPath(); Refresh(); return UI::EVENT_DONE; @@ -472,7 +478,7 @@ void MainScreen::CreateViews() { GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2, m->T("How to get games"), "http://www.ppsspp.org/faq.html", new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); - GameBrowser *tabHomebrew = new GameBrowser(g_Config.memCardDirectory + "PSP/GAME/", false, &g_Config.bGridView3, + GameBrowser *tabHomebrew = new GameBrowser(GetMemCardDirectory() + "PSP/GAME/", false, &g_Config.bGridView3, "", "", new LinearLayoutParams(FILL_PARENT, FILL_PARENT));