mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-02 19:08:03 -06:00
Run malloc_init before initializing libs
Allows LLE libSceMoveTracker.
This commit is contained in:
parent
4a5a47e53c
commit
dcb5d4dd38
@ -172,13 +172,15 @@ void Linker::Execute(const std::vector<std::string>& args) {
|
||||
ipc.WaitForStart();
|
||||
}
|
||||
|
||||
LoadSharedLibraries();
|
||||
LoadLibcInternal();
|
||||
|
||||
if (malloc_init != nullptr) {
|
||||
// Call _malloc_init
|
||||
malloc_init();
|
||||
}
|
||||
|
||||
LoadSharedLibraries();
|
||||
|
||||
// Simulate libSceGnmDriver initialization, which maps a chunk of direct memory.
|
||||
// Some games fail without accurately emulating this behavior.
|
||||
s64 phys_addr{};
|
||||
|
||||
@ -124,9 +124,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void LoadLibcInternal() {
|
||||
for (auto& module : m_modules) {
|
||||
if (module->name.contains("libSceLibcInternal")) {
|
||||
module->Start(0, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LoadSharedLibraries() {
|
||||
for (auto& module : m_modules) {
|
||||
if (module->IsSharedLib()) {
|
||||
if (module->IsSharedLib() && !module->name.contains("libSceLibcInternal")) {
|
||||
module->Start(0, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user