Add functionality to limit a pathbrowser to a specific root

This commit is contained in:
Henrik Rydgård
2024-05-03 17:54:57 +02:00
parent 0ae0c9bbe9
commit ae1ee41eb0
8 changed files with 44 additions and 12 deletions
+3 -2
View File
@@ -253,10 +253,11 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort
}
static bool LoadGameList(const Path &url, std::vector<Path> &games) {
PathBrowser browser(url);
PathBrowser browser;
browser.SetPath(url);
std::vector<File::FileInfo> files;
browser.SetUserAgent(StringFromFormat("PPSSPP/%s", PPSSPP_GIT_VERSION));
browser.SetRootAlias("ms:", GetSysDirectory(DIRECTORY_MEMSTICK_ROOT).ToVisualString() + "/");
browser.SetRootAlias("ms:", GetSysDirectory(DIRECTORY_MEMSTICK_ROOT));
browser.GetListing(files, "iso:cso:chd:pbp:elf:prx:ppdmp:", &scanCancelled);
if (scanCancelled) {
return false;