mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-10 11:42:04 -06:00
Merge branch 'main' into user_and_settings
This commit is contained in:
commit
58f4e12437
@ -253,6 +253,10 @@ s32 loadModuleInternal(s32 index, s32 argc, const void* argv, s32* res_out) {
|
||||
if (init_func) {
|
||||
LOG_INFO(Loader, "Can't Load {} switching to HLE", mod_name);
|
||||
init_func(&linker->GetHLESymbols());
|
||||
|
||||
// When loading HLEs, we need to relocate imports
|
||||
// This ensures later module loads can see our HLE functions.
|
||||
linker->RelocateAllImports();
|
||||
} else {
|
||||
LOG_INFO(Loader, "No HLE available for {} module", mod_name);
|
||||
}
|
||||
|
||||
@ -124,6 +124,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void RelocateAllImports() {
|
||||
std::scoped_lock lk{mutex};
|
||||
for (auto& module : m_modules) {
|
||||
Relocate(module.get());
|
||||
}
|
||||
}
|
||||
|
||||
void SetHeapAPI(void* func[]) {
|
||||
heap_api = reinterpret_cast<AppHeapAPI>(func);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user