mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-01 00:03:17 +00:00
* Added recursive game scan and only using game directories * Added recursion depth limit to scan directories * Added recursive search by ID in cli mode * Added recursive search to pkg installing
This commit is contained in:
parent
8057ed408c
commit
f3c33b29dd
6 changed files with 117 additions and 20 deletions
|
@ -167,12 +167,12 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
// Check if the provided path is a valid file
|
||||
if (!std::filesystem::exists(eboot_path)) {
|
||||
// If not a file, treat it as a game ID and search in install directories
|
||||
// If not a file, treat it as a game ID and search in install directories recursively
|
||||
bool game_found = false;
|
||||
const int max_depth = 5;
|
||||
for (const auto& install_dir : Config::getGameInstallDirs()) {
|
||||
const auto candidate_path = install_dir / game_path / "eboot.bin";
|
||||
if (std::filesystem::exists(candidate_path)) {
|
||||
eboot_path = candidate_path;
|
||||
if (auto found_path = Common::FS::FindGameByID(install_dir, game_path, max_depth)) {
|
||||
eboot_path = *found_path;
|
||||
game_found = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue