From 34149ea92cd05857acdf13bc11d51d38c0c90a3b Mon Sep 17 00:00:00 2001 From: wiidev Date: Sun, 1 Aug 2021 18:00:17 +0100 Subject: [PATCH] Don't add RetroArch cores to the homebrew browser --- source/FileOperations/DirList.cpp | 6 ++++++ source/FileOperations/DirList.h | 3 ++- source/homebrewboot/HomebrewBrowser.cpp | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/FileOperations/DirList.cpp b/source/FileOperations/DirList.cpp index 2b6bdbbb..d11fde5c 100644 --- a/source/FileOperations/DirList.cpp +++ b/source/FileOperations/DirList.cpp @@ -121,6 +121,12 @@ bool DirList::LoadPath(std::string &folderpath, const char *filter, u32 flags) continue; } + if(flags & MainDOL) + { + if(!(memcmp(filename, "boot.dol", 8) == 0 || memcmp(filename, "boot.elf", 8) == 0)) + continue; + } + if(filter) { char * fileext = strrchr(filename, '.'); diff --git a/source/FileOperations/DirList.h b/source/FileOperations/DirList.h index caece414..a1ee6dab 100644 --- a/source/FileOperations/DirList.h +++ b/source/FileOperations/DirList.h @@ -81,7 +81,8 @@ class DirList { Files = 0x01, Dirs = 0x02, - CheckSubfolders = 0x08 + CheckSubfolders = 0x04, + MainDOL = 0x08 }; protected: //!Add a list entrie diff --git a/source/homebrewboot/HomebrewBrowser.cpp b/source/homebrewboot/HomebrewBrowser.cpp index 03c1bb13..a0257c2e 100644 --- a/source/homebrewboot/HomebrewBrowser.cpp +++ b/source/homebrewboot/HomebrewBrowser.cpp @@ -44,7 +44,7 @@ extern int connection; HomebrewBrowser::HomebrewBrowser() : FlyingButtonsMenu(tr( "Homebrew Launcher" )) { - HomebrewList = new DirList(Settings.homebrewapps_path, ".dol,.elf", DirList::Files | DirList::Dirs | DirList::CheckSubfolders); + HomebrewList = new DirList(Settings.homebrewapps_path, ".dol,.elf", DirList::Files | DirList::Dirs | DirList::CheckSubfolders | DirList::MainDOL); if (IsNetworkInit()) ResumeNetworkWait();