check if loading of prx is valid before returning

This commit is contained in:
Stephen Miller 2024-09-27 10:11:14 +03:00 committed by georgemoralis
commit febede3b5a
2 changed files with 7 additions and 5 deletions

View file

@ -251,11 +251,12 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file) {
if (it != found_modules.end()) { if (it != found_modules.end()) {
LOG_INFO(Loader, "Loading {}", it->string()); LOG_INFO(Loader, "Loading {}", it->string());
if (load_at_startup) { if (load_at_startup) {
linker->LoadModule(*it); int result = linker->LoadModule(*it);
} if (result == 0) {
continue; continue;
} }
}
}
if (init_func) { if (init_func) {
LOG_INFO(Loader, "Can't Load {} switching to HLE", module_name); LOG_INFO(Loader, "Can't Load {} switching to HLE", module_name);
init_func(&linker->GetHLESymbols()); init_func(&linker->GetHLESymbols());

View file

@ -18,6 +18,7 @@ using HLEInitDef = void (*)(Core::Loader::SymbolsResolver* sym);
struct SysModules { struct SysModules {
std::string_view module_name; std::string_view module_name;
HLEInitDef callback; HLEInitDef callback;
bool loadAtStartup;
}; };
class Emulator { class Emulator {