mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-26 12:05:54 -05:00
When multiple copies of the same DLL are loaded into the same process (e.g. for libretro multi-instance support), all copies share the same PID. Using only the PID as the name suffix caused CreateFileMapping to return the existing named kernel object instead of creating a new one, so both instances silently mapped the same 4GB+ GameCube/Wii RAM region and instantly corrupted each other. Fix this by also embedding the address of a static-local variable in the name. Because each DLL copy is mapped at a different base address in the process, s_dll_id lives at a unique virtual address in every copy, so its value acts as a stable, zero-cost, per-instance discriminator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| AudioCommon | ||
| Common | ||
| Core | ||
| DiscIO | ||
| DolphinNoGUI | ||
| DolphinQt | ||
| DolphinTool | ||
| InputCommon | ||
| MacUpdater | ||
| UICommon | ||
| UpdaterCommon | ||
| VideoBackends | ||
| VideoCommon | ||
| WinUpdater | ||
| CMakeLists.txt | ||
| DolphinLib.ARM64.props | ||
| DolphinLib.props | ||
| DolphinLib.vcxproj | ||
| DolphinLib.vcxproj.user | ||
| DolphinLib.x64.props | ||
| VersionInfo.plist.in | ||