Merge branch 'main' into user_and_settings

This commit is contained in:
georgemoralis 2026-03-10 09:03:26 +02:00 committed by GitHub
commit 58f4e12437
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}