From 294d6c35480bbdfcd035e76e83d98de94bfe5927 Mon Sep 17 00:00:00 2001 From: ParantezTech <12572227+par274@users.noreply.github.com> Date: Tue, 29 Sep 2026 18:38:56 +0300 Subject: [PATCH] [Runtime] Module loader correct order: libc > libSceNpCppWebApi > libScePfs > logiWheel --- src/SharpEmu.Core/Runtime/SharpEmuRuntime.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SharpEmu.Core/Runtime/SharpEmuRuntime.cs b/src/SharpEmu.Core/Runtime/SharpEmuRuntime.cs index 51ba9a3..2cfc051 100644 --- a/src/SharpEmu.Core/Runtime/SharpEmuRuntime.cs +++ b/src/SharpEmu.Core/Runtime/SharpEmuRuntime.cs @@ -667,14 +667,15 @@ public sealed class SharpEmuRuntime : ISharpEmuRuntime var moduleDirectories = new[] { - // A linked PRX can be beside eboot.bin. Load only the app-root modules - // named by the main image at boot. Map the other app-root modules so - // sceKernelLoadStartModule can start them later. - (Path: ebootDirectory, StartAtBoot: true, LinkedOnly: true, SearchOption: SearchOption.TopDirectoryOnly), - (Path: ebootDirectory, StartAtBoot: false, LinkedOnly: false, SearchOption: SearchOption.TopDirectoryOnly), (Path: Path.Combine(ebootDirectory, "sce_module"), StartAtBoot: true, LinkedOnly: false, SearchOption: SearchOption.TopDirectoryOnly), (Path: Path.Combine(ebootDirectory, "sce_modules"), StartAtBoot: true, LinkedOnly: false, SearchOption: SearchOption.TopDirectoryOnly), (Path: Path.Combine(ebootDirectory, "Media", "Modules"), StartAtBoot: true, LinkedOnly: false, SearchOption: SearchOption.TopDirectoryOnly), + // A linked PRX can be beside eboot.bin. Load only the app-root modules + // named by the main image at boot, after the normal module directories + // they may depend on. Map the other app-root modules so + // sceKernelLoadStartModule can start them later. + (Path: ebootDirectory, StartAtBoot: true, LinkedOnly: true, SearchOption: SearchOption.TopDirectoryOnly), + (Path: ebootDirectory, StartAtBoot: false, LinkedOnly: false, SearchOption: SearchOption.TopDirectoryOnly), // Unity native plugins are loaded later through sceKernelLoadStartModule. Map // them up front so the HLE loader can return a real module handle and dlsym // can resolve their exports, but defer DT_INIT until the guest requests them.