Skip to content

Commit

Permalink
hotfix : check if dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemoralis committed Oct 31, 2024
1 parent 8d15388 commit 67dfc79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,13 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string
LOG_INFO(Loader, "No HLE available for {} module", module_name);
}
}
for (const auto& entry : std::filesystem::directory_iterator(sys_module_path / game_serial)) {
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(), game_serial);
linker->LoadModule(entry.path());
if (std::filesystem::exists(sys_module_path / game_serial)) {
for (const auto& entry :
std::filesystem::directory_iterator(sys_module_path / game_serial)) {
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),
game_serial);
linker->LoadModule(entry.path());
}
}
}

Expand Down

0 comments on commit 67dfc79

Please sign in to comment.